JP3605168B2 - Associative memory - Google Patents

Associative memory Download PDF

Info

Publication number
JP3605168B2
JP3605168B2 JP02172795A JP2172795A JP3605168B2 JP 3605168 B2 JP3605168 B2 JP 3605168B2 JP 02172795 A JP02172795 A JP 02172795A JP 2172795 A JP2172795 A JP 2172795A JP 3605168 B2 JP3605168 B2 JP 3605168B2
Authority
JP
Japan
Prior art keywords
data
memory
stored
attribute
memory word
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP02172795A
Other languages
Japanese (ja)
Other versions
JPH08171800A (en
Inventor
正人 米田
洋 笹間
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kawasaki Microelectronics Inc
Original Assignee
Kawasaki Microelectronics Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kawasaki Microelectronics Inc filed Critical Kawasaki Microelectronics Inc
Priority to JP02172795A priority Critical patent/JP3605168B2/en
Publication of JPH08171800A publication Critical patent/JPH08171800A/en
Application granted granted Critical
Publication of JP3605168B2 publication Critical patent/JP3605168B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

【0001】
【産業上の利用分野】
本発明は、一致検索の行われるデータ幅を複数のワードに拡張する機能、すなわち、連続する複数回の検索でそれぞれ一致が検出された場合に全体としての一致が検出される機能を備えた連想メモリに関する。
【0002】
【従来の技術】
従来より、配列された複数の各メモリワードそれぞれに各ディジタルデータを記憶しておき、検索データを入力し、入力された検索データの全部もしくは所定の一部のビットパターンと一致するビットパターンを有するディジタルデータが記憶されたメモリワードを検索する連想メモリ(Associative Memory,内容アドレス式メモリ;Content Addressable Memory)が提案されている。
【0003】
図10は、連想メモリの一例を表わした回路ブロック図である。
この連想メモリ10には、mビットを1ワードとする、互いに図の横方向に並ぶmビットのメモリセルからなる多数のメモリワード11_1,11_2,…,11_nが備えられている。またこの連想メモリ10は、1ワードの検索データが入力されラッチされる検索データレジスタ12を備え、検索データレジスタ12にラッチされた検索データの全部もしくは所定の一部のビットパターンと、各メモリワード11_1,11_2,…,11_nに記憶された格納データのうち上記ビットパターンと対応する部分のビットパターンとの一致不一致が比較され、各メモリワード11_1,11_2,…,11_nのそれぞれに対応して備えられた一致線14_1,14_2,…,14_nのうちビットパターンが一致したメモリワード11_1,11_2,…,11_nに対応する一致線14_1,14_2,…,14_nに論理‘1’(ここでは5Vとする)の一致信号が出力される。それ以外の一致線14_1,14_2,…,14_nは論理‘0’(ここでは0Vとする)にとどまる。
【0004】
これらの一致線14_1,14_2,…,14_nは各フラグレジスタ15_1,15_2,…,15_nの出力線91,92,…,nを介してプライオリティエンコーダ16に接続されており、これらの一致線14_1,14_2,…,14_nに出力された信号は、各フラグレジスタ15_1,15_2,…,15_nに格納される。ここでは、一例として、図示のように、各フラグレジスタ15_1,15_2,…,15_nにそれぞれ‘0’,‘1’,‘1’,‘0’,…,‘0’,‘0’が格納されたものとする。これらのフラグレジスタ15_1,15_2,…,15_nに格納された信号はプライオリティエンコーダ16に入力される。プライオリティエンコーダ16には、エンコードパルスEPが入力され、エンコードパルスEPが入力される毎に、所定の優先順位づけに従って、論理‘1’の信号が格納されたフラグレジスタ(ここではフラグレジスタ15_2とフラグレジスタ15_3の2つ)のうちの優先度の高いフラグレジスタに対応するアドレス信号ADが順次出力される。ここでは、添字が若いほど優先順位が高いものとし、従ってエンコードパルスEPが1つだけ入力されると、フラグレジスタ15_2に対応するメモリアドレスが出力される。このプライオリティエンコーダ16から出力されたアドレス信号ADは、必要に応じてアドレスデコーダ17に入力される。アドレスデコーダ17ではこの入力されたアドレス信号ADをデコードして、各メモリワード11_1,11_2,…,11_nそれぞれに対応して備えられたワード線18_1,18_2,…,18_nのうちの入力されたアドレス信号ADに対応するいずれか1本のワード線(ここではワード線18_2)にアクセス信号(ここでは論理‘1’の信号)を出力する。これによりアクセス信号の出力されたワード線18_2に対応するメモリワード11_2に記憶されている格納データが出力レジスタ19に読み出される。
【0005】
次に、エンコードパルスEPがもう1つ入力されると、今度はフラグレジスタ15_3に対応するメモリワード11_3のアドレスを得ることができる。
上記のように、連想メモリ10は、検索データの全部もしくは所定の一部のデータを用いて多数のメモリワード11_1,11_2,…,11_nに記憶された格納データを検索し、一致する格納データを有するメモリワードのアドレスを得、必要に応じてそのメモリワードに記憶されたデータ全体を読み出すことができるように構成されたメモリである。
【0006】
上記のような基本構成を有する連想メモリにおいて、一致検索の対象となるデータ幅を2ワードもしくはそれ以上の複数ワードに拡張する技術が提案されている。
図11は、データ拡張機能を備えた連想メモリの一例を示すブロック図である。図10に示した連想メモリの構成要素と対応する構成要素には、図10に付した符号と同一の符号を付して示し、その要素についての重複説明は省略する。
【0007】
各メモリワード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に接続されている。ただし図示の一番上のアンドゲート20_1に対応するオアゲートは省略されており、そのアンドゲート20_1の入力端子に初回検索制御線22が直接接続されている。
【0008】
各アンドゲート20_1,20_2,…の出力端子は各第1のフラグレジスタ23_1,23_2,…のデータ入力端子に接続され、各第1のフラグレジスタ23_1,23_2,…の出力端子は各第2のフラグレジスタ24_1,24_2,…の入力端子に接続されている。各第2のフラグレジスタ24_1,24_2,…の出力端子は、図10に示すプライオリティエンコーダ16(図11では図示省略)に接続されるとともに、図11の下方に隣接するメモリワードに対応するオアゲート21_2,21_3,…の入力端子に接続されている。
【0009】
互いに対応する第1および第2のフラグレジスタ23_1,24_1,;23_2,24_2,…の各ペアが図4に示す各フラグレジスタ15_1,15_2,…に対応する。
第1のフラグレジスタ23_1,23_2,…と第2のフラグレジスタ24_1,24_2,…には、ともに、一致結果ラッチ制御線25に出力される一致結果ラッチ信号S1が入力され、その一致結果ラッチ信号S1により各データ入力端子から入力された入力データがラッチされるが、第1のフラグレジスタ23_1,23_2,…には、一致結果ラッチ信号51の立ち上がりaの時点における入力データがラッチされ、第2のフラグレジスタ24_1,24_2,…には、一致結果ラッチ信号S1の立ち下がりbの時点の入力データがラッチされる。
【0010】
以上のように構成された連想メモリにおいては、以下のようにして一致検索が行われる。尚、ここでは図示のように、各メモリワード11_1,11_2,11_3,11_4,11_5,11_6…には、各格納データA,B,C,D,C,F,…が格納されているものとする。
ここで、各格納データを単独に検索する際は、検索データREF_DATAを入力して検索を行う際に、初回検索制御線22に初回検索タイミング信号S2を出力する。ここでは、検索データREF_DATAとしてデータ‘B’を入力したものとすると、データ‘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’の信号が出力される。
【0011】
アンドゲート20_2から出力された論理‘1’の信号は、一致結果ラッチ制御線25に出力された一致結果ラッチ信号S1の立ち上がりaのタイミングで第1のフラグレジスタ23_2にラッチされ、それに引き続く一致結果ラッチ信号S1の立ち下がりbのタイミングで第2のフラグレジスタ24_2にラッチされる。
【0012】
また第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’,…の信号が図4に示すプライオリティエンコーダ16に入力され、メモリワード11_2のアドレス信号ADが得られる。
【0013】
次に、データ幅が拡張された検索を行う場合について説明する。ここでは、2ワードに拡張された、データ‘B’とデータ‘C’からなる2ワードデータを検索する場合について説明する。
この場合、先ず上記と同様にして、データ‘B’の検索を行う。これにより、メモリワード11_2に対応する第1および第2のフラグレジスタ23_2,24_2に論理‘1’の信号がラッチされる。次に検索データREF_DATAとしてデータ‘C’を入力して検索を行うが、このときは初回検索制御線22には初回検索タイミング信号S2は出力せずに、初回検索制御線22は論理‘0’の状態に保っておく。検索データREF_DATAとしてデータ‘C’を入力して検索を行うと、図示の2つのメモリワード11_3,11_5にそれぞれ対応する一致線14_3,14_5に論理‘1’の一致信号が出力されるが、オアゲート21_3には、第2のフラグレジスタ24_2にラッチされている論理‘1’の信号が入力されているため一致線14_3の一致信号はアンドゲート20_3を通過し、第1および第2のフラグレジスタ23_3,24_3に、一致を表わす論理‘1’の信号がラッチされる。一方オアゲート21_5には、第2のフラグレジスタ24_4にラッチされている論理‘0’の信号が入力されているため一致線14_5の一致信号はアンドゲート20_5で遮断され、第1および第2のフラグレジタ23_5,24_5には不一致を表わす論理‘0’の信号がラッチされることになる。このようにして、データ‘B’とデータ‘C’のペアからなる2ワードデータの一致検出が行われる。3ワード以上のデータの一致検出も同様にして行われる。
【0014】
ただし、図11に示す連想メモリは、データ幅拡張機能を備えてはいるが、2ワード,3ワード等に拡張されるデータは、互いに隣接したメモリワードに所定の順序で格納されている必要があり、検索しようとする複数のデータが互いに離れたメモリワードに格納されている場合や逆の順序、例えばデータ‘C’,データ‘B’の順序に格納されている場合には複数のデータを結合した一致検出を行うことはできない。
【0015】
このような検索が必要となる場合のデータ構造を、図12に示す。図12には、それぞれ属性I,II,III,IVが付された4つのデータがセットとなって1つのデータ群を構成しているデータ構造が示されている。データ群および属性の概念を明確にするために一例を挙げると、例えば各群番号1,2,3,4,…毎の各データ群は各個人に属するデータであり、属性Iはその人の氏名,属性IIはその人の生年月日、属性IIIは住所、……等を示している。
【0016】
このように各属性I,II,III,IVが付された複数のデータからなるデータ群を連想メモリに格納しておいて検索を行う場合に、例えば群番号1のデータ群を検索する場合を例に説明すると、データ‘A’の検索とデータ‘B’の検索をこの順に行って、一致するデータ群の残りのデータ‘C’,‘D’を読み出すことだけではなく、例えばデータ‘A’の検索とデータ‘D’の検索を行って残りのデータ‘B’,‘C’を読み出したい場合や、データ‘B’の検索を先に行い、次にデータ‘A’の検索を行いたい場合がある。
【0017】
しかし、上述したワード幅拡張機能を備えた連想メモリ(図11参照)では、このような検索は不可能である。また上述した連想メモリでは、データ‘A’とデータ‘B’の検索を行った場合に、図12に示す群番号1の欄にある属性Iの付されたデータ‘A’と属性IIの付されたデータ‘B’とのペアと、群番号4の欄にある属性IIの付されたデータ‘A’と属性IIIの付されたデータ‘B’とのペアとの区別をすることはできず、例えば、‘氏名’という属性Iと‘生年月日’という属性IIの情報を基にそれらが一致する特定の個人の属性III,IVの情報を知ろうとしても、属性IIと属性IIIのペアでも一致が検出される等必要な情報以外のノイズが混入してしまうことになる。
【0018】
このような問題を解決するために、不連続な属性における検索も可能とした新規な連想メモリを、特願平5−248121号に提案した。
【0019】
【発明が解決しようとする課題】
しかしながら、この連想メモリにおいて、一連のデータ群中のデータについて、例えば属性毎に検索を行った場合に、一致あるいは不一致のアドレスの管理が煩雑化し、データ群が記憶されたメモリワード群を単位とした取扱いが複雑化するという問題点がある。
【0020】
本発明は、上記事情に鑑み、データ群が記憶されたメモリワード群を単位とした取扱いが簡便化された連想メモリを提供することを目的とする。
【0021】
【課題を解決するための手段】
上記目的を達成する本発明の第1の連想メモリは、
多数の格納データを記憶しておき、検索データが入力され、入力された検索データに対応する格納データを検索する連想メモリにおいて、
(1)それぞれが複数の格納データの集合からなる複数のデータ群を構成する各格納データを、各格納データ毎に記憶する複数のメモリワードを備え、
(2)各メモリワードが、各メモリワードに対応する各アドレスを有するとともに、
(3)各データ群を構成する複数の格納データを記憶する複数のメモリワードからなる各メモリワード群が、各メモリワード群に対応する各代表アドレスを有する
ことを特徴とする。
【0022】
ここで、上記本発明の第1の連想メモリにおいて、上記代表アドレスが、その代表アドレスに対応するメモリワード群を構成する複数のメモリワードに対応する複数のアドレスのうちの1つのアドレスであることが好ましい。
また、上記本発明の第1の連想メモリにおいて、上記格納データそれぞれが、該格納データが属するデータ群の中の位置づけを表わす属性と、該属性が付されたデータとのペアからなる場合に、
上記代表アドレスが、その代表アドレスに対応するメモリワード群を構成する複数のメモリワードのうちデータ群を構成する各属性を代表する所定の属性が格納されたメモリワードに対応するアドレスであることが好ましい。
【0023】
一方、上記本発明の第1の連想メモリは、一致が検出された場合にメモリワード群を単位としたアドレスによってその一致が検出されたメモリワード群を知る構成として、以下のように具体化することができる。
すなわち、そのように構成された、本発明の第2の連想メモリは、
多数の格納データを記憶しておき、検索データが入力され、入力された検索データに対応する格納データを検索する連想メモリにおいて、
(4)それぞれが複数の格納データの集合からなる複数のデータ群を構成する各格納データを、該各格納データ毎に記憶する複数のメモリワード
(5)検索時に、入力された検索データに対応する格納データが検出された場合に、各データ群を構成する複数の格納データを記憶する複数のメモリワードからなる各メモリワード群のうち、上記対応する格納データが格納されたメモリワードが属するメモリワード群に対応する代表アドレスを出力するアドレス出力回路を備えたことを特徴とする。
【0024】
ここで、さらに具体的には、上記(5)のアドレス出力回路は、例えば、
(5−1)複数のメモリワードそれぞれに対応して備えられ、検索時に、入力された検索データに対応する格納データが記憶されていた場合に活性化される一致線
(5−2)一致線が接続され、所定の優先順位づけに従って、活性化された一致線に対応するメモリワードの中の1つのメモリワードのアドレスを生成するプライオリティエンコーダ
(5−3)プライオリティエンコーダから出力された上記1つのメモリワードのアドレスを、その1つのメモリワードが属するメモリワード群に対応する代表アドレスに変換するアドレスコンバータ
を備えた構成とすることができる。
【0025】
ここで、上記(5−1)の一致線は、上記(5−2)のプライオリティエンコーダに直接に接続されていてもよく、あるいはフラグレジスタ、ゲート回路、スイッチ等その一致線の信号を保持、変形あるいは伝達する回路を介して上記(5−2)のプライオリティエンコーダに接続されていてもよく、上記の本発明にはそれらの双方の態様が含まれる。
【0026】
この、(5−1)〜(5−3)の構成要件を満足するアドレス出力回路を備えた場合において、上記格納データそれぞれが、該格納データが属するデータ群の中の位置づけを表わす属性と、該属性が付されたデータとのペアからなる場合に、
上記(5−3)のアドレスコンバータが、上記1つのメモリワードのアドレスに、該1つのメモリワードと、該1つのメモリワードが属するメモリワード群を構成する複数のメモリワードのうち、データ群を構成する各属性を代表する所定の属性が格納されたメモリワードとの間の相対アドレスを加算もしくは減算することにより、該メモリワード群に対応する代表アドレスを生成するものであることが好ましい。
【0027】
また、上記第2の連想メモリにおいて、例えば上記格納データそれぞれが、該格納データが属するデータ群の中の位置づけを表わす属性と、該属性が付されたデータとのペアからなり、
上記(5)のアドレス出力回路が、
(5−4)複数のメモリワードそれぞれに対応して備えられ、検索時に、入力された検索データに対応する格納データが記憶されていた場合に活性化される一致線
(5−5)上記属性それぞれに対応して備えられ検索時の属性により選択される、活性化された一致線に対応するメモリワードが属するメモリワード群に対応する代表アドレスを生成する複数のエンコード符号化回路
を具備する構成とすることも好ましい態様である。
【0028】
また、例えば、上記格納データそれぞれが、該格納データが属するデータ群の中の位置づけを表わす属性と、該属性が付されたデータとのペアからなり、
上記(5)のアドレス出力回路が、
(5−6)複数のメモリワードそれぞれに対応して備えられ、検索時に入力された検索データに対応する格納データが記憶されていた場合に活性化される一致線
(5−7)一致線が活性化されたことを表わす情報を入力し、その情報の入力位置に応じたアドレスを生成するエンコード符号化回路
(5−8)検索時の前記属性によって制御され、上記情報を、活性化された一致線に対応するメモリワードのアドレスと、そのメモリワードが属するメモリワード群に対応する代表アドレスとの差分に対応する分だけ入力位置をシフトして前記エンコード符号化回路に入力するスイッチング回路
を具備する構成とすることもできる。
【0029】
また、上記(5)のアドレス出力回路は、例えば、
(5−9)上記メモリワード群を構成する複数のメモリワードにそれぞれ対応して備えられ、検索時に、入力された検索データに対応する格納データが記憶されていた場合に活性化される複数の一致線
(5−10)上記複数のメモリワードにそれぞれ対応しる複数の信号線を有し、検索時に、前記メモリワード群を構成する複数のメモリワードに対応する複数の一致線のうちのいずれか1本の一致線が活性化された場合に、この活性化された一致線に対応するメモリワードに記憶された格納データが属するデータ群を代表する格納データが記憶されたメモリワードに対応する信号線を活性化するゲート回路
(5−11)上記信号線が接続され、所定の優先順位づけに従って、上記活性化された信号線に対応するメモリワードの中の1つのメモリワードのアドレスを生成し、該アドレスを、該1つのメモリワードが属するメモリワード群に対応する代表アドレスとして出力するプライオリティエンコーダ
を備えた構成とすることもできる。
【0030】
ここで、上記(5−10)の信号線は、上述した一致線(上記(5−1))の場合と同様、直接にプライオリティエンコーダに接続されていてもよく、あるいはフラグレジスタ、ゲート回路、スイッチ等、その信号線の信号を保持、変形あるいは伝達する回路を介してプライオリティエンコーダに接続されていてもよい。
【0031】
また、上記(5−9)の一致線と、上記(5−10)の信号線との間には、上記(5−10)のゲート回路のみでなく、例えばフラグレジスタ、他のゲート回路、スイッチ等、一致線の信号を保持、変形あるいは伝達する回路が備えられていてもよい。
この、(5−9)〜(5−11)の構成要件を満足するアドレス出力回路を備えた場合において、
上記格納データそれぞれが、該格納データが属するデータ群の中の位置づけを表わす属性と、該属性が付されたデータとのペアからなり、
上記ゲート回路が、メモリワードに格納された属性がデータ群を構成する各属性を代表する所定の属性であり、かつ、その所定の属性が格納されたメモリワードが属するメモリワード群を構成する複数のメモリワードに対応する複数の一致線のうちのいずれか1本の一致線が活性化された場合に、対応する信号線を活性化するものであることが好ましい。
【0032】
また、前述した本発明の第1の連想メモリは、メモリワード群を単位して、そのメモリワード群が「記憶状態」にあるか「空き状態」にあるかを知るための構成として、以下のように具体化することができる。
すなわち、そのように具体化された、本発明の第3の連想メモリは、
多数の格納データを記憶しておき、検索データが入力され、入力された検索データに対応する格納データを検索する連想メモリにおいて、
(6)それぞれが複数の格納データの集合からなる複数のデータ群を構成する各格納データを、各格納データ毎に記憶する複数のメモリワード
(7)上記複数のメモリワードそれぞれに対応して備えられ、対応するメモリワードが、検索の対象とされる有効な検索データが記憶された記憶状態にあるメモリワードであるか、あるいは有効な検索データが記憶されておらずしたがって上書きが許容される空き状態にあるメモリワードであるかを示すエンプティフラグが記憶されるエンプティフラグレジスタ
(8)上記複数のメモリワードそれぞれに対応する信号線を有し、そのメモリワードに格納された格納データが、その格納データが属するデータ群を代表する格納データであり、かつ、その格納データが格納されたメモリワードに対応する前記フラグレジスタに、空き状態を示すエンプティフラグが記憶されていた場合に、対応する信号線を活性化するゲート回路
(9)上記複数のメモリワードそれぞれに対応する信号線が接続され、所定の優先順位づけに従って、上記ゲート回路により活性化された信号線に対応するメモリワードの中の1つのメモリワードを指定するプライオリティエンコーダ
を備えたことを特徴とする。
【0033】
ここで、上記本発明の第3の連想メモリは、上記格納データそれぞれが、その格納データが属するデータ群の中の位置づけを表わす属性と、属性が付されたデータとのペアからなり、
上記ゲート回路が、メモリワードに格納された属性がデータ群を構成する各属性を代表する所定の属性であり、かつ、その所定の属性が格納されたメモリワードに対応するフラグレジスタに、空き状態を示すエンプティフラグが記憶されていた場合に、対応する信号線を活性化するものであってもよい。
【0034】
【作用】
本発明の第1の連想メモリは、各メモリワードが各アドレスを有するとともに、各メモリワード群が、各代表アドレスを有するものであるため、メモリワード群を単位としてアクセスする場合にはその代表アドレスを用いることにより、あるいは、そのメモリワード群内のいずれかのメモリワードをアクセスする場合には、代表アドレスと、メモリワード群内の相対アドレスを用いることにより、例えば複数のアドレスを1つのメモリワード群に対応づけるような煩雑さが回避され、メモリワード群を単位とした取扱いが簡便化される。
【0035】
メモリワード群に対応する代表アドレスとして、メモリワードに対応するアドレスと全く別体系のアドレスを用いるよりは、そのメモリワード群を構成する複数のメモリワードのアドレスのうちの1つ、例えばそれら複数のアドレスのうちの数値の一番小さいアドレスを代表アドレスとして用いると、メモリワードのアドレスとメモリワード群のアドレスとがリンクされた解りやすいアドレス体系となる。
【0036】
また、格納データが、属性とその属性が付されたデータとから成る場合、その属性のうちの所定の属性、例えば数値の一番小さい属性が格納されたメモリワードのアドレスをそのメモリワードが属するメモリワード群の代表アドレスとすると、メモリワードに格納データを記憶させることにより自動的に代表アドレスが定義される回路構成とすることができる。
【0037】
また、本発明の第2の連想メモリは、上記(5)の、代表アドレスを出力するアドレス出力回路を備えたため、外部で複数のアドレスと1つのメモリワードとを対応づけるような煩雑な操作を行う必要がなく、メモリワード群を単位とした取扱いが簡便化され、使い勝手の良い連想メモリとなる。
尚、一連の検索の最後で一致が検索されたか否かは、各メモリワード群毎に、たかだか一本の一致線のみから出力される。したがってメモリワード群を構成する複数のメモリワードに対応する複数の一致線がすべてプライオリティエンコーダに接続されていても、本発明の第3の連想メモリにおける、空き状態にあるメモリワード群を認識するときとは異なり、一致が検出されたメモリワード群を認識するのに余計な時間がかかるわけではない。
【0038】
また、本発明の第3の連想メモリは、各メモリワードに対応して備えられたエンプティフラグレジスタの出力を、そのメモリワードが、1つのデータ群が格納されるメモリワード群を代表するメモリワードであるか否かを判定するゲート回路を介してプライオリティエンコーダに入力する機能を備えているため、プライオリティエンコーダでは、各メモリワード群毎に空き状態にあるか否かが判定され、各メモリワード群が空き状態にあるか否かの検索が高速化され、データ書き込みの速度が向上する。
【0039】
【実施例】
以下、本発明の実施例について、先願の、特願平5−248121号を参考に詳述する。
尚、本発明の第2の連想メモリの実施例あるいは本発明の第3の連想メモリの実施例は、すなわち、本発明の第1の連想メモリの実施例であるため、以下では本発明の第2の連想メモリの実施例と本発明の第3の連想メモリの実施例について説明する。
【0040】
図6は、上記先願に係る連想メモリの一例を示すブロック図である。図11に示す連想メモリの各構成要素と同一の構成要素には、図11に付した符号と同一の符号を付して示し、相違点についてのみ説明する。
各メモリワード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には、それぞれ、図12に示す群番号1に属する、属性I,データ‘A’、属性II,データ‘B’、属性III,データ‘C’、属性IV,データ‘D’が格納されている。また各メモリワード11_5,11_6,…には、それぞれ、図6に示す群番号2に属する、属性I,データ‘C’、属性II,データ‘F’、……が格納されている。また検索にあたっては、属性とデータとのペアからなる検索データREF_DATAが入力される。
【0041】
各メモリワード11_1,11_2には、そこに記憶された格納データ(属性及びデータの双方)が、入力された検索データ(属性及びデータの双方)と一致しているときに一致信号が出力される一致線14_1,14_2,…のほか、属性のみの一致不一致の信号が出力される属性一致線30_1,30_2,…が備えられている。尚、属性のみの一致も、属性及びデータの双方の一致も、従来の一致検出回路と同様に構成され、従来の一致検出回路は連想メモリの分野において極めて一般的な技術であるため、ここでの図示および説明は省略する。
【0042】
各メモリワード11_1,11_2に対応して第3のフラグレジスタ31_1,31_2,…が備えられており、各属性一致線30_1,30_2,…は対応する第3のフラグレジスタ31_1,31_2,…のデータ入力端子に延びている。また、この連想メモリには、図12に示す各データ群に属するデータが格納された複数のメモリワードからなるメモリワード群それぞれについて1本ずつデータ線32_1,32_2,…が備えられており、またデータ線32_1,32_2,…と各第2のフラグレジスタ24_1,24_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,…の信号をラッチする。
またデータ線32_1,32_2,…と各オアゲート21_1,21_2,…の入力端子との間に各第2のスイッチ34_1,34_2,…が備えられており、これら各第2のスイッチ34_1,34_2,…は、対応する属性一致線30_1,30_2,…の信号により、その信号が一致を表わす論理‘1’のときに導通状態、不一致を表わす論理‘0’の時に遮断状態となるように制御される。この遮断時における各オアゲート21 1,21 2,…の入力レベルの安定化のために、この部分にプルダウン抵抗を入れるか、あるいは他の回路方式を採用してもよい。尚、この図6に示す連想メモリには、図5に示す連想メモリと異なり、図示の最上段のメモリワード11_1に対応するアンドゲート20_1の前段にもオアゲート21_1が備えられている。
【0043】
以上のように構成された連想メモリにおいて、一致検索は以下のようにして行われる。
1ワード分の単独のデータ検索、および連続した複数ワードの検索のうち第1回目の検索は、図11に示した従来のワード拡張機能付連想メモリの場合と同じであるためここでは説明は省略し、ここでは第1回目の検索において属性IIとデータ‘B’とからなる検索データREF_DATAによってメモリワード11_2に対応する第1および第2のフラグレジスタ23_2,24_2に論理‘1’がラッチされたものとする。このとき、属性の一致を受けてメモリワード11_2に対応する属性一致線30_2に論理‘1’の信号が出力され、これにより、対応する第3のフラグレジスタ31_2にも論理‘1’の信号がラッチされ、対応する第1のスイッチ33_2がオンし、対応する第2のフラグレジスタ24_2に格納された、属性及びデータ双方の一致を表わす論理‘1’の信号がデータ線32_1に出力される。またこれとともに、対応する第2のスイッチ34_2もオンするが、第1回目の検索においてはこれは無用の動作である。
【0044】
次に、属性IVとデータ‘D’からなる検索データREF_DATAを入力して検索を行うものとする。このときは、図11の連想メモリの場合と同様、初回検索制御線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はオフする。
【0045】
これにより、メモリワード11_4に対応する第2のフラグレジスタ24_4の論理‘1’の信号が出力線100 4を介してプライオリティエンコーダ16(図10参照)に入力され、メモリワード11_4のアドレスが得られることになるが、メモリワード11_4には属性IVが格納されていることは予め分かっており、同一群内の例えば属性IIIのデータを読み出したいときは、得られたアドレスから1を引いてメモリワード11_3のアドレスを求め、そのアドレスをアドレスデコーダ17に入力してメモリワード11_3の内容を読み出せばよい。
【0046】
一方、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については属性が一致せず、したがって属性及びデータの双方も一致しない。
【0047】
以上のようにして、図6に示す連想メモリでは、同一の群内においては、互いに離れたメモリワードに記憶されたデータであっても、もしくはデータの順序を逆にして検索した場合であっても、検索を行うことができる。
ここで、図6に示す連想メモリにおけるデータ線32_1,32_2,…,は、1つの群に属するデータの数が予め定まっているものとしてその長さが固定されたものであるが、このように固定長のデータ線を備えると、1つの群に属するデータの数の最大を見積もり、最大のデータ数に対応した長さのデータ線を備える必要がある。これではその最大よりも少ない数のデータによりデータ群が構成される場合に無駄なメモリワードが発生することになる。そこで、1つの群に属するデータの数に合せてデータ線を可変長とすることが好ましい。
【0048】
図7は、可変長のデータ線を実現する一つの方式を示した模式図である。
データ線32が複数のメモリワード11_1,11_2,11_3,…に亘って延び、そのデータ線32には、最上端のメモリワード11_1を除く他のメモリワード11_2,11_3,…それぞれに対応する各スイッチ40_2,40_3,…が互いにシリーズに配置されている。これらの各スイッチ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のスイッチ制御信号によりオンし、残りのスイッチのうち8つおきのスイッチ40_5,…は第3制御線43に出力される第3のスイッチ制御信号によりオンされる。
【0049】
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…毎に切断されたデータ線が形成される。
【0050】
この方式によれば、1つのデータ群を構成するデータの数が2のべき乗(=2 )の場合はメモリワードに空きは生じないが、それ以外の、例えば3,5,6等の場合空きのメモリワードが生じてしまうことになる。この空きのメモリワードが生じないように多数のスイッチ40_2,40_3,…を任意にオン,オフできるように構成すると、制御線の本数が多数本となり、またそれらの制御線にスイッチ制御信号を出力する制御回路が複雑となる。したがって、図7に示す方式は、データ線の長さを完全に任意に制御するには不向きである。
【0051】
図8は、可変のデータ線を実現するもう一つの方式を示した模式図である。
多数のメモリワードに亘ってデータ線32が延び、そのデータ線32に互いにシリーズに接続された、最上端のメモリワードを除く他のメモリワードそれぞれに対応する各スイッチ40_2,40_3,40_4,…が備えられている点は図7の場合と同じである。各メモリワードには、各属性格納部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のデータを配置することにより、自動的に過不足ない数のメモリワード毎に切断されたデータ線が形成されることになる。
【0052】
図9は、属性がIかそれ以外かを判定する属性判定回路の一例を示す回路図である。
ここでは属性Iに‘000’が割り当てられており、属性格納部11_i_1に格納された属性が属性I(‘000’)の場合オアゲートから‘0’が出力され、したがってトランジスタ40で構成されたスイッチはオフ状態となり、そのトランジスタ40’の両側のデータ線が電気的に切断される。属性格納部11_i_1に格納された属性が属性I以外の属性の場合はオアゲートから‘1’が出力され、トランジスタ40はオン状態となり、そのトランジスタの両側のデータ線が接続される。
【0053】
このように、図6に示す連想メモリにおいて、1つのデータ群を構成するデータの数に応じてデータ線32_1,32_2,…の長さを調整することもできる。もちろん、属性データを利用するのではなく、専用の制御フラグを1ビット設け、それによってスイッチを制御することによりデータ線の長さを調整してもよい。特に、制御専用のフラグビットを設けた場合、属性格納部11 1,11 1,…等の値を自由に選択できる長所があり、図12に示される群構造データの構成が更に容易になる。
【0054】
群構造のデータを記憶しておいて一致検索を行う連想メモリにおいては、一致検索の結果知りたいのは一致したデータ群が記憶されたメモリワード群のアドレスである。ところが、上記のような連想メモリでは、多数のメモリワードそれぞれに対応して一致線が備えられ、それら多数本の一致線がすべて平等に取り扱われており、一致検索の結果出力されるのは、例えば一連の検索を行ったときの最後に一致が検出されたメモリワードのアドレスである。
【0055】
したがってこの場合、どの複数のアドレスが1つのメモリワード群に対応しているかを外部で管理する必要があり、その管理が極めて煩わしいという問題がある。
そこで、この管理を容易化し得る手法に関して、以下に具体的に述べる。
図1は、本発明の第2の連想メモリの第1実施例の、本発明に特徴的なプライオリティエンコーダ55の部分のみを取出して示した回路図である。
【0056】
各メモリワード(図6参照)に対応して備えらえた各一致線14_1,14_2,…,14_nからの信号は、フラグレジスタ23_1,24_1;23_2,24_2;…等を介してプライオリティエンコーダ55に接続されている。
プライオリティエンコーダ55からは、エンコードパルスEPの入力に応じて、活性化された一致線に対応したアドレスが出力される。このアドレスは、特定のメモリワードに対応したアドレスであり、そのメモリワードが属するメモリワード群の代表アドレスとは限らない。
【0057】
プライオリティエンコーダ55から出力されたアドレスは、本発明にいうアドレスコンバータの一例である減算器56に入力される。この減算器56には、検索データを構成する属性を表わす数値(属性I,II,III,IVに応じてそれぞれ‘000’,‘001’,‘010’,‘011’(2進数));これを属性データATT_DATAと称する)も入力され、減算器56では、プライオリティエンコーダ55から出力されたアドレスからその直前に検索された属性データの値を減算する。これにより常に、プライオリティエンコーダ55から出力されるアドレスは、対応するメモリワードが属するメモリワード群の代表アドレスADとなる。すなわち、属性データATT_DATAはメモリワード群内の相対アドレスを表わしており、ここでは、そのメモリワード群を構成する複数のメモリワードのアドレスのうち値の一番若いアドレスを、そのメモリワード群の代表アドレスとしている。
【0058】
図2は、本発明の第2の連想メモリの第2実施例のプライオリティエンコーダ55を示した図である。
第1実施例と異なる点は、このプライオリティエンコーダ55の構成にある。つまり、第1の実施例では、エンコード出力したアドレスに対して、その直前になされた検索の属性データの値を減算することで、そのメモリワード群を構成する複数のメモリワードのアドレスのうち値の一番若いアドレスを代表アドレスとしている。ところが、この減算のために、Δtの処理時間が必要となる。そこでこの減算時間をなくすことを目的としたものが、本実施例である。つまり、図2に示すように、プライオリティエンコーダ55内に属性データの種類に相当するエンコーダ55 a,55 b,55 cを設けておき、直前の検索がどの属性であったかによって、どのエンコーダ55 a,55 b,55 cを選択するかを決め、その出力からエンコードアドレスADを得るものである。
【0059】
例えば、図中の出力線100 2が1であり、その直前の検索が属性II(‘001’)に対して行なわれた場合は、ATT DATAによりエンコーダ55
bが選ばれる。
このエンコーダ55 bの出力線100 2に対応する値は‘0’であり、この値がADとして出力される。即ち、この出力線100 2のメモリワードが属するメモリワード群の一番若いアドレス‘0’が出力されたことになる。
【0060】
ここで、このエンコーダ55 bの選択は、エンコードが始まる前の直前の検索時に既にATT DATAにより決定されており、第1の実施例のようなプライオリティエンコーダ55以外の減算器56のような遅延は不必要となる。
更に、図3に第3実施例を示す。これもまた、プライオリティエンコーダ55の構成にその特徴がある。
【0061】
図2は、図1に比べて減算器56の遅延はないが、エンコーダ55 a,55 b,55 cを属性の種類だけ容易することが必要となり、ハードウェアの面積が増加してしまう。そこで、この点を改良したものが図3である。
プライオリティエンコーダ55の入力となる出力線100 1,100 2,…,100 nとエンコーダ55 eの間に、スイッチング回路55 sが設けられている。
【0062】
このスイッチング回路55 sをATT DATAにより制御し、エンコーダ55 eへの接続位置を変えることを特徴としている。
例えば、出力線100 iのものは、スイッチング回路55 sにより、エンコーダ55 eの(i−k)〜(i−1)のいずれかを選択出力可能となっている。
【0063】
ただし、ここでkはエンコードの直前に行なわれた検索の属性の値を示すものであり、0≦i≦n,i≧kの条件を満たすものである。
そこで、属性がkの時は、エンコーダ55 eの出力は、i−kとなり、出力線100 iのメモリワードが属するメモリワード群の内最も若いアドレスを出力することになる。
【0064】
このような構成をとることで、エンコードアドレスADを得るための遅延時間を最小にし、且つハードウェア面積をも最小とすることが可能となる。
また、次の実施例は、プライオリティエンコーダ55へ入ってくる検索結果の出力に新たな改善を加えたものである。
図4は、本発明の第2の連想メモリの第4実施例の、本発明に特徴的な検索結果の出力部分のみを取出して示した回路図である。
【0065】
ここには、図6に示すデータ線32_1,32_2,…と同一のデータ線32_1,32_2,…が示されており、このデータ線32_1,32_2,…には、図6を参照して説明したように、一致線14_1,14_2,…の信号がアンドゲート20_1,20_2,…、フラグレジスタ23_1,24_2;23_2,24_2;…、スイッチ33_1,33_2,…を介して伝達されている。
【0066】
また、この図4には、属性格納部11_1_1,11_2_1,…が示されており、各属性格納部に格納された属性が属性I(‘000’)の場合(図4の場合は、属性格納部11_1_1と、属性格納部11_5_1に属性I(‘000’)が格納されている)、対応するノアゲート57_1,57_2,…(図4の場合、ノアゲート57_1とノアゲート57_5)から論理‘1’が出力される。各ノアゲート51_1,51_2,…の出力は、それぞれ、対応するアンドゲート58_1,58_2,…に、その一方の入力端子から入力される。
【0067】
また各アンドゲート58_1,58_2,…の他方の入力端子には、対応するメモリワードが属するメモリワード群に対応するデータ線32_1,32_2,…が接続されている。また、各アンドゲート58_1,58_2,…の出力端子は、各信号線59_1,59_2,…により、プライオリティエンコーダ60と接続されている。
【0068】
図6を参照して説明したように、データ線32_1,32_2,…には、対応するメモリワード群を構成する何れかのメモリワードで一致が検出された場合に一致信号(論理‘1’)が出力される。したがって各アンドゲート58_1,58_2,…からは、対応するメモリワードに属性I(‘000’)が格納されており、かつ、その対応するメモリワードが属するメモリワード群のうちのいずれかのメモリワードで一致が検出された場合に、プライオリティエンコーダ60に論理‘1’の出力し、それ以外の場合、すなわち、対応するメモリワードが属するメモリワード群を構成するいずれのメモリワードでも一致が検出されなかったか、あるいは、一致が検出されても、対応する属性が属性I(‘000’)以外の属性の場合は、プライオリティエンコーダ60に論理‘0’を出力する。このようにして、プライオリティエンコーダ60には、一致が検出されたメモリワード群を構成する複数のメモリワードのうちの先頭のメモリワードに対応するアンドゲードのみから、一致が検出された旨を表わす論理‘1’の信号が入力される。したがってプライオリティエンコーダ60からは、エンコードパルスEPに従って、一致が検出されたメモリワード群の先頭アドレスが、代表アドレスADとして出力されることになる。
【0069】
尚、図4に示す実施例では、各データ群が格納されたメモリワード群の区切りのための情報として属性データが用いられているが、本発明の第3の連想メモリは、本発明の第2の連想メモリと同様、属性データを用いるものに限られるものではなく、例えば図7に示すように制御信号によってメモリワード群の区切りを定める場合にその制御信号を用いてもよいし、制御専用のフラグビットを用いてもよいことはいうまでもない。特に、制御専用のフラブビットを設けた場合、属性格納部11 1,11 1,…等の値を自由に選択できる長所があり、図12に示される群構造データの構成が更に容易になる。
【0070】
また、以上は、検索結果の代表アドレスを求めることに関して述べられているが、連想メモリの場合、もう一つ重要なアドレスとしてデータ空きエリアのエンプティアドレスがある。以下に、この管理方法について説明する。
ただし、このエンプティアドレスに関しては、検索する属性によってその位置が変化することはなく、この点が検索結果の代表アドレスを求めることと比べ少し異なる点である。
【0071】
エンプティとは、あるメモリワードが、そのメモリワードに、検索の対象とされる有効な検索データが記憶された「記憶状態」にあるメモリワードであるか、あるいは有効な検索データが記憶されておらずしたがって上書きが許容される「空き状態」にあるメモリワードであるかを区別するためのものであり、フラグが格納されるエンプティフラグレジスタが、各メモリワードに対応して備えられている。検索の際は、そのエンプティフラグレジスタに、対応するメモリワードが記憶状態にあることを示すフラグが記憶されていた場合に、そのメモリワードが検索の対象とされ、エンプティフラグレジスタに、対応するメモリワードが空き状態にあることをあらわすフラグが記憶されていた場合にはそのメモリワードは検索の対象から外される。
【0072】
上述したように各メモリワードに属性とデータとの双方が格納される場合、メモリワードが記憶状態にあるか空き状態にあるかは各データ群が格納されたメモリワード群毎に行えば充分であるが、図7,図8に示すようにメモリワード群の区切りがあらかじめ定められておらず、制御信号ないし属性によりメモリワード群の区切りを定める場合、どこが区切りとなるかあらかじめはわからないため、エンプティフラグレジスタは、上記のように、各メモリワード毎に備えられる。
【0073】
それらのエンプティフラグレジスタは、プライオリティエンコーダに接続されており、メモリワードに新たなデータを書き込もうとする際、そのプライオリティエンコーダで空き状態のメモリワードのアドレスを得、そのアドレスのメモリワードに所望のデータが書き込まれるが、本来、各データ群を格納するメモリワード群毎に空き状態にあるか否かを判定すればよいところ、各メモリワード毎のエンプティフラグレジスタがプライオリティエンコーダに接続されていると、そのプライオリティエンコーダにエンコードパルスEP(図10参照)をいくつも入力して空き状態にある所望のメモリワード群を選択する必要があり、データの書き込みの手順が複雑となり、またデータの書き込みに時間がかかるという問題がある。
【0074】
図5は、本発明の第3連想メモリの一実施例の、本発明に特徴的な部分のみを取出して示した回路図である。
図12に示すデータ構造を持つデータが格納されるものとし、属性Iに‘000’が割り当てられるものとする。このとき属性格納部11_1_1,11_2_1,…,11_k_1,…に格納された属性が属性I(‘000’)の場合(図5の場合は、属性格納部11_1_1と属性格納部11_k_1に属性I(‘000’)が格納されている)、対応するノアゲート51_1,51_2,…,51_k,…(図5に図示の場合、ノアゲート51_1とノアゲート51_k)から論理‘1’が出力される。各ノアゲート51_1,51_2,…,51_k,…の出力は、それぞれ、対応するアンドゲート52_1,52_2,…,52_k,…に、その一方の入力端子から入力される。
【0075】
また各メモリワード(図5には図示せず)に対応して備えられたエンプティフラグレジスタ53_1,53_2,…,53_k,…には、そのエンプティフラグレジスタ53_1,53_2,…,53_k,…に対応するメモリワードが空き状態にあることを示す論理‘1’、もしくはそのメモリワードに検索の対象となる有効なデータが格納されていることを示す論理‘0’が格納されており、各エンプティフラグレジスタ53_1,53_2,…,53_k,…に格納されている論理‘1’又は論理‘0’のデータは、対応するアンドゲート52_1,52_2,…,52_k,…のもう一方の入力端子から入力される。アンドゲート52_1,52_2,…,52_k,…の出力はプライオリティコーダ54に入力される。
【0076】
プライオリティコーダ54にはエンコードパルスEPが入力され、エンコードパルスEPが入力される毎に、所定の優先順位に従って、論理‘1’が出力されているアンドゲート52_1,…に対応するメモリワードのアドレスADが順次出力される。
図5に示すように構成すると、属性格納部11_1_1,11_2_1,…,11_k_1,…に属性Iを表わす‘000’が格納されており、かつエンプティフラグレジスタ53_1,53_2,…,53_k,…に空き状態を表わす論理‘1’が格納されている場合のみプライオリティエンコーダ54に論理‘1’が入力され、属性格納部11_1_1,11_2_1,…,11_k_1に属性I以外の属性が格納されているか、あるいはフラグレジスタ53_1,53_2,…,53_k,…に、対応するメモリワードに有効なデータが格納されていることを示す論理‘0’が格納されている場合には、プライオリティエンコーダ54には、論理‘0’が入力される。
【0077】
このようにプライオリティエンコーダ54には、各データ群を代表する、属性Iのデータが格納されたメモリワードについてのみ、そのメモリワードが空き状態にあるときに論理‘1’が入力されるため、エンコードパルスEPを入力して所望のメモリワードのアドレスを得る際のシーケンスが簡単化され、所望のメモリワードへのデータ書込み速度が向上する。
【0078】
また、このように構成することで、有効なデータ群が書き込まれている一連のメモリワードのうち、属性Iのデータが書き込まれているメモリワードのエンプティフラグ1ビットの値を変化させるだけで、その一連のメモリワードを空き状態にすることが可能となり、データの消去が極めて効率的に行なわれる。
尚、図5に示すプライオリティエンコーダ54は、図1に示すプライオリティエンコーダ16と比較し、データの書込みにあたり空き状態にあるメモリワードのアドレスを得るか検索の結果一致が検出されたメモリワードのアドレスを得るかという点が相違するのみであって、その構造は共通である。
【0079】
また、図5に示す実施例では、各データ群が格納されたメモリワード群の区切りのための情報として属性データが用いられているが、これに限られるものではなく、例えば図7に示すように制御信号によってメモリワード群の区切りを定める場合にその制御信号を用いてもよいし、制御専用のフラグビットを用いてもよいことはいうまでもない。
【0080】
【発明の効果】
以上説明したように、本発明の第1の連想メモリによれば、各メモリワード群が各代表アドレスを有するものであるため、メモリワード群(データ群)を単位とした取扱いが容易になる。
また、本発明の第2の連想メモリは、上記第1の連想メモリを、一致が検出されたメモリワード群のアドレスの生成に特化したものであり、外部で複数のアドレスと1つのメモリワードとを対応づけるような煩雑な操作を行う必要がなく、メモリワード群を単位とした取扱いが簡便化され、使い勝手の良い連想メモリが構成される。
【0081】
さらに、本発明の第3の連想メモリは、上記第1の連想メモリを、空き状態にあるメモリワード群のアドレスの生成に特化したものであり、各データ群が格納された各メモリワード群を代表するメモリワードのみ、空き状態にあるか否かのデータをプライオリティエンコーダに入力するようにしたため、メモリワード群毎に空き状態にあるか否かが判定され、データを書込むメモリワードのアドレスを高速に検索することができる。
【図面の簡単な説明】
【図1】本発明の第2の連想メモリの第1実施例の、本発明に特徴的な部分を取出して示した回路図である。
【図2】本発明の第2の連想メモリの第2実施例の、本発明に特徴的な部分を取出して示した回路図である。
【図3】本発明の第2の連想メモリの第3実施例の、本発明に特徴的な部分を取出して示した回路図である。
【図4】本発明の第2の連想メモリの第4実施例の、本発明に特徴的な部分を取出して示した回路図である。
【図5】本発明の第3の連想メモリの一実施例の、本発明に特徴的な部分を取出して示した回路図である。
【図6】連想メモリの一例を示すブロック図である。
【図7】可変長のデータ線を実現する一つの方式を示した模式図である。
【図8】可変のデータ線を実現するもう一つの方式を示した模式図である。
【図9】属性判定回路の一例を示す回路図である。
【図10】連想メモリの一例を表わした回路ブロック図である。
【図11】データ拡張機能を備えた連想メモリの一例を示すブロック図である。
【図12】群構造のデータの一例を示す図である。
【符号の説明】
11_1,11_2,… メモリワード
11_1_1,11_2_1,… 属性格納部
11_1_2,11_2_2,… データ格納部
14_1,14_2,… 一致線
16 プライオリティエンコーダ
17 アドレスデコータ
18_1,18_2,… ワード線
20_1,20_2,… アンドゲート
21_1,21_2,… オアゲート
23_1,23_2,… 第1のフラグレジスタ
24_1,24_2,… 第2のフラグレジスタ
25 一致結果ラッチ制御線
30_1,30_2,… 属性一致線
31_1,31_2,… 第3のフラグレジスタ
32_1,32_2,… データ線
33_1,33_2,… 第1スイッチ
34_1,34_2,… 第2スイッチ
51_1,51_2,… オアゲート
52_1,52_2,… アンドゲート
53_1,53_2,… フラグレジスタ
54,55,60 プライオリティエンコーダ
56 減算器
[0001]
[Industrial applications]
The present invention provides an associative function having a function of extending the data width for performing a match search to a plurality of words, that is, a function of detecting a match as a whole when a match is detected in a plurality of successive searches. Regarding memory.
[0002]
[Prior art]
Conventionally, each digital data is stored in each of a plurality of arranged memory words, search data is input, and the input search data has a bit pattern that matches all or a predetermined part of the bit pattern. 2. Description of the Related Art An associative memory (Content Addressable Memory) for searching a memory word in which digital data is stored has been proposed.
[0003]
FIG. 10 is a circuit block diagram illustrating an example of the associative memory.
The associative memory 10 is provided with a large number of memory words 11_1, 11_2,..., 11_n composed of m-bit memory cells arranged in the horizontal direction in FIG. The associative memory 10 includes a search data register 12 into which one-word search data is input and latched. The bit pattern of all or a predetermined part of the search data latched in the search data register 12 and each memory word .., 11_n are compared with the bit patterns of the portions corresponding to the bit patterns in the stored data, and are provided corresponding to the respective memory words 11_1, 11_2,..., 11_n. , 14_n corresponding to the memory words 11_1, 11_2,..., 11_n having the same bit pattern as the logic lines “1”, 14_2,. ) Is output. The other matching lines 14_1, 14_2,..., 14_n remain at logic ‘0’ (here, 0V).
[0004]
, 14_n are connected to the priority encoder 16 via output lines 91, 92,..., N of the respective flag registers 15_1, 15_2,. , 14_n are stored in the flag registers 15_1, 15_2, ..., 15_n. Here, as an example, as shown, '0', '1', '1', '0', ..., '0', '0' are stored in the flag registers 15_1, 15_2, ..., 15_n, respectively. It shall have been done. The signals stored in the flag registers 15_1, 15_2,..., 15_n are input to the priority encoder 16. The encode pulse EP is input to the priority encoder 16 and each time the encode pulse EP is input, a flag register (here, a flag register 15_2 and a flag register 15_2) storing a signal of logic '1' in accordance with a predetermined priority order. The address signal AD corresponding to the flag register having the higher priority among the two registers 15_3) is sequentially output. Here, the smaller the suffix, the higher the priority. Therefore, when only one encode pulse EP is input, the memory address corresponding to the flag register 15_2 is output. The address signal AD output from the priority encoder 16 is input to the address decoder 17 as needed. The address decoder 17 decodes the input address signal AD, and inputs the input address of the word lines 18_1, 18_2,..., 18_n provided corresponding to the respective memory words 11_1, 11_2,. An access signal (here, a logical “1” signal) is output to any one of the word lines (here, the word line 18_2) corresponding to the signal AD. Thereby, the stored data stored in the memory word 11_2 corresponding to the word line 18_2 to which the access signal has been output is read out to the output register 19.
[0005]
Next, when another encode pulse EP is input, the address of the memory word 11_3 corresponding to the flag register 15_3 can be obtained.
As described above, the associative memory 10 searches the stored data stored in the many memory words 11_1, 11_2,..., 11_n using all or a predetermined part of the search data, and This is a memory configured to be able to obtain the address of a memory word and to read out the entire data stored in the memory word as needed.
[0006]
In the associative memory having the basic configuration as described above, a technique has been proposed in which the data width to be searched for a match is extended to two or more words.
FIG. 11 is a block diagram illustrating an example of an associative memory having a data extension function. The components corresponding to the components of the associative memory shown in FIG. 10 are denoted by the same reference numerals as those in FIG. 10, and redundant description of the components will be omitted.
[0007]
Each of the match lines 14_1, 14_2,... Extending from each of the memory words 11_1, 11_2,... Is connected to one input terminal of each of the AND gates 20_1, 20_2,. Are connected to the other input terminals of the AND gates 20_1, 20_2,..., Respectively, and one input terminal of each OR gate 21_2, 21_3,. 22. However, the OR gate corresponding to the uppermost AND gate 20_1 in the figure is omitted, and the first search control line 22 is directly connected to the input terminal of the AND gate 20_1.
[0008]
The output terminal of each AND gate 20_1, 20_2,... Is connected to the data input terminal of each first flag register 23_1, 23_2,..., And the output terminal of each first flag register 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 priority encoder 16 (not shown in FIG. 11) shown in FIG. 10, and the OR gate 21_2 corresponding to the memory word adjacent to the lower part in FIG. , 21_3,....
[0009]
Each pair of the first and second flag registers 23_1, 24_1; 23_2, 24_2,... Corresponds to each flag register 15_1, 15_2,.
The first flag registers 23_1, 23_2,... And the second flag registers 24_1, 24_2,... Both receive the match result latch signal S1 output to the match result latch control line 25, and the match result latch signal. The input data input from each data input terminal is latched by S1, but the first flag registers 23_1, 23_2,... Latch the input data at the time of the rising edge a of the match result latch signal 51, and the second flag register 23_1, 23_2,. The input data at the time of the falling b of the match result latch signal S1 is latched in the flag registers 24_1, 24_2,.
[0010]
In the associative memory configured as described above, a match search is performed as follows. Here, as shown in the figure, each of the memory words 11_1, 11_2, 11_3, 11_4, 11_5, 11_6,... Stores stored data A, B, C, D, C, F,. I do.
Here, when each stored data is searched independently, the first search timing signal S2 is output to the first search control line 22 when the search is performed by inputting the search data REF_DATA. Here, assuming that data 'B' is input as search data REF_DATA, a match signal of logic '1' is output to match line 14_2 corresponding to memory word 11_2 storing data 'B', and AND gate 20_2 is output. The first search timing signal S2 is also input to the AND gate 20_2 via the OR gate 21_2, so that a signal of logic “1” is output from the AND gate 20_2. Also, at this time, a signal of logic '0' is output to the other matching lines 14_1; 14_3, 14_4,..., And the corresponding AND gates 20_1; 20_3, 20_4,. A signal is output.
[0011]
The signal of logic “1” output from the AND gate 20_2 is latched by 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 latch control line 25, and the subsequent match result The signal is latched by the second flag register 24_2 at the timing of the falling b of the latch signal S1.
[0012]
Further, at each timing when the 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,. Registers 24_1; 24_3, 24_4,... Latch a signal of logic “0”.
The signals of logic '0', '1', '0',... Latched in the second flag registers 24_1, 24_2, 24_3,... Are input to the priority encoder 16 shown in FIG. The address signal AD of the word 11_2 is obtained.
[0013]
Next, a case in which a search with an extended data width is performed will be described. Here, a case will be described in which two-word data consisting of data "B" and data "C" expanded to two words is searched.
In this case, a search for data "B" is first performed in the same manner as described above. As a result, the signal of logic “1” is latched in the first and second flag registers 23_2 and 24_2 corresponding to the memory word 11_2. Next, a search is performed by inputting data 'C' as search data REF_DATA. At this time, the first search control line 22 does not output the first search timing signal S2, and the first search control line 22 has a logic '0'. Keep in the state. When data “C” is input as search data REF_DATA and a search is performed, a match signal of logic “1” is output to match lines 14_3 and 14_5 corresponding to the two memory words 11_3 and 11_5 shown in FIG. Since the signal of logic '1' latched in the second flag register 24_2 is input to 21_3, the match signal on the match line 14_3 passes through the AND gate 20_3, and the first and second flag registers 23_3 , 24_3, a signal of logic '1' indicating a match is latched. On the other hand, since the signal of logic '0' latched in the second flag register 24_4 is input to the OR gate 21_5, the match signal of the match line 14_5 is cut off by the AND gate 20_5, and the first and second flag registers 23_5 and 24_5 are latched with a signal of logic '0' indicating mismatch. In this way, two-word data consisting of a pair of data 'B' and data 'C' is detected as coincident. Match detection of data of three or more words is performed in the same manner.
[0014]
However, although the associative memory shown in FIG. 11 has a data width extending function, data extended to two words, three words, etc., need to be stored in memory words adjacent to each other in a predetermined order. In the case where a plurality of data to be searched are stored in memory words separated from each other or in the reverse order, for example, in the order of data 'C' and data 'B', a plurality of data are stored. No combined match detection is possible.
[0015]
FIG. 12 shows a data structure when such a search is required. FIG. 12 shows a data structure in which four data to which attributes I, II, III, and IV are respectively attached form a data group. To clarify the concepts of the data group and the attribute, for example, each data group of each group number 1, 2, 3, 4,... Is data belonging to each individual, and the attribute I is The name and attribute II indicate the date of birth of the person, and the attribute III indicates the address,...
[0016]
When a data group consisting of a plurality of data to which the attributes I, II, III, and IV are assigned is stored in an associative memory and a search is performed, for example, a data group with a group number 1 is searched. For example, the search for the data "A" and the search for the data "B" are performed in this order, and not only the remaining data "C" and "D" of the matching data group are read, but also the data "A". If you want to read the remaining data 'B' and 'C' by searching for 'and data' D ', or search for data' B 'first, then search for data' A ' Sometimes you want to.
[0017]
However, such a search is impossible in the associative memory having the word width expansion function described above (see FIG. 11). Further, in the above-mentioned associative memory, when data "A" and data "B" are searched, data "A" and data II with attribute I in the column of group number 1 shown in FIG. Can be distinguished from the pair of the data "B" with the attribute II and the data "B" with the attribute II and the data "B" with the attribute III in the column of the group number 4. For example, based on the information of the attribute I of "name" and the information of attribute II of "date of birth", even if the user tries to know the information of the attributes III and IV of a specific individual matching them, Even in the case of a pair, noise other than necessary information is mixed, for example, a match is detected.
[0018]
To solve such a problem, Japanese Patent Application No. 5-248121 has proposed a new associative memory that enables searching for discontinuous attributes.
[0019]
[Problems to be solved by the invention]
However, in this associative memory, when data in a series of data groups is searched, for example, for each attribute, management of matching or mismatching addresses becomes complicated, and a memory word group in which the data groups are stored is taken as a unit. There is a problem that complicated handling is complicated.
[0020]
The present invention has been made in view of the above circumstances, and has as its object to provide an associative memory in which handling in units of memory words in which data groups are stored is simplified.
[0021]
[Means for Solving the Problems]
A first associative memory of the present invention that achieves the above object,
In an associative memory that stores a large number of stored data, search data is input, and searches for stored data corresponding to the input search data,
(1) A plurality of memory words for storing a plurality of stored data, each forming a plurality of data groups each including a set of a plurality of stored data, for each of the stored data,
(2) each memory word has an address corresponding to each memory word,
(3) Each memory word group consisting of a plurality of memory words storing a plurality of stored data constituting each data group has each representative address corresponding to each memory word group.
It is characterized by the following.
[0022]
Here, in the first associative memory of the present invention, the representative address is one of a plurality of addresses corresponding to a plurality of memory words forming a memory word group corresponding to the representative address. Is preferred.
Further, in the first associative memory of the present invention, when each of the stored data includes a pair of an attribute indicating a position in a data group to which the stored data belongs and data to which the attribute is attached,
The representative address may be an address corresponding to a memory word storing a predetermined attribute representing each attribute forming a data group among a plurality of memory words forming a memory word group corresponding to the representative address. preferable.
[0023]
On the other hand, the first associative memory of the present invention is embodied as follows, in a case where a match is detected, and the memory word group in which the match is detected is known by an address in units of the memory word group. be able to.
That is, the second associative memory of the present invention, configured as described above,
In an associative memory that stores a large number of stored data, search data is input, and searches for stored data corresponding to the input search data,
(4) A plurality of memory words for storing each storage data constituting a plurality of data groups each including a set of a plurality of storage data for each of the storage data
(5) When the storage data corresponding to the input search data is detected at the time of the search, among the memory word groups including a plurality of memory words storing a plurality of storage data constituting each data group, An address output circuit for outputting a representative address corresponding to a memory word group to which a memory word in which corresponding storage data is stored belongs is provided.
[0024]
Here, more specifically, the address output circuit of (5) is, for example,
(5-1) A match line provided corresponding to each of a plurality of memory words and activated when stored data corresponding to input search data is stored at the time of search
(5-2) A priority encoder connected to the match line and for generating an address of one of the memory words corresponding to the activated match line according to a predetermined priority order
(5-3) Address converter for converting the address of the one memory word output from the priority encoder into a representative address corresponding to a memory word group to which the one memory word belongs.
Can be provided.
[0025]
Here, the match line of (5-1) may be directly connected to the priority encoder of (5-2), or a signal of the match line such as a flag register, a gate circuit, or a switch may be held. It may be connected to the priority encoder of the above (5-2) via a circuit for deforming or transmitting, and the present invention described above includes both aspects thereof.
[0026]
In the case where an address output circuit that satisfies the configuration requirements of (5-1) to (5-3) is provided, each of the stored data has an attribute indicating a position in a data group to which the stored data belongs; When it consists of a pair with the data with the attribute,
The address converter according to (5-3) stores, in the address of the one memory word, the data group among the one memory word and a plurality of memory words forming the memory word group to which the one memory word belongs. It is preferable that a representative address corresponding to the memory word group is generated by adding or subtracting a relative address between a memory word storing a predetermined attribute representing each of the constituent attributes.
[0027]
In the second associative memory, for example, each of the stored data includes a pair of an attribute representing a position in a data group to which the stored data belongs, and data to which the attribute is attached,
The address output circuit of the above (5)
(5-4) Match line provided corresponding to each of a plurality of memory words and activated when stored data corresponding to the input search data is stored at the time of search
(5-5) A plurality of encodings for generating a representative address corresponding to a memory word group to which a memory word corresponding to an activated match line belongs and which is selected according to the attribute at the time of search and is provided corresponding to each of the above attributes. Encoding circuit
It is also a preferred embodiment to have a configuration including
[0028]
Further, for example, each of the stored data includes a pair of an attribute indicating a position in a data group to which the stored data belongs, and data to which the attribute is attached,
The address output circuit of the above (5)
(5-6) Match line provided corresponding to each of a plurality of memory words and activated when stored data corresponding to search data input at the time of search is stored
(5-7) Encoding coding circuit for inputting information indicating that the match line has been activated, and generating an address corresponding to the input position of the information
(5-8) Controlled by the attribute at the time of retrieval, the information is converted into the difference between the address of the memory word corresponding to the activated match line and the representative address corresponding to the memory word group to which the memory word belongs. A switching circuit for shifting an input position by a corresponding amount and inputting the input position to the encoding and coding circuit
May be provided.
[0029]
Further, the address output circuit of (5) is, for example,
(5-9) A plurality of memory words which are provided corresponding to the plurality of memory words constituting the memory word group, respectively, and are activated when stored data corresponding to the input search data is stored at the time of search. Match line
(5-10) Any one of a plurality of match lines corresponding to the plurality of memory words constituting the memory word group at the time of searching, having a plurality of signal lines respectively corresponding to the plurality of memory words. When one of the match lines is activated, a signal line corresponding to a memory word storing stored data representing a data group to which the stored data stored in the memory word corresponding to the activated match line belongs Gate circuit to activate
(5-11) The signal line is connected, an address of one memory word among memory words corresponding to the activated signal line is generated in accordance with a predetermined priority order, and the address is set to the 1st. Priority encoder that outputs as a representative address corresponding to a memory word group to which two memory words belong
May be provided.
[0030]
Here, the signal line of (5-10) may be directly connected to the priority encoder as in the case of the matching line ((5-1)), or a flag register, a gate circuit, The signal may be connected to the priority encoder via a circuit such as a switch that holds, deforms, or transmits the signal of the signal line.
[0031]
In addition, between the coincidence line of (5-9) and the signal line of (5-10), not only the gate circuit of (5-10) but also, for example, a flag register, another gate circuit, A circuit such as a switch for holding, deforming, or transmitting the signal of the matching line may be provided.
In the case where an address output circuit that satisfies the configuration requirements of (5-9) to (5-11) is provided,
Each of the stored data includes a pair of an attribute indicating a position in a data group to which the stored data belongs, and data to which the attribute is attached,
The gate circuit may be configured such that the attribute stored in the memory word is a predetermined attribute representative of each attribute forming the data group, and the plurality of gate circuits form a memory word group to which the memory word storing the predetermined attribute belongs. When any one of the plurality of match lines corresponding to the memory word is activated, the corresponding signal line is preferably activated.
[0032]
Further, the first associative memory of the present invention described above has the following configuration as a configuration for knowing whether a memory word group is in a “storage state” or an “empty state” in units of a memory word group. It can be embodied as follows.
That is, the third associative memory of the present invention so embodied is
In an associative memory that stores a large number of stored data, search data is input, and searches for stored data corresponding to the input search data,
(6) A plurality of memory words for storing each storage data constituting each of a plurality of data groups each comprising a set of a plurality of storage data for each storage data
(7) A memory word is provided corresponding to each of the plurality of memory words, and the corresponding memory word is a memory word in a storage state in which valid search data to be searched is stored, or a valid search word An empty flag register that stores an empty flag indicating whether or not the memory word is in an empty state where no data is stored and thus overwriting is allowed.
(8) It has a signal line corresponding to each of the plurality of memory words, and the storage data stored in the memory word is storage data representing a data group to which the storage data belongs, and the storage data is A gate circuit for activating a corresponding signal line when an empty flag indicating an empty state is stored in the flag register corresponding to the stored memory word
(9) A signal line corresponding to each of the plurality of memory words is connected, and one of the memory words corresponding to the signal line activated by the gate circuit is designated according to a predetermined priority order. Priority encoder
It is characterized by having.
[0033]
Here, the third associative memory of the present invention is such that each of the stored data is composed of a pair of an attribute indicating a position in a data group to which the stored data belongs, and data to which the attribute is attached,
In the gate circuit, the attribute stored in the memory word is a predetermined attribute representative of each attribute constituting the data group, and the flag register corresponding to the memory word storing the predetermined attribute has an empty state. May be activated when an empty flag indicative of the corresponding signal line is stored.
[0034]
[Action]
According to the first associative memory of the present invention, each memory word has each address and each memory word group has each representative address. Or, when accessing any one of the memory words in the memory word group, by using the representative address and the relative address in the memory word group, for example, a plurality of addresses can be stored in one memory word. The complexity of associating with a group is avoided, and handling in units of memory word groups is simplified.
[0035]
Rather than using an address that is completely different from the address corresponding to the memory word as the representative address corresponding to the memory word group, one of the addresses of a plurality of memory words constituting the memory word group, for example, When the address having the smallest numerical value among the addresses is used as the representative address, an easy-to-understand address system is provided in which the addresses of the memory words and the addresses of the memory word group are linked.
[0036]
When the stored data includes an attribute and data to which the attribute is attached, a predetermined attribute of the attribute, for example, an address of a memory word storing an attribute having the smallest numerical value is assigned to the memory word. If the representative address of the memory word group is used, a circuit configuration in which the representative address is automatically defined by storing the stored data in the memory word can be obtained.
[0037]
Further, since the second associative memory of the present invention includes the address output circuit for outputting the representative address of (5), a complicated operation for externally associating a plurality of addresses with one memory word can be performed. There is no need to perform this operation, and the handling in units of memory words is simplified, resulting in an easy-to-use associative memory.
Whether or not a match is found at the end of a series of searches is output from at most one match line for each memory word group. Therefore, even when all of the plurality of matching lines corresponding to the plurality of memory words constituting the memory word group are connected to the priority encoder, the third associative memory of the present invention recognizes an empty memory word group. Unlike, it does not take extra time to recognize the memory words for which a match has been detected.
[0038]
In a third associative memory of the present invention, an output of an empty flag register provided corresponding to each memory word is used as a memory word representing a memory word group in which one data group is stored. The priority encoder has a function of inputting the data to the priority encoder via a gate circuit that determines whether or not each memory word group is empty. The speed of searching for whether or not is empty is increased, and the speed of data writing is improved.
[0039]
【Example】
Hereinafter, embodiments of the present invention will be described in detail with reference to Japanese Patent Application No. 5-248121 filed earlier.
The embodiment of the second associative memory of the present invention or the embodiment of the third associative memory of the present invention is an embodiment of the first associative memory of the present invention. An embodiment of the second associative memory and an embodiment of the third associative memory of the present invention will be described.
[0040]
FIG. 6 is a block diagram showing an example of the associative memory according to the prior application. The same components as those of the associative memory shown in FIG. 11 are denoted by the same reference numerals as those shown in FIG. 11, and only different points will be described.
Each of the memory words 11_1, 11_2,... Includes an attribute storage unit 11_1_1, 11_2_1,... For storing attributes, and data storage units 11_1_2, 11_2_2,. Stores stored data composed of pairs of attributes and data corresponding to each other. Here, as shown in the figure, each of the memory words 11_1, 11_2, 11_3, and 11_4 has attribute I, data 'A', attribute II, data 'B', and attribute belonging to the group number 1 shown in FIG. III, data 'C', attribute IV, data 'D' are stored. Each of the memory words 11_5, 11_6,... Stores an attribute I, data “C”, attribute II, data “F”,. In the search, search data REF_DATA including a pair of an attribute and data is input.
[0041]
A match signal is output to each of the memory words 11_1 and 11_2 when the stored data (both attributes and data) stored therein matches the input search data (both attributes and data). In addition to the matching lines 14_1, 14_2,..., There are provided attribute matching lines 30_1, 30_2,. Note that the matching of only the attribute and the matching of both the attribute and the data are configured in the same manner as the conventional match detection circuit, and the conventional match detection circuit is a very common technique in the field of associative memory. And illustration thereof will be omitted.
[0042]
There are provided third flag registers 31_1, 31_2,... Corresponding to the respective memory words 11_1, 11_2, and each attribute match line 30_1, 30_2,. Extends to the input terminal. The associative memory is provided with one data line 32_1, 32_2,... For each of a plurality of memory word groups each storing data belonging to each data group shown in FIG. 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 24_1, 24_2,. These first switches 33_1, 33_2,... Are specifically configured using transistors and the like. The same applies to other switches described later. Each of the first switches 33_1, 33_2,... Becomes conductive when the corresponding third flag register 31_1, 31_2,. It is shut off when it is done. The third flag registers 31_1, 31_2,... Latch the signals of the corresponding attribute match lines 30_1, 30_2,... At the falling edge b of the match result latch signal S1 output to the match result latch control line 25. I do.
Are provided between the data lines 32_1, 32_2,... And the input terminals of the respective OR gates 21_1, 21_2,..., And the second switches 34_1, 34_2,. Are controlled by signals on the corresponding attribute match lines 30_1, 30_2,... So that the signal is in a conductive state when the signal is a logic “1” indicating a match, and is turned off in a logic “0” indicating a mismatch. . Each OR gate 21 at the time of this cutoff 1,21 In order to stabilize the input levels of 2,..., A pull-down resistor may be inserted in this portion, or another circuit method may be adopted. Note that the associative memory shown in FIG. 6 is different from the associative memory shown in FIG.
[0043]
In the associative memory configured as described above, the match search is performed as follows.
Since the single data search for one word and the first search among a plurality of continuous words are the same as in the case of the conventional associative memory with a word expansion function shown in FIG. 11, the description is omitted here. Here, in the first search, logic “1” is latched in the first and second flag registers 23_2 and 24_2 corresponding to the memory word 11_2 by the search data REF_DATA including the attribute II and the data “B”. Shall be. At this time, in response to the attribute match, a signal of logic '1' is output to the attribute match line 30_2 corresponding to the memory word 11_2, whereby the signal of logic '1' is also output to the corresponding third flag register 31_2. The signal is latched, the corresponding first switch 33_2 is turned on, and the signal of logic '1', which is stored in the corresponding second flag register 24_2 and indicates the coincidence of both the attribute and 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.
[0044]
Next, it is assumed that search is performed by inputting search data REF_DATA including attribute IV and data 'D'. At this time, as in the case of the associative memory of FIG. 11, the initial search control line 22 is held at logic "0". At this time, in response to the attribute match, a signal of logic '1' is output to the attribute match line 30_4 corresponding to the memory word 11_4, whereby the corresponding second switch 34_4 is turned on and output to the data line 32_1. Further, a signal of logic '1' of the second flag register 24_2 corresponding to the memory word 11_2 is input to the AND gate 20_4 via the OR gate 21_4. Therefore, a match between the attribute IV and the data 'D' is detected in the memory word 11_4, a match signal of logic '1' is output to the match line 14_4, and the match result latch output to the match result latch control line 25 is output. The signal of logic “1” is latched in the corresponding first and second flag registers 23_4 and 24_4 by the signal S1. At this time, the signal of logic “1” output to the attribute match line 30_4 is latched by the corresponding third flag register 31_4, the corresponding first switch 33_4 is turned on, and the signal of the second flag register 24_4 is A signal of logic “1” is output to the data line 32_1. In the second search, a logic '0' indicating an attribute mismatch is output to the attribute match line 30_2 corresponding to the memory word 11_2, and '0' is stored in the corresponding third flag register 31_2. , The first switch 33_2 corresponding to the memory word 11_2 is turned off.
[0045]
As a result, the signal of logic "1" of the second flag register 24_4 corresponding to the memory word 11_4 is output from the output line 100. 4 is input to the priority encoder 16 (see FIG. 10) to obtain the address of the memory word 11_4. It is known in advance that the attribute IV is stored in the memory word 11_4. For example, when it is desired to read the data of the attribute III, the address of the memory word 11_3 is obtained by subtracting 1 from the obtained address, and the address is input to the address decoder 17 to read the contents of the memory word 11_3. .
[0046]
On the other hand, at the time of the second search, if the search is performed using the search data including the attribute IV and the data “B” instead of the search data including the attribute IV and the data “D”, for the memory word 11_4, Since the attributes match, the second switch 34_4 is turned on, and the signal of logic “1” output to the data line 32_1 is taken in. However, since the data is different, the logic “0” indicating mismatch does not appear on the match line 14_4. The logic "0" is output and latched in the first and second flag registers 23_4 and 24_4 to indicate that no match was detected. Also, the attribute does not match for the memory word 11_2 to which the data 'B' matches, and therefore both the attribute and the data do not match.
[0047]
As described above, in the associative memory shown in FIG. 6, in the same group, even if the data is stored in memory words separated from each other or the data is searched in the reverse order of the data. Even a search can be performed.
Here, the data lines 32_1, 32_2,... In the associative memory shown in FIG. 6 have fixed lengths assuming that the number of data belonging to one group is predetermined. When a fixed-length data line is provided, it is necessary to estimate the maximum number of data belonging to one group and provide a data line having a length corresponding to the maximum number of data. In this case, useless memory words are generated when a data group is constituted by a smaller number of data than the maximum. Therefore, it is preferable that the data lines have a variable length according to the number of data belonging to one group.
[0048]
FIG. 7 is a schematic diagram showing one method for realizing a variable-length data line.
A data line 32 extends over a plurality of memory words 11_1, 11_2, 11_3,..., And the data line 32 has switches corresponding to the other memory words 11_2, 11_3,. 40_2, 40_3,... Are arranged in series with each other. These switches 40_2, 40_3, 40_4,... Are arranged between the corresponding memory words 11_2, 11_3, 11_4,... And the memory words 11_1, 11_2, 11_3,. Each of the switches 40_2, 40_4, 40_6,... Among the switches 40_2, 40_3, 40_4,... Is turned on by the first switch control signal output to the first control line 41, and every third switch is turned on. , 40_3, 40_7,... Are turned on by the second switch control signal output to the second control line 42, and every third switch 40_5,. Is turned on by the switch control signal of.
[0049]
When the number of data constituting one data group is 2, a first switch control signal is output to the first control line 41 to turn on every other switch 40_2, 40_4, 40_6,. Thus, data lines cut for each of the two memory words 11_1, 11_2; 11_3, 11_4; 11_5, 11_6; are formed. When the number of data constituting one data group is 4, the first switch control signal is output to the first control line 41 and the second switch control signal is output to the second control line 42. Then, data lines cut for each of the four memory words 11_1, 11_2, 11_3, 11_4; 11_5, 11_6,... Are formed. Similarly, when the number of data constituting one data group is 8, the first and second switch control signals are output to the first control line 41 and the second control line 42, respectively, and the third control A third switch control signal is output on line 43. .., 11_8; 11_9,..., And data lines cut off for each of the eight memory words 11_1,.
[0050]
According to this method, the number of data constituting one data group is a power of 2 (= 2n  In the case of ()), no empty memory word is generated, but in other cases, for example, 3, 5, 6, etc., an empty memory word is generated. If a large number of switches 40_2, 40_3,... Can be turned on and off arbitrarily so as not to generate this empty memory word, the number of control lines becomes large and switch control signals are output to those control lines. A complicated control circuit is required. Therefore, the method shown in FIG. 7 is not suitable for completely arbitrarily controlling the length of the data line.
[0051]
FIG. 8 is a schematic diagram showing another method for realizing a variable data line.
A data line 32 extends over a large number of memory words, and switches 40_2, 40_3, 40_4,... Corresponding to each of the other memory words except the topmost memory word are connected to the data line 32 in series. The points provided are the same as those in FIG. Each memory word is provided with attribute storage units 11_1_1, 11_2_1, 11_3_1,..., And the attribute storage units 11_1_1, 11_2_1, 11_3_1,. Is stored. In this example, according to whether the attribute stored in the attribute storage units 11_1_1, 11_2_1, 11_3_1,... Is the attribute I or the other attributes II, III, IV, in the case of the attribute I, the corresponding switch is kept off. In the case of other attributes II, III and IV, the corresponding switches are turned on. With this configuration, the attribute I data is placed at the head of each data group, regardless of the number of data that constitutes one data group, and even if data groups with different numbers of data are mixed. As a result, automatically cut data lines are formed for every number of memory words equal to the number of memory words.
[0052]
FIG. 9 is a circuit diagram illustrating an example of an attribute determination circuit that determines whether an attribute is I or other.
Here, '000' is assigned to the attribute I, and when the attribute stored in the attribute storage unit 11_i_1 is the attribute I ('000'), '0' is output from the OR gate. Is turned off, and the data lines on both sides of the transistor 40 'are electrically disconnected. If the attribute stored in the attribute storage unit 11_i_1 is an attribute other than the attribute I, "1" is output from the OR gate, the transistor 40 is turned on, and the data lines on both sides of the transistor are connected.
[0053]
In this manner, in the content addressable memory shown in FIG. 6, 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 the attribute data, a dedicated control flag may be provided for one bit, and the length of the data line may be adjusted by controlling the switch. In particular, when a flag bit dedicated to control is provided, the attribute storage unit 11 1 1,11 2 There is an advantage that values such as 1,... Can be freely selected, and the structure of the group structure data shown in FIG. 12 is further facilitated.
[0054]
In an associative memory that stores data of a group structure and performs a match search, what is desired to be obtained as a result of the match search is an address of a memory word group in which the matched data group is stored. However, in the associative memory as described above, a match line is provided corresponding to each of a large number of memory words, and the many match lines are all treated equally. For example, it is the address of the memory word at which the last match was detected when a series of searches was performed.
[0055]
Therefore, in this case, it is necessary to externally manage which addresses correspond to one memory word group, and the management is extremely troublesome.
Therefore, a method that can facilitate this management will be specifically described below.
FIG. 1 is a circuit diagram of the first embodiment of the second associative memory according to the present invention, in which only a portion of the priority encoder 55 characteristic of the present invention is extracted and shown.
[0056]
The signals from the matching lines 14_1, 14_2,..., 14_n provided corresponding to the respective memory words (see FIG. 6) are connected to the priority encoder 55 via flag registers 23_1, 24_1; 23_2, 24_2; Have been.
The priority encoder 55 outputs an address corresponding to the activated match line in response to the input of the encode pulse EP. This address is an address corresponding to a specific memory word, and is not necessarily a representative address of a memory word group to which the memory word belongs.
[0057]
The address output from the priority encoder 55 is input to a subtractor 56 which is an example of the address converter according to the present invention. The subtractor 56 has numerical values ('000', '001', '010', '011' (binary number) corresponding to the attributes I, II, III, and IV, respectively) representing the attributes constituting the search data; This is also referred to as attribute data ATT_DATA), and the subtracter 56 subtracts the value of the attribute data retrieved immediately before from the address output from the priority encoder 55. Thus, the address output from the priority encoder 55 always becomes the representative address AD of the memory word group to which the corresponding memory word belongs. That is, the attribute data ATT_DATA indicates a relative address in the memory word group. Here, the address having the smallest value among the addresses of the plurality of memory words constituting the memory word group is represented by the representative of the memory word group. Address.
[0058]
FIG. 2 is a diagram showing a priority encoder 55 of a second embodiment of the second associative memory of the present invention.
The difference from the first embodiment lies in the configuration of the priority encoder 55. That is, in the first embodiment, the value of the address of the plurality of memory words constituting the memory word group is subtracted from the encoded output address by subtracting the value of the attribute data of the immediately preceding search. Is the representative address. However, this subtraction requires a processing time of Δt. Therefore, the present embodiment aims at eliminating the subtraction time. That is, as shown in FIG. 2, an encoder 55 corresponding to the type of the attribute data is stored in the priority encoder 55. a, 55 b, 55 c is provided, and depending on which attribute the last search was, a, 55 b, 55 It is to decide whether or not to select c, and obtain the encode address AD from its output.
[0059]
For example, the output line 100 in FIG. If 2 is 1 and the immediately preceding search is performed for attribute II (`001`), ATT Encoder 55 by DATA
b is selected.
This encoder 55 b output line 100 The value corresponding to 2 is “0”, and this value is output as AD. That is, the output line 100 This means that the youngest address "0" of the memory word group to which the two memory words belong is output.
[0060]
Here, this encoder 55 b is selected at the time of the search immediately before the start of encoding. The delay is determined by DATA, and a delay such as the subtractor 56 other than the priority encoder 55 as in the first embodiment is unnecessary.
FIG. 3 shows a third embodiment. This is also characterized by the configuration of the priority encoder 55.
[0061]
FIG. 2 shows that there is no delay of the subtractor 56 as compared with FIG. a, 55 b, 55 It is necessary to facilitate c by the type of attribute, and the area of hardware increases. Therefore, FIG. 3 shows an improvement in this point.
Output line 100 serving as input of priority encoder 55 1,100 2, ..., 100 n and encoder 55 e, the switching circuit 55 s is provided.
[0062]
This switching circuit 55 s to ATT Controlled by DATA, the encoder 55 It is characterized by changing the connection position to e.
For example, output line 100 i is a switching circuit 55 s, the encoder 55 It is possible to selectively output any one of (ik) to (i-1) of e.
[0063]
Here, k indicates the value of the attribute of the search performed immediately before the encoding, and satisfies the conditions of 0 ≦ i ≦ n and i ≧ k.
Therefore, when the attribute is k, the encoder 55 The output of e is ik, and the output line 100 The youngest address in the memory word group to which the memory word of i belongs is output.
[0064]
With such a configuration, it is possible to minimize the delay time for obtaining the encode address AD and also minimize the hardware area.
In the following embodiment, the output of the search result input to the priority encoder 55 is newly improved.
FIG. 4 is a circuit diagram of a fourth embodiment of the second associative memory according to the present invention, in which only an output portion of a search result characteristic of the present invention is extracted and shown.
[0065]
Here, the same data lines 32_1, 32_2, ... as the data lines 32_1, 32_2, ... shown in Fig. 6 are shown, and the data lines 32_1, 32_2, ... have been described with reference to Fig. 6. Are transmitted through AND gates 20_1, 20_2,..., Flag registers 23_1, 24_2; 23_2, 24_2;..., Switches 33_1, 33_2,.
[0066]
FIG. 4 shows attribute storage units 11_1_1, 11_2_1,..., And the attribute stored in each attribute storage unit is attribute I (“000”) (in FIG. The attribute I ('000') is stored in the unit 11_1_1 and the attribute storage unit 11_5_1), and the corresponding NOR gates 57_1, 57_2,... (In FIG. 4, the NOR gate 57_1 and the NOR gate 57_5) output the logic '1'. Is done. The outputs of the NOR gates 51_1, 51_2,... Are input to the corresponding AND gates 58_1, 58_2,.
[0067]
Are connected to the other input terminals of the AND gates 58_1, 58_2,... Corresponding to the memory word group to which the corresponding memory word belongs. The output terminals of the AND gates 58_1, 58_2,... Are connected to the priority encoder 60 by signal lines 59_1, 59_2,.
[0068]
As described with reference to FIG. 6, when a match is detected in any of the memory words constituting the corresponding memory word group, a match signal (logic “1”) is applied to the data lines 32_1, 32_2,. Is output. Therefore, from each of the AND gates 58_1, 58_2,..., The attribute I ('000') is stored in the corresponding memory word, and any one of the memory words in the memory word group to which the corresponding memory word belongs. Outputs a logic '1' to the priority encoder 60 when a match is detected, otherwise, no match is detected in any of the memory words that make up the group of memory words to which the corresponding memory word belongs. Or, even if a match is detected, if the corresponding attribute is an attribute other than the attribute I ('000'), a logic '0' is output to the priority encoder 60. In this way, the priority encoder 60 has a logic “H” indicating that a match has been detected from only the AND gate corresponding to the first memory word of the plurality of memory words forming the memory word group in which a match has been detected. The signal 1 'is input. Therefore, from the priority encoder 60, the head address of the memory word group for which a match is detected is output as the representative address AD in accordance with the encode pulse EP.
[0069]
In the embodiment shown in FIG. 4, attribute data is used as information for delimiting the memory word group in which each data group is stored. However, the third associative memory of the present invention Like the associative memory of No. 2, the memory is not limited to the one using the attribute data. For example, as shown in FIG. It is needless to say that the flag bit may be used. In particular, when a flab bit dedicated to control is provided, the attribute storage unit 11 1 1,11 2 There is an advantage that values such as 1,... Can be freely selected, and the structure of the group structure data shown in FIG. 12 is further facilitated.
[0070]
Although the above description has been made with respect to obtaining a representative address of a search result, in the case of an associative memory, another important address is an empty address of a data free area. Hereinafter, this management method will be described.
However, the position of the empty address does not change depending on the attribute to be searched, which is a little different from obtaining the representative address of the search result.
[0071]
The empty means that a certain memory word is a memory word in a “storage state” in which valid search data to be searched is stored in the memory word, or that a valid search data is stored. Therefore, an empty flag register in which a flag is stored is provided for each memory word in order to distinguish whether the memory word is in an “empty state” where overwriting is permitted. At the time of retrieval, if a flag indicating that the corresponding memory word is in the storage state is stored in the empty flag register, the memory word is regarded as a search target, and the corresponding memory word is stored in the empty flag register. If a flag indicating that the word is empty is stored, the memory word is excluded from the search target.
[0072]
When both the attribute and the data are stored in each memory word as described above, it is sufficient to determine whether the memory word is in the storage state or the empty state for each memory word group in which each data group is stored. However, as shown in FIGS. 7 and 8, the delimitation of the memory word group is not determined in advance, and when the delimitation of the memory word group is determined by a control signal or attribute, it is not known in advance where the delimitation will be. The flag register is provided for each memory word as described above.
[0073]
These empty flag registers are connected to a priority encoder, and when writing new data to a memory word, the priority encoder obtains the address of an empty memory word and stores the desired data in the memory word at that address. Is written, but originally, it is sufficient to determine whether or not each memory word group storing each data group is empty.If the empty flag register for each memory word is connected to the priority encoder, It is necessary to input a number of encode pulses EP (see FIG. 10) to the priority encoder to select a desired memory word group in an empty state, which complicates the data writing procedure, and requires a long time for data writing. There is such a problem.
[0074]
FIG. 5 is a circuit diagram of an embodiment of the third associative memory according to the present invention, in which only portions characteristic of the present invention are extracted and shown.
It is assumed that data having the data structure shown in FIG. 12 is stored, and “000” is assigned to the attribute I. At this time, when the attributes stored in the attribute storage units 11_1_1, 11_2_1, ..., 11_k_1, ... are the attributes I ('000') (in the case of Fig. 5, the attribute storage units 11_1_1 and 11_k_1 have the attribute I (' , 000 ') are stored), and the logic "1" is output from the corresponding NOR gates 51_1, 51_2, ..., 51_k, ... (in the case shown in FIG. 5, the NOR gate 51_1 and the NOR gate 51_k). The outputs of the NOR gates 51_1, 51_2,..., 51_k,... Are input to the corresponding AND gates 52_1, 52_2,.
[0075]
, 53_k,... Provided corresponding to each memory word (not shown in FIG. 5) correspond to the empty flag registers 53_1, 53_2,. A logic '1' indicating that a memory word to be used is empty or a logic '0' indicating that valid data to be searched is stored in the memory word, is stored in each empty flag. , 53_k,..., Stored in the registers 53_1, 53_2,..., 53_k, are input from the other input terminals of the corresponding AND gates 52_1, 52_2,. You. The outputs of the AND gates 52_1, 52_2, ..., 52_k, ... are input to the priority coder 54.
[0076]
The encode pulse EP is input to the priority coder 54, and each time the encode pulse EP is input, the address AD of the memory word corresponding to the AND gates 52_1,... Are sequentially output.
5, '000' representing the attribute I is stored in the attribute storage units 11_1_1, 11_2_1, ..., 11_k_1, ... and the empty flag registers 53_1, 53_2, ..., 53_k, ... are empty. Only when the logic "1" indicating the state is stored, the logic "1" is input to the priority encoder 54, and an attribute other than the attribute I is stored in the attribute storage units 11_1_1, 11_2_1,. If the register 53_1, 53_2,..., 53_k,..., Stores logic '0' indicating that valid data is stored in the corresponding memory word, the priority encoder 54 outputs logic '0'. 'Is entered.
[0077]
As described above, the logic “1” is input to the priority encoder 54 only when the memory word representing the data group and in which the data of the attribute I is stored is empty, and the encoding is performed. The sequence for obtaining the address of a desired memory word by inputting the pulse EP is simplified, and the speed of writing data to the desired memory word is improved.
[0078]
Further, with this configuration, of a series of memory words in which a valid data group is written, only the value of the empty flag 1 bit of the memory word in which the data of the attribute I is written is changed, The series of memory words can be vacated, and data can be erased very efficiently.
The priority encoder 54 shown in FIG. 5 compares the priority encoder 16 shown in FIG. 1 with an address of a memory word in an empty state when writing data, or an address of a memory word in which a match is detected as a result of a search. The difference is only in the point of obtaining, but the structure is common.
[0079]
Further, in the embodiment shown in FIG. 5, attribute data is used as information for delimiting a memory word group in which each data group is stored. However, the present invention is not limited to this. For example, as shown in FIG. Needless to say, the control signal may be used when the memory signal group is delimited by the control signal, or a control-specific flag bit may be used.
[0080]
【The invention's effect】
As described above, according to the first associative memory of the present invention, since each memory word group has each representative address, handling in units of memory word groups (data groups) becomes easy.
Further, a second associative memory of the present invention specializes the first associative memory in generating an address of a memory word group in which a match is detected, and externally comprises a plurality of addresses and one memory word. There is no need to perform a complicated operation such as associating with the above, and the handling in units of memory word groups is simplified, so that an easy-to-use associative memory is configured.
[0081]
Further, a third associative memory according to the present invention is the first associative memory, wherein the first associative memory is specialized for generating an address of a memory word group in an empty state, and each memory word group in which each data group is stored. Only the representative memory word is input to the priority encoder with data indicating whether or not the memory is empty. For each memory word group, whether or not the memory is empty is determined, and the address of the memory word to which the data is written is determined. Can be searched at high speed.
[Brief description of the drawings]
FIG. 1 is a circuit diagram showing a first embodiment of a second associative memory according to the present invention, in which parts characteristic of the present invention are extracted and shown.
FIG. 2 is a circuit diagram showing a characteristic portion of the second embodiment of the second associative memory of the present invention.
FIG. 3 is a circuit diagram of a third embodiment of a second associative memory according to the present invention, in which parts characteristic of the present invention are extracted and shown;
FIG. 4 is a circuit diagram showing a characteristic portion of the fourth embodiment of the second associative memory of the present invention.
FIG. 5 is a circuit diagram showing a characteristic portion of the third embodiment of the third associative memory of the present invention.
FIG. 6 is a block diagram illustrating an example of an associative memory.
FIG. 7 is a schematic diagram showing one method for realizing a variable-length data line.
FIG. 8 is a schematic diagram showing another method for realizing a variable data line.
FIG. 9 is a circuit diagram illustrating an example of an attribute determination circuit.
FIG. 10 is a circuit block diagram illustrating an example of an associative memory.
FIG. 11 is a block diagram illustrating an example of an associative memory having a data extension function.
FIG. 12 is a diagram illustrating an example of data of a group structure.
[Explanation of symbols]
11_1, 11_2, ... memory words
11_1_1, 11_2_1,... Attribute storage unit
11_1_2, 11_2_2, ... Data storage unit
14_1, 14_2, ... Matching line
16 priority encoder
17 Address decoder
18_1, 18_2, ... word line
20_1, 20_2, ... AND gate
21_1, 21_2, ... or gate
23_1, 23_2,... First flag register
24_1, 24_2, ... second flag register
25 Match result latch control line
30_1, 30_2, ... attribute matching line
31_1, 31_2,... Third flag register
32_1, 32_2, ... data lines
33_1, 33_2, ... 1st switch
34_1, 34_2, ... 2nd switch
51_1, 51_2, ... or gate
52_1, 52_2, ... AND gate
53_1, 53_2, ... Flag register
54, 55, 60 priority encoder
56 Subtractor

Claims (12)

多数の格納データを記憶しておき、検索データが入力され、入力された検索データに対応する格納データを検索する連想メモリにおいて、
それぞれが複数の格納データの集合からなる複数のデータ群を構成する各格納データを、該各格納データ毎に記憶する複数のメモリワードを備え、
各メモリワードが、該各メモリワードに対応する各アドレスを有するとともに、
各データ群を構成する複数の格納データを記憶する複数のメモリワードからなる各メモリワード群が、該各メモリワード群に対応する各代表アドレスを有することを特徴とする連想メモリ。
In an associative memory that stores a large number of stored data, search data is input, and searches for stored data corresponding to the input search data,
A plurality of storage words each storing a plurality of storage data, each of which forms a plurality of data groups each including a set of a plurality of storage data, is provided for each of the storage data.
Each memory word has a respective address corresponding to the respective memory word,
An associative memory, wherein each memory word group including a plurality of memory words storing a plurality of storage data constituting each data group has each representative address corresponding to each memory word group.
前記代表アドレスが、該代表アドレスに対応するメモリワード群を構成する複数のメモリワードに対応する複数のアドレスのうちの1つのアドレスであることを特徴とする請求項1記載の連想メモリ。2. The associative memory according to claim 1, wherein the representative address is one of a plurality of addresses corresponding to a plurality of memory words forming a memory word group corresponding to the representative address. 前記格納データそれぞれが、該格納データが属するデータ群の中の位置づけを表わす属性と、該属性が付されたデータとのペアからなり、
前記代表アドレスが、該代表アドレスに対応するメモリワード群を構成する複数のメモリワードのうち前記データ群を構成する各属性を代表する所定の属性が格納されたメモリワードに対応するアドレスであることを特徴とする請求項1記載の連想メモリ。
Each of the stored data includes a pair of an attribute indicating a position in a data group to which the stored data belongs, and data to which the attribute is attached,
The representative address is an address corresponding to a memory word storing a predetermined attribute representative of each attribute configuring the data group among a plurality of memory words configuring a memory word group corresponding to the representative address. 2. The associative memory according to claim 1, wherein:
多数の格納データを記憶しておき、検索データが入力され、入力された検索データに対応する格納データを検索する連想メモリにおいて、
それぞれが複数の格納データの集合からなる複数のデータ群を構成する各格納データを、該各格納データ毎に記憶する複数のメモリワードと、
検索時に、入力された検索データに対応する格納データが検出された場合に、各データ群を構成する複数の格納データを記憶する複数のメモリワードからなる各メモリワード群のうち、前記対応する格納データが格納されたメモリワードが属するメモリワード群に対応する代表アドレスを出力するアドレス出力回路とを備えたことを特徴とする連想メモリ。
In an associative memory that stores a large number of stored data, search data is input, and searches for stored data corresponding to the input search data,
A plurality of storage words each storing a plurality of storage data, each of which forms a plurality of data groups each including a set of a plurality of storage data,
At the time of search, when storage data corresponding to the input search data is detected, of the respective memory word groups consisting of a plurality of memory words storing a plurality of storage data constituting each data group, the corresponding storage data is stored. An address output circuit that outputs a representative address corresponding to a memory word group to which a memory word in which data is stored belongs.
前記アドレス出力回路が、
前記複数のメモリワードそれぞれに対応して備えられ、検索時に、入力された検索データに対応する格納データが記憶されていた場合に活性化される一致線と、
所定の優先順位づけに従って、活性化された一致線に対応するメモリワードの中の1つのメモリワードのアドレスを生成するプライオリティエンコーダと、
前記プライオリティエンコーダから出力された前記1つのメモリワードのアドレスを、該1つのメモリワードが属するメモリワード群に対応する代表アドレスに変換するアドレスコンバータとを備えたことを特徴とする請求項4記載の連想メモリ。
The address output circuit,
A match line that is provided corresponding to each of the plurality of memory words, and is activated when storage data corresponding to the input search data is stored during the search;
A priority encoder for generating an address of one of the memory words corresponding to the activated match line according to a predetermined prioritization;
5. The address converter according to claim 4, further comprising: an address converter configured to convert an address of the one memory word output from the priority encoder into a representative address corresponding to a memory word group to which the one memory word belongs. Associative memory.
前記格納データそれぞれが、該格納データが属するデータ群の中の位置づけを表わす属性と、該属性が付されたデータとのペアからなり、
前記アドレスコンバータが、前記1つのメモリワードのアドレスに、該1つのメモリワードと、該1つのメモリワードが属するメモリワード群を構成する複数のメモリワードのうち、前記データ群を構成する各属性を代表する所定の属性が格納されたメモリワードとの間の相対アドレスを加算もしくは減算することにより、該メモリワード群に対応する代表アドレスを生成するものであることを特徴とする請求項5記載の連想メモリ。
Each of the stored data includes a pair of an attribute indicating a position in a data group to which the stored data belongs, and data to which the attribute is attached,
The address converter stores, in the address of the one memory word, the attribute that configures the data group among the one memory word and a plurality of memory words that configure the memory word group to which the one memory word belongs. 6. The method according to claim 5, wherein a representative address corresponding to the memory word group is generated by adding or subtracting a relative address to a memory word in which a representative predetermined attribute is stored. Associative memory.
前記格納データそれぞれが、該格納データが属するデータ群の中の位置づけを表わす属性と、該属性が付されたデータとのペアからなり、
前記アドレス出力回路が、前記複数のメモリワードそれぞれに対応して備えられ、検索時に、入力された検索データに対応する格納データが記憶されていた場合に活性化される一致線と、
前記属性それぞれに対応して備えられ検索時の前記属性により選択される、活性化された一致線に対応するメモリワードが属するメモリワード群に対応する代表アドレスを生成する複数のエンコード符号化回路とを具備することを特徴とする請求項4記載の連想メモリ。
Each of the stored data includes a pair of an attribute indicating a position in a data group to which the stored data belongs, and data to which the attribute is attached,
The address output circuit is provided corresponding to each of the plurality of memory words, at the time of a search, a match line activated when storage data corresponding to the input search data is stored,
A plurality of encoding / encoding circuits for generating a representative address corresponding to a memory word group to which a memory word corresponding to an activated match line belongs and which is selected according to the attribute at the time of search provided for each of the attributes; 5. The associative memory according to claim 4, comprising:
前記格納データそれぞれが、該格納データが属するデータ群の中の位置づけを表わす属性と、該属性が付されたデータとのペアからなり、
前記アドレス出力回路が、前記複数のメモリワードそれぞれに対応して備えられ、検索時に、入力された検索データに対応する格納データが記憶されていた場合に活性化される一致線と、
一致線が活性化されたことを表わす情報を入力し、該情報の入力位置に応じたアドレスを生成するエンコード符号化回路と、
検索時の前記属性によって制御され、前記情報を、活性化された一致線に対応するメモリワードのアドレスと、該メモリワードが属するメモリワード群に対応する代表アドレスとの差分に対応する分だけ入力位置をシフトして前記エンコード符号化回路に入力するスイッチング回路とを具備することを特徴とする請求項4記載の連想メモリ。
Each of the stored data includes a pair of an attribute indicating a position in a data group to which the stored data belongs, and data to which the attribute is attached,
The address output circuit is provided corresponding to each of the plurality of memory words, at the time of a search, a match line activated when storage data corresponding to the input search data is stored,
An encoding encoding circuit that inputs information indicating that the match line has been activated, and generates an address corresponding to the input position of the information;
Controlled by the attribute at the time of retrieval, the information is input by an amount corresponding to the difference between the address of the memory word corresponding to the activated match line and the representative address corresponding to the memory word group to which the memory word belongs. 5. The associative memory according to claim 4, further comprising: a switching circuit that shifts a position and inputs the shifted data to the encoding / encoding circuit.
前記アドレス出力回路が、
前記メモリワード群を構成する前記複数のメモリワードそれぞれに対応して備えられ、検索時に、入力された検索データに対応する格納データが記憶されていた場合に活性化される複数の一致線と、
前記複数のメモリワードにそれぞれ対応する複数の信号線を有し、検索時に、前記メモリワード群を構成する前記複数のメモリワードに対応する複数の前記一致線のうちのいずれか1本の一致線が活性化された場合に、この活性化された一致線に対応するメモリワードに記憶された格納データが属するデータ群を代表する格納データが記憶されたメモリワードに対応する前記信号線を活性化するゲート回路と、
所定の優先順位づけに従って、前記活性化された信号線に対応するメモリワードの中の1つのメモリワードのアドレスを生成し、該アドレスを、該1つのメモリワードが属するメモリワード群に対応する代表アドレスとして出力するプライオリティエンコーダとを備えたことを特徴とする請求項4記載の連想メモリ。
The address output circuit,
A plurality of match lines that are provided corresponding to each of the plurality of memory words constituting the memory word group and are activated when stored data corresponding to the input search data is stored during a search,
A plurality of signal lines respectively corresponding to the plurality of memory words, and at the time of retrieval, any one of the plurality of match lines corresponding to the plurality of memory words constituting the memory word group Is activated, the signal line corresponding to the memory word storing the storage data representing the data group to which the storage data stored in the memory word corresponding to the activated match line belongs is activated. A gate circuit,
Generating an address of one of the memory words corresponding to the activated signal line according to a predetermined priority order, and assigning the address to a representative word corresponding to a memory word group to which the one memory word belongs; 5. The associative memory according to claim 4, further comprising a priority encoder that outputs the address as an address.
前記格納データそれぞれが、該格納データが属するデータ群の中の位置づけを表わす属性と、該属性が付されたデータとのペアからなり、前記ゲート回路が、前記メモリワードに格納された属性が前記データ群を構成する各属性を代表する所定の属性であり、かつ、該所定の属性が格納されたメモリワードが属するメモリワード群を構成する複数のメモリワードに対応する複数の前記一致線のうちのいずれか1本の一致線が活性化された場合に、対応する前記信号線を活性化するものであることを特徴とする請求項9記載の連想メモリ。Each of the stored data includes a pair of an attribute indicating a position in a data group to which the stored data belongs and data to which the attribute is added, and the gate circuit determines that the attribute stored in the memory word is Of the plurality of matching lines corresponding to a plurality of memory words forming a memory word group to which a predetermined attribute representing each attribute constituting the data group belongs and to which the memory word in which the predetermined attribute is stored belongs. 10. The content addressable memory according to claim 9, wherein when any one of the coincidence lines is activated, the corresponding signal line is activated. 多数の格納データを記憶しておき、検索データが入力され、入力された検索データに対応する格納データを検索する連想メモリにおいて、それぞれが複数の格納データの集合からなる複数のデータ群を構成する各格納データを、該各格納データ毎に記憶する複数のメモリワードと、
前記複数のメモリワードそれぞれに対応して備えられ、対応するメモリワードが、検索の対象とされる有効な検索データが記憶された記憶状態にあるメモリワードであるか、あるいは前記有効な検索データが記憶されておらずしたがって上書きが許容される空き状態にあるメモリワードであるかを示すエンプティフラグが記憶されるフラグレジスタと、
前記複数のメモリワードそれぞれに対応する信号線を有し、該メモリワードに格納された格納データが、該格納データが属するデータ群を代表する格納データであり、かつ、該格納データが格納されたメモリワードに対応する前記フラグレジスタに、前記空き状態を示すエンプティフラグが記憶されていた場合に、対応する前記信号線を活性化するゲート回路と、
所定の優先順位づけに従って、前記ゲート回路により活性化された前記信号線に対応するメモリワードの中の1つのメモリワードを指定するプライオリティエンコーダとを備えたことを特徴とする連想メモリ。
A large number of stored data are stored, search data is input, and a plurality of data groups each including a set of a plurality of stored data are configured in an associative memory that searches for stored data corresponding to the input search data. A plurality of memory words for storing each stored data for each stored data;
The memory word is provided corresponding to each of the plurality of memory words, and the corresponding memory word is a memory word in a storage state in which valid search data to be searched is stored, or the valid search data is A flag register that stores an empty flag indicating whether the memory word is in an empty state that is not stored and thus allowed to be overwritten;
The storage device has signal lines corresponding to the plurality of memory words, respectively, and storage data stored in the memory word is storage data representing a data group to which the storage data belongs, and the storage data is stored. A gate circuit that activates the corresponding signal line when an empty flag indicating the empty state is stored in the flag register corresponding to a memory word;
A content addressable memory comprising: a priority encoder that specifies one memory word among memory words corresponding to the signal line activated by the gate circuit according to a predetermined priority order.
前記格納データそれぞれが、該格納データが属するデータ群の中の位置づけを表わす属性と、該属性が付されたデータとのペアからなり、前記ゲート回路が、前記メモリワードに格納された属性が前記データ群を構成する各属性を代表する所定の属性であり、かつ、該所定の属性が格納されたメモリワードに対応する前記フラグレジスタに、前記空き状態を示すエンプティフラグが記憶されていた場合に、対応する前記信号線を活性化するものであることを特徴とする請求項11記載の連想メモリ。Each of the stored data includes a pair of an attribute indicating a position in a data group to which the stored data belongs and data to which the attribute is added, and the gate circuit determines that the attribute stored in the memory word is When the empty flag indicating the empty state is stored in the flag register corresponding to the memory word in which the predetermined attribute is a predetermined attribute representing each attribute constituting the data group, and the predetermined attribute is stored. The associative memory according to claim 11, wherein the corresponding signal line is activated.
JP02172795A 1994-02-10 1995-02-09 Associative memory Expired - Fee Related JP3605168B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP02172795A JP3605168B2 (en) 1994-02-10 1995-02-09 Associative memory

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP1642894 1994-02-10
JP6-16428 1994-02-10
JP6-256683 1994-02-10
JP25668394 1994-10-21
JP02172795A JP3605168B2 (en) 1994-02-10 1995-02-09 Associative memory

Publications (2)

Publication Number Publication Date
JPH08171800A JPH08171800A (en) 1996-07-02
JP3605168B2 true JP3605168B2 (en) 2004-12-22

Family

ID=27281404

Family Applications (1)

Application Number Title Priority Date Filing Date
JP02172795A Expired - Fee Related JP3605168B2 (en) 1994-02-10 1995-02-09 Associative memory

Country Status (1)

Country Link
JP (1) JP3605168B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3819120B2 (en) * 1997-08-26 2006-09-06 川崎マイクロエレクトロニクス株式会社 Encoding circuit applied to associative memory device
US6453382B1 (en) * 1998-11-05 2002-09-17 Altera Corporation Content addressable memory encoded outputs

Also Published As

Publication number Publication date
JPH08171800A (en) 1996-07-02

Similar Documents

Publication Publication Date Title
US5946704A (en) Associative memory to retrieve a plurality of words
US5530665A (en) Method of using associative memories and an associative memory
US6243281B1 (en) Method and apparatus for accessing a segment of CAM cells in an intra-row configurable CAM system
US6246601B1 (en) Method and apparatus for using an inter-row configurable content addressable memory
WO1998053458A1 (en) Content addressable memory multiple match detection circuit
US6252789B1 (en) Inter-row configurability of content addressable memory
US5497478A (en) Memory access system and method modifying a memory interleaving scheme so that data can be read in any sequence without inserting wait cycles
GB2268297A (en) Content addressable memory.
JPS5918735B2 (en) code word generator
JPH11273365A (en) Content addressable memory(cam)
JPS5850826A (en) Multilevel logic circuit
US5592407A (en) Associative memory
US6751701B1 (en) Method and apparatus for detecting a multiple match in an intra-row configurable CAM system
US7095641B1 (en) Content addressable memory (CAM) devices having priority class detectors therein that perform local encoding of match line signals
JP3605168B2 (en) Associative memory
US6868475B2 (en) Content addressable memory having data width extension capability
US4635220A (en) Binary coded decimal number division apparatus
US6799243B1 (en) Method and apparatus for detecting a match in an intra-row configurable cam system
JP3784896B2 (en) Viterbi decoder logic block
US6813680B1 (en) Method and apparatus for loading comparand data into a content addressable memory system
US6801981B1 (en) Intra-row configurability of content addressable memory
JP3597882B2 (en) Associative memory
JP3597899B2 (en) Associative memory
US5983311A (en) Sequential memory accessing circuit and method of addressing two memory units using common pointer circuit
JP3063956B2 (en) Associative memory

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040913

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20041001

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20081008

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20091008

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20091008

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20101008

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees