JP3594212B2 - Associative memory - Google Patents

Associative memory Download PDF

Info

Publication number
JP3594212B2
JP3594212B2 JP11648397A JP11648397A JP3594212B2 JP 3594212 B2 JP3594212 B2 JP 3594212B2 JP 11648397 A JP11648397 A JP 11648397A JP 11648397 A JP11648397 A JP 11648397A JP 3594212 B2 JP3594212 B2 JP 3594212B2
Authority
JP
Japan
Prior art keywords
search
mask
write
bit
register
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
JP11648397A
Other languages
Japanese (ja)
Other versions
JPH10293768A (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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP11648397A priority Critical patent/JP3594212B2/en
Publication of JPH10293768A publication Critical patent/JPH10293768A/en
Application granted granted Critical
Publication of JP3594212B2 publication Critical patent/JP3594212B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、画像処理システム等の様々な超並列型計算装置を構成する際に、超並列プロセッシングエレメント(PE)として用いる連想メモリに関する。
【0002】
【従来の技術】
ネットワークサービスのビジュアル化、高付加価値化によって、高度な画像処理、音響処理、知識処理の必要性が高まっている。ところが、上記処理は、一般に莫大な処理性能が要求されるので、ノイマンアーキテクチャに基づいて、既存のマイクロプロセッサ、信号処理プロセッサを使用したのでは、実行困難な場合が多い。
【0003】
そこで、上記処理に有効な装置として、種々の論理、算術演算処理を行うプロセッシングエレメント(PE)を多数搭載し、単一命令ストリーム・複数データストリーム方式(SIMD)によって、1つの制御回路から各PEに対して、単一の命令列を与え、これによって、各PEが同時に上記演算処理を実行することができる装置(超並列型計算装置)が知られている。
【0004】
極めて少ないハード量によって、上記超並列型計算装置を実現することができる集積回路として、連想メモリが知られている。この連想メモリについては、「Ogura, T. et al. ”A 20−kbit Associatebi Memory LSI for Artificial Intelligence Machines”, IEEE J. Solid−State Circuits, Vol.24, No.4, pp.1014−1020 Aug. 1989」に開示されている。
【0005】
図4は、従来の連想メモリM0を示す図である。
【0006】
従来の連想メモリM0は、アドレス検索マスクレジスタ44と、データ検索マスクレジスタ45と、書き込みマスクレジスタ46と、アドレスデコーダ47と、ヒットフラグレジスタ410と、ワード(読み出しのみ)48と、ワード(読み書き可能)49とを有する。
【0007】
従来の連想メモリM0は、通常のメモリのように、アドレス入出力ポート41にアドレス値を与えると、データ入出力ポート42を介して、任意のワード49にデータを読み書きできる機能を有するものである。
【0008】
また、従来の連想メモリM0は、データ入出力ポート42を介して与えられた検索データとワードの内容とを並列に照合し、一致したワードに対してヒットフラグを立てるマスク検索機能と、ヒットフラグが立っているワードに対して、データ入出力ポート42を介して与えたデータを並列に書き込む並列部分書き込み機能とを有する。そして、これらのマスク検索機能、並列部分書き込み機能を用いることによって、ワード並列(word parallel )、ビット直列(bit serial)に、種々のデータ転送、論理、算術演算処理を実行することができる。つまり、各ワードを、上記プロセッシングエレメントとして用いることができる。
【0009】
また、処理対象ビットとフラグビット等に、検索マスク、書き込みマスクを設定し、マスク検索、並列部分書き込みを繰り返すことによって、上記データ転送、演算処理を実行する。
【0010】
【発明が解決しようとする課題】
ところで、画像処理、音響処理、知識処理等の様々な超並列アルゴリズムの中には、多ビットのデータ転送、演算処理を行う必要があるものが多く存在する。たとえば、256階調の画像を処理するためには、8ビットのデータ転送、演算処理が不可欠である。連想メモリにおけるデータ転送、演算処理をビット直列で実行するので、一般に、これらの多ビットの処理時間は、大きな割合を占めるが、全体の処理時間を短くし、より多くのアプリケーションに適用可能な超並列型計算装置を実現するためには、上記のデータ転送、演算処理はできるだけ短い時間で終了することが望まれている。
【0011】
従来の連想メモリM0においては、検索マスク、書き込みマスクを設定する場合、アドレス入出力ポート41とデータ入出力ポート42とを介して、マスク値を直接与えることによって、検索マスクと書き込みマスクとを設定するようにしている。したがって、従来の連想メモリM0において、多ビットの転送、演算を行う場合、ビット毎に、互いに独立したサイクルで、検索マスクと書き込みマスクとを設定し直す必要があり、このために、データ転送、演算処理時間が長いという問題がある。
【0012】
本発明は、多ビットのデータ転送、演算処理時間が短い連想メモリを提供することを目的とするものである。
【0013】
【課題を解決するための手段】
本発明は、データ検索マスクレジスタと、書き込みマスクレジスタと、ワード部と、アドレスデコーダと、ヒットフラグレジスタと、これらを制御する制御部とを有する連想メモリにおいて、上記データ検索マスクレジスタと上記書き込み検索マスクレジスタとをシフト動作させる手段と、上記検索マスクレジスタのシフト動作と上記ワード部に対する並列部分書き込み動作とを同時に実行させる手段と、上記書き込みマスクレジスタのシフト動作と上記ワード部に対するマスク検索動作とを同時に実行させる手段とを上記制御部が有するものである。
【0014】
【発明の実施の形態および実施例】
図1は、本発明の一実施例である連想メモリM1の基本構成を示すブロック図である。
【0015】
連想メモリM1は、アドレス検索マスクレジスタ14と、データ検索マスクレジスタ15、16と、書き込みマスクレジスタ17、18と、アドレスデコーダ19と、ワード(読み出しのみ)110と、ワード(読み書き可能)111と、ヒットフラグレジスタ112と、制御部113とを有する。
【0016】
アドレス検索マスクレジスタ14は、通常のレジスタによって構成され、シフト動作できないものである。データ検索マスクレジスタ15は、シフトレジスタによって構成され、1ビットシフトアップ/ダウン動作が可能である。データ検索マスクレジスタ16は、通常のレジスタによって構成され、シフト動作できないものである。書き込みマスクレジスタ17は、シフトレジスタによって構成され、1ビットシフトアップ/ダウン動作が可能である。書き込みマスクレジスタ18は、通常のレジスタによって構成され、シフト動作できないものである。
【0017】
また、連想メモリM1は、マスク検索機能と、並列部分書き込み機能とを有する。
【0018】
上記マスク検索機能は、データ入出力ポート12を介して与えられた検索データとワードの内容とを並列に照合し、照合結果が一致したワードに対してヒットフラグを立てる機能であり、命令入力ポート13を介して、そのモードを示す命令が与えられたときに、制御部113がその命令をデコードし、マスク検索起動制御線114を有効にし、検索マスクレジスタ14、15、16、ワード110、111等を動作させることによって、上記デコードされた命令を実行させる機能である。
【0019】
上記並列部分書き込み機能は、ヒットフラグが立っているワードに対して、データ入出力ポート12を介して与えられたデータを並列に書き込む機能であり、命令入力ポート13を介して、そのモードを示す命令が与えられたときに、制御部113が上記命令をデコードし、並列部分書き込み起動制御線116を有効にし、書き込みマスクレジスタ17、18、ワード110、111等を動作させることによって、上記デコードされた命令を実行させる機能である。
【0020】
連想メモリM1は、上記マスク検索機能、上記並列部分書き込み機能を用いることによって、種々のデータ転送、論理、算術演算処理を、ワード並列(word parallel )、ビット直列(bit serial)に実行することができる。
【0021】
また、連想メモリM1は、上記データ検索マスクレジスタ15におけるシフトアップ/ダウン動作と、ワード111に対する上記並列部分書き込み動作とを同時に行う機能を有する。この機能は、命令入力ポート13を介して、そのモードを示す命令が与えられたときに、制御部113が上記命令をデコードし、検索マスクレジスタシフト起動制御線115と並列部分書き込み起動制御線116との両方を有効にすることによって、上記デコードされた命令を実行させる機能である。
【0022】
さらに、連想メモリM1は、書き込みマスクレジスタ17のシフトアップ/ダウンと、ワード111に対する上記マスク検索とを同時に行う機能を有する。この機能は、命令入力ポート13を介して、そのモードを示す命令が与えられたときに、制御部113が上記命令をデコードし、書き込みマスクレジスタシフト起動制御線117とマスク検索起動制御線114との両方を有効にすることによって、上記デコードされた命令を実行させる機能である。
【0023】
上記データ検索マスクレジスタ15におけるシフト動作と並列部分書き込み動作とを同時に行う機能と、書き込みマスクレジスタ17のシフト動作とマスク検索動作とを同時に行う機能とにおいて、シフトモード、マスク検索、並列部分書き込みモードのうちのいずれか1つの動作のみが選択されるので、各マスクレジスタ14、15、16における動作が競合することがない。
【0024】
次に、連想メモリM1を用いた場合におけるデータ転送の手順について説明する。
【0025】
図2は、上記実施例におけるデータ転送手順を示すフローチャートである。なお、以下では、転送元フィールド21のnビット(nは任意の自然数)のデータを、転送先フィールド22のnビットに転送する手順を例にとって説明する。また、転送元フィールド21、転送先フィールド22を、シフト動作可能なマスクレジスタ15、17に対応するワードに割り付ける。
【0026】
まず、上位1ビット目のデータの転送(X →Y )を実行する。つまり、サイクル1において検索マスク設定し、つまり、転送元フィールド21の上位1ビット目(X )以外をマスクし、サイクル2において、書き込みマスク設定し、つまり、転送先フィールド22の上位1ビット目(Y )以外をマスクし、サイクル3において、転送元フィールド21の上位1ビット目(X )に対してマスク検索を行い、ヒットフラグレジスタ111へデータを転送する。
【0027】
そして、サイクル4において、転送先フィールド22の上位1ビット目(Y )に対して並列部分書き込みを実行し、ヒットフラグレジスタ111のデータをビットY へ転送し、これと同時に、検索マスクレジスタ15をシフトダウンする。この検索マスクレジスタ15をシフトダウンすることによって、転送元フィールド21の2ビット目(X )以外がマスクされる。以上の手順によって、上位1ビット目のデータの転送(X →Y )が終了する。
【0028】
次に、上位2ビット目のデータの転送(X →Y )を実行する。つまり、サイクル5において、転送元フィールド21の上位2ビット目(X )に対してマスク検索を行い、ヒットフラグレジスタ111へデータを転送し、これと同時に、書き込みマスクレジスタ17をシフトダウンする。この書き込みマスクレジスタ17をシフトダウンすることによって、転送先フィールド22の上位2ビット目(Y )以外がマスクされる。そして、サイクル6において、転送先フィールド22の上位2ビット目(Y )に対して並列部分書き込みを行い、ヒットフラグレジスタ111のデータをビットY へ転送し、これと同時に検索マスクレジスタ15をシフトダウンする。以上の手順によって、上位2ビット目のデータの転送(X →Y )が終了する。
【0029】
そして、nビットの全てに対して、上記手順と同様の手順を実行することによって、nビットのデータ転送(X →Y )が終了する。
【0030】
上記のように、連想メモリM1を用いることによって、2ビット目から、検索/書き込みマスクの設定と、マスク検索、並列部分書き込みとを同時に実行することができ、したがって、2n+2サイクルで、nビットの転送を終了させることができる。
【0031】
一方、従来の連想メモリでは、全てのビットに対して、検索、書き込みマスクを、互いに独立のサイクルで設定する必要があるので、nビットを転送する場合、4nサイクルが必要になる。したがって、たとえば8ビットを転送する場合、上記実施例である連想メモリM1を用いると、18サイクルの処理で足りるが、従来の連想メモリM0を用いると、32サイクルの処理が必要になり、上記実施例では、従来例の56%の時間で転送処理を終了させることができる。
【0032】
次に、連想メモリM1を用いた場合における演算処理の手順を説明する。
【0033】
図3は、上記実施例における加算処理の手順を示すフローチャートである。なお、ここでは、被加算更新フィールド31のnビット(nは任意の自然数)のデータと、加算フィールド32のnビットのデータとを加算し、被加算更新フィールド31に格納する場合を例にとって説明する。
【0034】
被加算更新フィールド31、加算フィールド32は、シフト動作可能なマスクレジスタ15、17に対応するワードに割り付けるフィールドであり、キャリーデータを格納するキャリーフィールド(C)33は、シフト動作不可能なマスクレジスタ16、18に対応するワードに割り付けるフィールドである。
【0035】
まず、下位1ビット目の加算処理(X +Y →X )を実行する。つまり、サイクル1において、検索マスク設定によって、被加算更新フィールド31の下位1ビット目(X )、加算フィールド32の下位1ビット目(Y )、キャリーフィールド33以外をマスクし、サイクル2において、書き込みマスク設定によって、被加算更新フィールド31の下位1ビット目(X )、キャリーデータを格納するキャリーフィールド33以外をマスクする。
【0036】
そして、サイクル3において、(X ,Y ,C)=(0,0,1)のものをマスク検索する。つまり、X =0、Y =0、C(キャリーフィールド33)=1を満足するワードを探し、このワードにヒットフラグを立てる。次に、サイクル4において、(X 、C)=(1,0)で並列部分書き込みを行う。つまり、X =0、C=0になるように書き込む。また、サイクル5において、(X ,Y ,C)=(1,0,1)であるワードをマスク検索し、サイクル6において、(X ,C)=(0,1)で並列部分書き込みを行い、つまり、X =0、C=1になるように書き込む。そして、サイクル7において、(X ,Y ,C)=(1,1,0)のものをマスク検索し、サイクル8において、(X ,C)=(0,1)で並列部分書き込みをし、サイクル9において、(X ,Y ,C)=(0,1,0)のものをマスク検索し、サイクル10において、(X ,C)=(1,0)で並列部分書き込みを行い、これと同時に、検索マスクレジスタ15をシフトアップする。
【0037】
検索マスクレジスタ15の上記シフトアップによって、被加算更新フィールド31の下位2ビット目(X )、加算フィールド32の下位2ビット目(Y )以外がマスクされる。なお、キャリーフィールド33は、シフトしない検索マスクレジスタ16に割り付けられているので、マスク位置が動かない。以上の手順によって、下位1ビット目の加算処理(X +Y →X )が終了する。
【0038】
なお、下位1ビット目(X )と下位1ビット目(Y )とを加算する場合、(X ,Y ,C)が、(0,1,1)、(1,1,1)、(0,0,0)、(1,0,0)であるワードについてはマスク検索しない。これは、それらについて加算したとしても、下位1ビット目(X )の値が変化しないので、加算を行う必要がなく、したがって、それらについてはマスク検索しない。下位1ビット目以外のビットについて加算する場合も上記と同様である。
【0039】
次に、下位2ビット目の加算処理(X +Y +C→X )を実行する。つまり、サイクル11において、(X ,Y ,C)=(0,0,1)のビットをマスク検索し、これと同時に、マスクレジスタ15、17をシフトアップする。書き込みマスクレジスタ15、17の上記シフトアップによって、被加算更新フィールド31の下位2ビット目(X )以外がマスクされる。キャリーフィールド33は、シフトしない書き込みマスクレジスタ18に割り付けられているので、マスク位置が動かない。そして、サイクル12において、(X ,C)=(1,0)で並列部分書き込みを行う。以下、上記のサイクル4からサイクル10と同様の処理を行う。以上の手順によって、下位2ビット目の加算処理(X +Y +C→X )が終了される。
【0040】
そして、nビットの全てに対して、上記手順と同様の手順を実行することによって、nビットの加算処理を行うことができる。
【0041】
上記のように、連想メモリM1を用いることによって、2ビット目から、検索/書き込みマスクの設定とマスク検索、並列部分書き込みとを同時に実行することができ、nビットの加算を、8n+2サイクルで終了することができる。
【0042】
一方、従来の連想メモリM0では、全てのビットに対して、検索、書き込みマスクを独立のサイクルで設定する必要があるので、nビットを加算するには、10nサイクル必要になる。したがって、たとえば8ビットでは、上記実施例である連想メモリM1を用いた場合、66サイクルの処理で足りるが、従来の連想メモリM0を用いた場合、80サイクルの処理が必要になり、上記実施例では、従来例の83%の時間で加算処理を終了することができる。
【0043】
すなわち、上記のデータ転送、演算処理において、2ビット目以降の処理は、前に処理したビットの1ビット上位または下位のビットになる。よって、次の処理ビットの検索、書き込みマスク位置は、前の処理ビットのマスクレジスタの値をシフトアップまたはシフトダウンさせたものになる。したがって、検索マスクレジスタ15、書き込みマスクレジスタ17を、シフト動作可能なレジスタにし、マスク検索、並列部分書き込みとシフト動作とを同時に行うモード手段を設け、2ビット目からは、上記モード手段を用いることによって、従来、検索、書き込みマスクを設定するために独立に要していた時間を必要としなくなるので、多ビットのデータ転送、演算処理の高速化が可能になる。
【0044】
一方、演算処理において、フラグビット等の位置が固定されているので、マスクレジスタをシフトすると、正しく処理できないものが存在する。したがって、マスクレジスタのうちでシフトしないレジスタを設け、フラグビット等に対しては、上記シフトしないレジスタに格納するようにする。このようにすることによって、上記のような演算処理を適用することができる。
【0045】
つまり、連想メモリM1は、データ検索マスクレジスタと、書き込みマスクレジスタと、ワード部と、アドレスデコーダと、ヒットフラグレジスタと、これらを制御する制御部とを有する連想メモリにおいて、上記データ検索マスクレジスタと上記書き込み検索マスクレジスタとをシフト動作させる手段と、上記検索マスクレジスタのシフト動作と上記ワード部に対する並列部分書き込み動作とを同時に実行させる手段と、上記書き込みマスクレジスタのシフト動作と上記ワード部に対するマスク検索動作とを同時に実行させる手段とを、上記制御部が有する連想メモリである。このようにすることによって、図2に示したデータ転送処理が実現される。
【0046】
なお、上記ワード部に対する並列部分書き込み動作とを同時に実行させる手段に対応する機能と、上記書き込みマスクレジスタのシフト動作と上記ワード部に対するマスク検索動作とを同時に実行させる手段に対応する機能とを、制御部113が有している。
【0047】
また、連想メモリM1において、上記データ検索マスクレジスタと上記書き込み検索マスクレジスタとをシフト動作させる手段は、一部のビットに対してのみシフト動作させる手段であり、このようにすることによって、一部シフト不可能のビットが存在するので、これをキャリー用のビットに充当すれば、図3に示す加算処理が実現される。
【0048】
【発明の効果】
本発明によれば、検索、書き込みマスクレジスタ、ワード、アドレスデコーダ、ヒットフラグレジスタを有する連想メモリにおいて、上記検索、書き込みマスクレジスタの一部をシフト動作可能なレジスタによって構成し、上記検索マスクレジスタのシフトとワードに対する並列部分書き込みとを同時に行うモード手段と、上記書き込みマスクレジスタのシフトとワードに対するマスク検索とを同時に行うモード手段とを設けたので、多ビットのデータ転送、演算処理時間が短いという効果を奏する。
【図面の簡単な説明】
【図1】本発明の一実施例である連想メモリM1の基本構成のブロック図である。
【図2】上記実施例におけるデータ転送手順を示すフローチャートである。
【図3】上記実施例における加算処理の手順を示すフローチャートである。
【図4】従来の連想メモリM0を示す図である。
【符号の説明】
M1…連想メモリ、
14…アドレス検索マスクレジスタ、
15、16…データ検索マスクレジスタ、
17、18…書き込みマスクレジスタ、
19…アドレスデコーダ、
110…ワード(読み出しのみ)、
111…ワード(読み書き可能)、
112…ヒットフラグレジスタ、
113…制御部、
21…転送元フィールド、
22…転送先フィールド、
31…被加算更新フィールド、
32…加算フィールド、
33…キャリーフィールド。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an associative memory used as a massively parallel processing element (PE) when configuring various massively parallel computing devices such as an image processing system.
[0002]
[Prior art]
With the visualization and added value of network services, the need for advanced image processing, sound processing, and knowledge processing is increasing. However, since the above processing generally requires an enormous processing performance, it is often difficult to execute the processing using an existing microprocessor or signal processing processor based on the Neumann architecture.
[0003]
Therefore, as a device effective for the above processing, a large number of processing elements (PEs) for performing various logic and arithmetic operations are mounted, and a single instruction stream / multiple data stream system (SIMD) is used to control each PE from one control circuit. For example, a device (a massively parallel computing device) is known in which a single instruction sequence is provided to each PE so that each PE can execute the above-described arithmetic processing at the same time.
[0004]
2. Description of the Related Art An associative memory is known as an integrated circuit that can realize the above massively parallel computing device with a very small amount of hardware. This associative memory is described in “Ogura, T. et al.” “A20-kbit Associate Associate LSI for Artificial Intelligence Machines”, IEEE J. Solid, Stat. 1989 ".
[0005]
FIG. 4 is a diagram showing a conventional associative memory M0.
[0006]
The conventional associative memory M0 includes an address search mask register 44, a data search mask register 45, a write mask register 46, an address decoder 47, a hit flag register 410, a word (read only) 48, and a word (read / write enabled). ) 49.
[0007]
The conventional associative memory M0 has a function of reading and writing data in an arbitrary word 49 via the data input / output port 42 when an address value is given to the address input / output port 41, like a normal memory. .
[0008]
Further, the conventional associative memory M0 collates search data given via the data input / output port 42 with the contents of a word in parallel, sets a hit flag for a matched word, and a hit flag. Has a parallel partial write function of writing data given via the data input / output port 42 in parallel to the word on which the word is set. By using the mask search function and the parallel partial write function, it is possible to execute various data transfer, logic, and arithmetic processing in word parallel and bit serial. That is, each word can be used as the processing element.
[0009]
The data transfer and the arithmetic processing are executed by setting a search mask and a write mask for the processing target bit and the flag bit, and repeating the mask search and the parallel partial writing.
[0010]
[Problems to be solved by the invention]
Meanwhile, among various massively parallel algorithms such as image processing, sound processing, and knowledge processing, there are many that need to perform multi-bit data transfer and arithmetic processing. For example, in order to process a 256-tone image, 8-bit data transfer and arithmetic processing are indispensable. Since data transfer and arithmetic processing in the associative memory are performed in a bit-serial manner, generally, the processing time of these multi-bits occupies a large proportion. In order to realize a parallel computing device, it is desired that the above data transfer and arithmetic processing be completed in as short a time as possible.
[0011]
In the conventional associative memory M0, when a search mask and a write mask are set, the search mask and the write mask are set by directly providing a mask value via the address input / output port 41 and the data input / output port 42. I am trying to do it. Therefore, when performing multi-bit transfer and operation in the conventional associative memory M0, it is necessary to reset the search mask and the write mask in a cycle independent of each other for each bit. There is a problem that the arithmetic processing time is long.
[0012]
SUMMARY OF THE INVENTION It is an object of the present invention to provide an associative memory in which multi-bit data transfer and operation processing time are short.
[0013]
[Means for Solving the Problems]
The present invention relates to an associative memory having a data search mask register, a write mask register, a word section, an address decoder, a hit flag register, and a control section that controls the data search mask register and the write search register. Means for performing a shift operation on the mask register; means for simultaneously performing the shift operation on the search mask register and the parallel partial write operation on the word part; the shift operation on the write mask register and the mask search operation on the word part. Are simultaneously executed by the control unit.
[0014]
Embodiments and Examples of the Invention
FIG. 1 is a block diagram showing a basic configuration of an associative memory M1 according to one embodiment of the present invention.
[0015]
The associative memory M1 includes an address search mask register 14, data search mask registers 15, 16, write mask registers 17, 18, an address decoder 19, a word (read only) 110, a word (read / write) 111, It has a hit flag register 112 and a control unit 113.
[0016]
The address search mask register 14 is composed of a normal register and cannot perform a shift operation. The data search mask register 15 is constituted by a shift register, and is capable of 1-bit shift up / down operation. The data search mask register 16 is a normal register and cannot perform a shift operation. The write mask register 17 is constituted by a shift register, and is capable of performing a 1-bit shift up / down operation. The write mask register 18 is a normal register and cannot perform a shift operation.
[0017]
The associative memory M1 has a mask search function and a parallel partial write function.
[0018]
The mask search function is a function of collating the search data provided via the data input / output port 12 with the contents of the word in parallel, and setting a hit flag for the word having the matching result. When an instruction indicating the mode is given via the control unit 13, the control unit 113 decodes the instruction, activates the mask search activation control line 114, and searches the search mask registers 14, 15, 16, words 110, 111. And the like to execute the decoded instruction.
[0019]
The parallel partial write function is a function for writing data given via the data input / output port 12 in parallel to a word for which a hit flag is set, and indicates the mode via the instruction input port 13. When an instruction is given, the control unit 113 decodes the instruction, activates the parallel partial write activation control line 116, and operates the write mask registers 17, 18, words 110, 111, etc. This is the function to execute the instruction.
[0020]
By using the mask search function and the parallel partial write function, the associative memory M1 can execute various data transfer, logic, and arithmetic processing in a word parallel manner and a bit serial manner. it can.
[0021]
The associative memory M1 has a function of simultaneously performing the shift-up / down operation in the data search mask register 15 and the parallel partial write operation for the word 111. This function is such that, when an instruction indicating the mode is given via the instruction input port 13, the control unit 113 decodes the instruction, and executes a search mask register shift activation control line 115 and a parallel partial write activation control line 116. Is a function to execute the decoded instruction by validating both.
[0022]
Further, the associative memory M1 has a function of simultaneously shifting up / down the write mask register 17 and performing the above-described mask search for the word 111. This function is such that when an instruction indicating the mode is given via the instruction input port 13, the control unit 113 decodes the instruction, and the write mask register shift activation control line 117, the mask search activation control line 114 Is a function for executing the decoded instruction by making both of them effective.
[0023]
A shift mode, a mask search, and a parallel partial write mode in the function of simultaneously performing the shift operation and the parallel partial write operation in the data search mask register 15 and the function of simultaneously performing the shift operation and the mask search operation in the write mask register 17 are described. Since only one of the operations is selected, the operations in the mask registers 14, 15, and 16 do not conflict with each other.
[0024]
Next, a data transfer procedure when the associative memory M1 is used will be described.
[0025]
FIG. 2 is a flowchart showing a data transfer procedure in the above embodiment. In the following, a procedure for transferring data of n bits (n is an arbitrary natural number) of the transfer source field 21 to n bits of the transfer destination field 22 will be described as an example. Further, the transfer source field 21 and the transfer destination field 22 are assigned to words corresponding to the mask registers 15 and 17 that can perform the shift operation.
[0026]
First, transfer of data of the first upper bit (X 1 → Y 1 ) is executed. That is, a search mask is set in cycle 1, that is, a portion other than the upper first bit (X 1 ) of the source field 21 is masked, and a write mask is set in cycle 2, that is, the upper first bit of the destination field 22. The mask other than (Y 1 ) is masked, and in cycle 3, a mask search is performed on the upper first bit (X 1 ) of the transfer source field 21 and the data is transferred to the hit flag register 111.
[0027]
Then, in cycle 4, running parallel partial write to the upper 1 bit of the destination field 22 (Y 1), and transfers the data of the hit flag register 111 to bit Y 1, and at the same time, the search mask register Shift down 15. By shifting down the search mask register 15, bits other than the second bit (X 2 ) of the transfer source field 21 are masked. Through the above procedure, the transfer of the data of the first upper bit (X 1 → Y 1 ) is completed.
[0028]
Next, transfer of data of the upper 2 bits (X 2 → Y 2 ) is executed. That is, in cycle 5, a mask search is performed on the upper second bit (X 2 ) of the transfer source field 21, data is transferred to the hit flag register 111, and at the same time, the write mask register 17 is shifted down. By shifting down the write mask register 17, a portion other than the upper second bit (Y 2 ) of the transfer destination field 22 is masked. Then, in cycle 6 performs parallel partial write for the upper second bit of the destination field 22 (Y 2), transfers the data of the hit flag register 111 to the bit Y 2, at the same time the search mask register 15 Shift down. With the above procedure, the transfer of the data of the second upper bit (X 2 → Y 2 ) is completed.
[0029]
Then, by executing a procedure similar to the above procedure for all of the n bits, the n-bit data transfer (X n → Y n ) is completed.
[0030]
As described above, by using the associative memory M1, the setting of the search / write mask, the mask search, and the parallel partial write can be simultaneously executed from the second bit. Therefore, in 2n + 2 cycles, n bits can be obtained. The transfer can be terminated.
[0031]
On the other hand, in the conventional associative memory, it is necessary to set the search and write masks for all the bits in cycles independent of each other. Therefore, when transferring n bits, 4n cycles are required. Therefore, for example, when transferring 8 bits, 18 cycles of processing are sufficient if the associative memory M1 of the above embodiment is used. However, if the conventional associative memory M0 is used, 32 cycles of processing are required. In the example, the transfer processing can be completed in 56% of the time in the conventional example.
[0032]
Next, the procedure of the arithmetic processing when the associative memory M1 is used will be described.
[0033]
FIG. 3 is a flowchart showing the procedure of the addition process in the above embodiment. Here, an example will be described in which n-bit (n is an arbitrary natural number) data of the augmented / updated field 31 and n-bit data of the augmented field 32 are added and stored in the augmented / updated field 31. I do.
[0034]
The added / updated field 31 and the added field 32 are fields assigned to words corresponding to the mask registers 15 and 17 that can perform shift operations. The carry field (C) 33 that stores carry data is a mask register that cannot perform shift operations. Fields assigned to words corresponding to 16 and 18.
[0035]
First, the addition processing of the lower first bit (X 1 + Y 1 → X 1 ) is executed. In other words, in cycle 1, except for the lower first bit (X 1 ) of the added / updated field 31, the lower first bit (Y 1 ) of the added field 32, and the carry field 33, the search mask is set. The write mask setting masks portions other than the lower first bit (X 1 ) of the augmented / updated field 31 and the carry field 33 for storing carry data.
[0036]
Then, in cycle 3, masks find ones (X 1, Y 1, C ) = (0,0,1). That is, a word that satisfies X 1 = 0, Y 1 = 0, and C (carry field 33) = 1 is searched, and a hit flag is set for this word. Next, in cycle 4, the parallel portions writing (X 1, C) = ( 1,0). That is, writing is performed so that X 1 = 0 and C = 0. Further, in cycle 5, a mask search is performed for a word in which (X 1 , Y 1 , C) = ( 1 , 0, 1), and in cycle 6, a parallel part is obtained by (X 1 , C) = (0, 1). Writing is performed, that is, writing is performed so that X 1 = 0 and C = 1. Then, in cycle 7, the parallel partial writing in (X 1, Y 1, C ) = a masked search ones (1,1,0), in cycle 8, (X 1, C) = (0,1) In cycle 9, a mask search is performed for (X 1 , Y 1 , C) = (0, 1 , 0), and in cycle 10, the parallel part is obtained by (X 1 , C) = (1, 0). Writing is performed, and at the same time, the search mask register 15 is shifted up.
[0037]
Due to the above-described shift-up of the search mask register 15, portions other than the lower-order second bit (X 2 ) of the add-update field 31 and the lower-order second bit (Y 2 ) of the addition field 32 are masked. Since the carry field 33 is allocated to the non-shifted search mask register 16, the mask position does not move. With the above procedure, the lower-order 1-bit addition processing (X 1 + Y 1 → X 1 ) is completed.
[0038]
In addition, when adding the lower first bit (X 1 ) and the lower first bit (Y 1 ), (X 1 , Y 1 , C) becomes (0, 1, 1), (1, 1, 1) ), (0,0,0), and (1,0,0) are not mask-searched. This means that even if they are added, since the value of the lower first bit (X 1 ) does not change, there is no need to perform addition, and therefore, no mask search is performed for them. The same applies to the case where addition is performed for bits other than the lower first bit.
[0039]
Next, the addition processing of the lower 2 bits (X 2 + Y 2 + C → X 2 ) is executed. That is, in the cycle 11, the bit of (X 2 , Y 2 , C) = (0, 0, 1) is searched for a mask, and at the same time, the mask registers 15 and 17 are shifted up. Due to the above-described shift-up of the write mask registers 15 and 17, portions other than the lower-order second bit (X 2 ) of the added / updated field 31 are masked. Since the carry field 33 is allocated to the non-shifted write mask register 18, the mask position does not move. Then, in cycle 12, parallel partial writing is performed with (X 2 , C) = (1, 0). Hereinafter, the same processing as the above-described cycle 4 to cycle 10 is performed. With the above procedure, the addition processing of the lower 2 bits (X 2 + Y 2 + C → X 2 ) is completed.
[0040]
Then, by performing the same procedure as the above procedure for all n bits, the addition processing of n bits can be performed.
[0041]
As described above, by using the associative memory M1, the setting of the search / write mask, the mask search, and the parallel partial writing can be simultaneously executed from the second bit, and the addition of n bits is completed in 8n + 2 cycles. can do.
[0042]
On the other hand, in the conventional associative memory M0, since it is necessary to set the search and write masks for all the bits in independent cycles, it takes 10n cycles to add n bits. Therefore, for example, when using the associative memory M1 of the above-described embodiment, processing of 66 cycles is sufficient for 8 bits, but when using the conventional associative memory M0, processing of 80 cycles is required. Then, the addition process can be completed in 83% of the time of the conventional example.
[0043]
That is, in the above-described data transfer and arithmetic processing, the processing of the second and subsequent bits is one bit higher or lower than the previously processed bit. Therefore, the search / write mask position of the next processing bit is obtained by shifting up or down the value of the mask register of the previous processing bit. Therefore, the search mask register 15 and the write mask register 17 are made shiftable registers, and a mode means for simultaneously performing the mask search, the parallel partial writing and the shift operation is provided, and the mode means is used from the second bit. As a result, the time required independently for setting a search and a write mask is no longer required, so that multi-bit data transfer and arithmetic processing can be speeded up.
[0044]
On the other hand, in arithmetic processing, since the position of a flag bit or the like is fixed, if the mask register is shifted, there are some which cannot be correctly processed. Therefore, a non-shifting register is provided among the mask registers, and a flag bit or the like is stored in the non-shifting register. By doing so, the above-described arithmetic processing can be applied.
[0045]
That is, the associative memory M1 is an associative memory having a data search mask register, a write mask register, a word section, an address decoder, a hit flag register, and a control section that controls these. Means for performing a shift operation on the write search mask register, means for simultaneously performing the shift operation on the search mask register and the parallel partial write operation on the word portion, a shift operation on the write mask register and a mask on the word portion. The associative memory of the control unit includes means for simultaneously executing the search operation. By doing so, the data transfer processing shown in FIG. 2 is realized.
[0046]
A function corresponding to means for simultaneously executing the parallel partial write operation on the word part and a function corresponding to means for simultaneously executing the shift operation of the write mask register and the mask search operation on the word part are described below. The control unit 113 has it.
[0047]
Also, in the associative memory M1, the means for shifting the data search mask register and the write search mask register is means for shifting only some of the bits. Since there are bits that cannot be shifted, if these bits are applied to carry bits, the addition process shown in FIG. 3 is realized.
[0048]
【The invention's effect】
According to the present invention, in an associative memory having a search and write mask register, a word, an address decoder, and a hit flag register, a part of the search and write mask register is configured by a register capable of performing a shift operation. Since the mode means for simultaneously performing the shift and the parallel partial writing for the word and the mode means for simultaneously performing the shift of the write mask register and the mask search for the word are provided, the time required for multi-bit data transfer and calculation processing is short. It works.
[Brief description of the drawings]
FIG. 1 is a block diagram of a basic configuration of an associative memory M1 according to an embodiment of the present invention.
FIG. 2 is a flowchart showing a data transfer procedure in the embodiment.
FIG. 3 is a flowchart illustrating a procedure of an addition process in the embodiment.
FIG. 4 is a diagram showing a conventional associative memory M0.
[Explanation of symbols]
M1: associative memory,
14 ... Address search mask register,
15, 16 ... data search mask register,
17, 18 ... write mask register,
19 ... Address decoder,
110 ... word (read only),
111 ... word (readable and writable),
112 ... hit flag register,
113 ... control unit,
21: transfer source field,
22 ... destination field,
31 ... augmented update field,
32 ... addition field,
33 ... Carry field.

Claims (2)

データ検索マスクレジスタと、書き込みマスクレジスタと、ワード部と、アドレスデコーダと、ヒットフラグレジスタと、これらを制御する制御部とを有する連想メモリにおいて、
上記データ検索マスクレジスタと上記書き込み検索マスクレジスタとをシフト動作させる手段と;
上記検索マスクレジスタのシフト動作と、上記ワード部に対する並列部分書き込み動作とを同時に実行させる手段と;
上記書き込みマスクレジスタのシフト動作と、上記ワード部に対するマスク検索動作とを同時に実行させる手段と;
を上記制御部が有することを特徴とする連想メモリ。
In an associative memory having a data search mask register, a write mask register, a word section, an address decoder, a hit flag register, and a control section for controlling these,
Means for shifting the data search mask register and the write search mask register;
Means for simultaneously executing a shift operation of the search mask register and a parallel partial write operation to the word portion;
Means for simultaneously executing the shift operation of the write mask register and the mask search operation for the word portion;
The associative memory, characterized in that the control unit has:
請求項1において、
上記データ検索マスクレジスタと上記書き込み検索マスクレジスタとをシフト動作させる手段は、一部のビットに対してのみシフトさせる手段であることを特徴とする連想メモリ。
In claim 1,
An associative memory, wherein the means for shifting the data search mask register and the write search mask register is means for shifting only some of the bits.
JP11648397A 1997-04-18 1997-04-18 Associative memory Expired - Fee Related JP3594212B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11648397A JP3594212B2 (en) 1997-04-18 1997-04-18 Associative memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11648397A JP3594212B2 (en) 1997-04-18 1997-04-18 Associative memory

Publications (2)

Publication Number Publication Date
JPH10293768A JPH10293768A (en) 1998-11-04
JP3594212B2 true JP3594212B2 (en) 2004-11-24

Family

ID=14688238

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11648397A Expired - Fee Related JP3594212B2 (en) 1997-04-18 1997-04-18 Associative memory

Country Status (1)

Country Link
JP (1) JP3594212B2 (en)

Also Published As

Publication number Publication date
JPH10293768A (en) 1998-11-04

Similar Documents

Publication Publication Date Title
US7908461B2 (en) Cellular engine for a data processing system
US5790854A (en) Efficient stack utilization for compiling and executing nested if-else constructs in a vector data processing system
US5710902A (en) Instruction dependency chain indentifier
JP3442225B2 (en) Arithmetic processing unit
US5848286A (en) Vector word shift by vo shift count in vector supercomputer processor
US5481746A (en) Vector shift functional unit for successively shifting operands stored in a vector register by corresponding shift counts stored in another vector register
US20110231616A1 (en) Data processing method and system
WO2006112045A1 (en) Processor
JPH09311786A (en) Data processor
JPH05233281A (en) Electronic computer
CN105302543A (en) Running a 32-bit operating system on a 64-bit processor
US7546442B1 (en) Fixed length memory to memory arithmetic and architecture for direct memory access using fixed length instructions
US6430684B1 (en) Processor circuits, systems, and methods with efficient granularity shift and/or merge instruction(s)
JPS6155707B2 (en)
US6542989B2 (en) Single instruction having op code and stack control field
US11830547B2 (en) Reduced instruction set processor based on memristor
US20020013796A1 (en) Method of processing data
JPH05150979A (en) Immediate operand expansion system
JP3594212B2 (en) Associative memory
JP2703884B2 (en) Data write control method
US7124280B2 (en) Execution control apparatus of data driven information processor for instruction inputs
US6564312B1 (en) Data processor comprising an arithmetic logic unit
JP4444305B2 (en) Semiconductor device
US20040093484A1 (en) Methods and apparatus for establishing port priority functions in a VLIW processor
US5774740A (en) Central processing unit for execution of orthogonal and non-orthogonal instructions

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040730

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040827

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20080910

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090910

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090910

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100910

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100910

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110910

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120910

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130910

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees