JP4892720B2 - Minimum Euclidean distance search associative memory device - Google Patents

Minimum Euclidean distance search associative memory device Download PDF

Info

Publication number
JP4892720B2
JP4892720B2 JP2005266250A JP2005266250A JP4892720B2 JP 4892720 B2 JP4892720 B2 JP 4892720B2 JP 2005266250 A JP2005266250 A JP 2005266250A JP 2005266250 A JP2005266250 A JP 2005266250A JP 4892720 B2 JP4892720 B2 JP 4892720B2
Authority
JP
Japan
Prior art keywords
circuit
euclidean distance
search
associative memory
circuits
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.)
Active
Application number
JP2005266250A
Other languages
Japanese (ja)
Other versions
JP2007080375A (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.)
Hiroshima University NUC
Original Assignee
Hiroshima University NUC
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 Hiroshima University NUC filed Critical Hiroshima University NUC
Priority to JP2005266250A priority Critical patent/JP4892720B2/en
Publication of JP2007080375A publication Critical patent/JP2007080375A/en
Application granted granted Critical
Publication of JP4892720B2 publication Critical patent/JP4892720B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

本発明は、カラー、グレースケールの画像圧縮、画像認識等の情報処理装置に用いられ、全並列処理による最小ユークリッド距離検索機能を有する連想メモリ装置に関する。   The present invention relates to an associative memory device that is used in information processing devices such as color and gray scale image compression and image recognition, and has a minimum Euclidean distance search function based on full parallel processing.

近年、情報処理技術、特に画像圧縮・画像認識の分野においては、最小距離検索機能を持つ連想メモリが注目されている。連想メモリは、知的情報処理で必要となる物体認識のためのパターンマッチングやコードブックと呼ばれるデータ群を利用したデータ圧縮に非常に有効である。連想メモリは、入力されたデータ列(検索データ)に対して連想メモリ内にある複数の参照データ中から最も類似した(距離の近い)データを検索する機能を持つ機能メモリの代表的なものの一つであり、その優れた検索機能により、先に述べた画像圧縮・画像認識などのパターンマッチング機能を有するアプリケーションにおいて、その性能を飛躍的に向上できるものとして期待されている。   In recent years, an associative memory having a minimum distance search function has attracted attention in the field of information processing technology, particularly image compression and image recognition. The associative memory is very effective for pattern matching for object recognition required for intelligent information processing and data compression using a data group called a code book. The associative memory is one of the typical functional memories having a function of retrieving the most similar (closest distance) data from a plurality of reference data in the associative memory with respect to the input data string (search data). The excellent search function is expected to dramatically improve the performance of the application having the above-described pattern matching function such as image compression and image recognition.

kビット×Wユニット幅R個の参照データから、入力データと最も似ているデータを見つけることはパターンマッチングにおいて基本的な処理である(非特許文献1)。ゆえに画像圧縮、画像認識などの情報処理には、最小距離検索連想メモリ(特許文献1)は中核を担う部分であるといえる。既存の全並列最小距離検索連想メモリとしては、単純な距離であるマンハッタン、ハミング距離の検索機能を持つものがそれぞれ提案されている。これらの距離は以下の数1で定義される(非特許文献2)。   Finding data that is most similar to input data from reference data of k bits × W unit widths R is a basic process in pattern matching (Non-patent Document 1). Therefore, it can be said that the minimum distance search associative memory (Patent Document 1) is a core part for information processing such as image compression and image recognition. As existing all parallel minimum distance search associative memories, those having a simple distance search function for Manhattan and Hamming distance have been proposed. These distances are defined by the following formula 1 (Non-patent Document 2).

ここで、SW={SW1,SW2,・・・,SWw}は入力データ、REF={REF1,REF2,・・・,REFw}は参照データを表す。SWiとREFiが1ビットの2進数である場合、Dはハミング距離となる。また、SWiとREFiがkビット(k>1)の2進数であるときに、Dはマンハッタン距離となる。これまでに、全並列最小ハミング距離検索アーキテクチャ(非特許文献2)や全並列最小マンハッタン距離検索アーキテクチャ(非特許文献3、特許文献2)が提案されてきている。 Here, SW = {SW 1 , SW 2 ,..., SW w } represents input data, and REF = {REF 1 , REF 2 ,..., REF w } represents reference data. When SW i and REF i are 1-bit binary numbers, D is a Hamming distance. Further, when SW i and REF i are binary numbers of k bits (k> 1), D is a Manhattan distance. So far, a fully parallel minimum Hamming distance search architecture (Non-patent document 2) and a fully parallel minimum Manhattan distance search architecture (Non-patent documents 3 and 2) have been proposed.

しかし、いくつかのアプリケーションで使用されるアルゴリズムにおいては、距離指標としてユークリッド距離を適用することが望まれている。ユークリッド距離は数2で表されるものであり、ベクトル空間における2点間の距離を測定する尺度としてはマンハッタン距離よりも正確である。   However, in an algorithm used in some applications, it is desired to apply Euclidean distance as a distance index. The Euclidean distance is expressed by Equation 2, and is more accurate than the Manhattan distance as a measure for measuring the distance between two points in the vector space.

特開2002−288985号公報JP 2002-288985 A 特開2005−209317号公報JP 2005-209317 A 特開2004−5825号公報JP 2004-5825 A D. R. Tveter, "The Pattern Recognition Basis of Artificial Intelligence," Los Alamitos, CA: IEEE computer society, 1998.D. R. Tveter, "The Pattern Recognition Basis of Artificial Intelligence," Los Alamitos, CA: IEEE computer society, 1998. H.J.Mattausch,T.Gyohten, Y. Soda, and T. Koide, "Compact Associative-Memory Architecture with Fully-Parallel Search Capability for the Minimum Hamming Distance," IEEE Journal of Solid-State Circuits, Vol. 37, pp. 218-227, 2002.HJMattausch, T.Gyohten, Y. Soda, and T. Koide, "Compact Associative-Memory Architecture with Fully-Parallel Search Capability for the Minimum Hamming Distance," IEEE Journal of Solid-State Circuits, Vol. 37, pp. 218 -227, 2002. H. J. Mattausch, N. Omori, S. Fukae, T. Koide and T. Gyohten, "Fully-Parrallel Pattern-Matching Engine with Dynamic Adaptibility to Hamming or Manhattan Distance," 2002 Symposium on VLSI Circuits Digest of Technical Papers, pp. 252-255, 2002.HJ Mattausch, N. Omori, S. Fukae, T. Koide and T. Gyohten, "Fully-Parrallel Pattern-Matching Engine with Dynamic Adaptibility to Hamming or Manhattan Distance," 2002 Symposium on VLSI Circuits Digest of Technical Papers, pp. 252 -255, 2002. P. Heim, F. Krummenacher and E. A. Vittoz, "CMOS Full-wave Operational Transconductance Rectifier with Improved DC Transfer Characteristic," Electron. Lett., vol. 28, pp. 333-334, 1992.P. Heim, F. Krummenacher and E. A. Vittoz, "CMOS Full-wave Operational Transconductance Rectifier with Improved DC Transfer Characteristic," Electron. Lett., Vol. 28, pp. 333-334, 1992. Y. Tulay and J. S. Marsland, "A Conic Section Function Network Synapse and Neuron Implementation in VLSI Hardware," IEEE Conf. Neural Networks, pp. 974-979, 1996.Y. Tulay and J. S. Marsland, "A Conic Section Function Network Synapse and Neuron Implementation in VLSI Hardware," IEEE Conf. Neural Networks, pp. 974-979, 1996. S. Churcher, A. F. Murray and H. M. Reekie, "Programmable Analogue VLSI for Radial Basis Function Networks," Electron. Lett., vol. 29, pp.1603-1605, 1993.S. Churcher, A. F. Murray and H. M. Reekie, "Programmable Analogue VLSI for Radial Basis Function Networks," Electron. Lett., Vol. 29, pp. 1603-1605, 1993. O. Landolt, E. Vittoz and P. Heim, "CMOS Selfbiased Euclidean Distance Computing Circuit with Highdynamic Range," Electron. Lett., vol. 28, pp. 352-354, 1992.O. Landolt, E. Vittoz and P. Heim, "CMOS Selfbiased Euclidean Distance Computing Circuit with Highdynamic Range," Electron. Lett., Vol. 28, pp. 352-354, 1992. S. Collins, G. F. Marshall and D. R. Brown, "An Analogue Radial Basis Function Circuit Using a Compact Euclidean Distance Calculator," IEEE Int. Symp. Circuits Systems, pp. 233-236, 1994.S. Collins, G. F. Marshall and D. R. Brown, "An Analogue Radial Basis Function Circuit Using a Compact Euclidean Distance Calculator," IEEE Int. Symp. Circuits Systems, pp. 233-236, 1994. P. Hasler, B. A. Minch, J. Dugger, and C. Dorio, "Adaptive Circuits and Synapses using Floating Gate Devices," in Learning on Silicon: Adaptive VLSI Neural Systems, G. Cauwenberghs and M. A. Bayoumi, Eds. Boston, MA: Kluwer, pp. 33-65, 1999.P. Hasler, BA Minch, J. Dugger, and C. Dorio, "Adaptive Circuits and Synapses using Floating Gate Devices," in Learning on Silicon: Adaptive VLSI Neural Systems, G. Cauwenberghs and MA Bayoumi, Eds. Boston, MA: Kluwer, pp. 33-65, 1999. M. Freeman, M. Weeks and J. Austin, "Hardware Implementation of Similarity Functions," IADIS International Conference on Applied Computing, Algarve, Portugal, vol. 2, pp. 329-332, 2005.M. Freeman, M. Weeks and J. Austin, "Hardware Implementation of Similarity Functions," IADIS International Conference on Applied Computing, Algarve, Portugal, vol. 2, pp. 329-332, 2005. Y. Yano, T. Koide and H. J. Mattausch, "Fully Parallel Nearest Manhattan-distance Search Memory with Large Reference-pattern Number," Extend. Abst. of the Int. Conf. on Solid State Devices and Materials (SSDM'2002), pp. 254-255, 2002.Y. Yano, T. Koide and HJ Mattausch, "Fully Parallel Nearest Manhattan-distance Search Memory with Large Reference-pattern Number," Extend. Abst. Of the Int. Conf. On Solid State Devices and Materials (SSDM'2002), pp. 254-255, 2002.

これまでに多くのユークリッド距離を計算する回路が提案されている(非特許文献4〜7)。しかし、それらの大部分において計算できる距離の大きさの制限や回路規模が大きいことなどの欠点がある。   So far, many circuits for calculating the Euclidean distance have been proposed (Non-Patent Documents 4 to 7). However, in most of them, there are disadvantages such as limitation of the distance that can be calculated and large circuit scale.

これらの問題を解決するために、フローティングゲートを用いたいくつかの回路が開発されている(非特許文献8、9)。しかし、この回路は回路シミュレーションが難しいために、チップ製造前に回路動作を予想して設計することが難しい。   In order to solve these problems, several circuits using floating gates have been developed (Non-Patent Documents 8 and 9). However, since this circuit is difficult to perform circuit simulation, it is difficult to design it by predicting the circuit operation before manufacturing the chip.

一方、ユークリッド距離を逐次的に計算する回路とそのハードウェア記述言語VHDLによる記述が報告されている(非特許文献10)。この回路は乗算器、加算器、レジスタ、平方根計算回路を用いたディジタル回路であるが、実装トランジスタ数が非常に多いために各参照データと入力データを全並列処理する連想メモリには適していない。   On the other hand, a circuit that sequentially calculates the Euclidean distance and a description using the hardware description language VHDL have been reported (Non-Patent Document 10). This circuit is a digital circuit using a multiplier, an adder, a register, and a square root calculation circuit. However, since the number of mounted transistors is very large, it is not suitable for an associative memory in which each reference data and input data are processed in parallel. .

ユークリッド距離を計算するためには二乗と平方根という複雑な計算が必要である。特に平方根は最新のプロセッサを使用しても負荷の大きな計算である。なぜなら平方根は近似を繰り返すこと、つまり値を入れてその値がエラーマージン以内になるまで繰り返し計算をすることにより算出されるからである。ハードウェアとして平方根の計算機能を持っていないような場合に、たとえ小さな値の平方根の計算でさえ不可能である。   In order to calculate the Euclidean distance, a complex calculation of square and square root is required. In particular, the square root is a heavy calculation even with the latest processor. This is because the square root is calculated by repeating the approximation, that is, by repeatedly calculating until the value is within the error margin. Even if it does not have a square root calculation function as hardware, even calculation of a square root of a small value is impossible.

以上のように、ハードウェアで全並列最小ユークリッド距離検索メモリを実現する効果的なアーキテクチャはこれまで提案されていない。   As described above, an effective architecture that realizes a fully parallel minimum Euclidean distance search memory in hardware has not been proposed so far.

最も近いユークリッド距離を持つパターンデータを検索するために平方根の計算は必要ではなく2乗した距離だけを比較することで十分である。なぜならパターンマッチングでは、距離の相対的な大きさの比較だけが必要であり、平方根はこの相対的な大きさを変えないからである。本発明に係る連想メモリ装置は、このような観点に基づいており、以下のように構成される。   In order to retrieve pattern data having the nearest Euclidean distance, calculation of the square root is not necessary, and it is sufficient to compare only the squared distances. This is because pattern matching requires only a comparison of the relative magnitudes of distances, and the square root does not change this relative magnitude. The associative memory device according to the present invention is based on such a viewpoint and is configured as follows.

検索データについて複数の参照データと並列に差の絶対値計算に基づくユークリッド距離の2乗を計算する距離計算回路と、前記ユークリッド距離の2乗の計算結果から最小距離の参照データを検索する検索回路とをメモリ上に形成してなる連想メモリ装置であって、
前記検索データおよび参照データがそれぞれkビット(k>1)単位でユニット化されている場合に、
前記距離計算回路は、
前記参照データをユニット単位で保存するためのW列R行のユニット保存回路(US)と、
ユニット毎に参照データと検索データの差の絶対値計算を行うW列R行のユニット比較回路(UC)と、
行毎に前記W列のユニット比較回路で計算された差の絶対値の2乗の和に相当する電流または電圧信号を生成するR行のワード重み比較回路(WC)とを備えることを特徴とする。
A distance calculation circuit for calculating the square of the Euclidean distance based on the absolute value calculation of the difference in parallel with a plurality of reference data, and a search circuit for searching for the reference data of the minimum distance from the calculation result of the square of the Euclidean distance Is an associative memory device formed on a memory,
When the search data and the reference data are unitized in units of k bits (k> 1),
The distance calculation circuit includes:
A W column R row unit storage circuit (US) for storing the reference data in units;
A unit comparison circuit (UC) of W columns and R rows that calculates the absolute value of the difference between the reference data and the search data for each unit;
An R row word weight comparison circuit (WC) that generates a current or voltage signal corresponding to the sum of the squares of the absolute values of the differences calculated by the W column unit comparison circuit for each row. To do.

本発明による連想メモリ装置では、距離計算回路においてユークリッド距離の2乗を計算し、このユークリッド距離の2乗の計算結果から最小距離の参照データを検索回路において検索するようにしており、平方根計算を行わないため、回路規模の縮小および計算処理の高速化を実現することができる。この結果、連想メモリ装置への適用において、低消費電力で小面積なチップ構成で最小ユークリッド距離検索を実現することができる。   In the associative memory device according to the present invention, the distance calculation circuit calculates the square of the Euclidean distance, and the reference data for the minimum distance is searched for in the search circuit from the calculation result of the square of the Euclidean distance. Since this is not performed, the circuit scale can be reduced and the calculation process can be speeded up. As a result, when applied to an associative memory device, the minimum Euclidean distance search can be realized with a chip configuration with low power consumption and a small area.

このように、本発明では、全並列連想メモリベースシステムにおいて、カラーやグレースケールの画像圧縮・画像認識などに必要なユークリッド距離計算回路を開発し、低消費電力で小面積な最小ユークリッド距離検索連想メモリ装置を実現する。特にこの回路構成は、パターンマッチングアプリケーション(例えば、ネットワークルータ、コードブックベースデータ圧縮、および、対象認識)に対して従来のCMOS技術を用いて高効率な全並列連想メモリ装置のチップ化を可能にする。   As described above, the present invention has developed a Euclidean distance calculation circuit necessary for color / grayscale image compression / recognition in a fully parallel associative memory-based system, and has a low-power and small-area minimum Euclidean distance search association. A memory device is realized. In particular, this circuit configuration enables high-efficiency fully parallel associative memory device chips using conventional CMOS technology for pattern matching applications (eg, network routers, codebook-based data compression, and object recognition). To do.

以下、図面を参照して、本発明を実施するための最良な形態を詳細に説明する。
[全並列型連想メモリアーキテクチャ]
図1は、本発明に係る全並列型連想メモリ装置のアーキテクチャを示すブロック図である。メモリコア部分は、メモリ領域100、ウィナー・ラインナップ増幅回路(以下、WLA回路(Winner Line-Up Amplifier))200、全ウィナー取得回路(以下、WTA回路(Winner Take All Circuit))300で構成されており、また、周辺回路として列デコーダおよびR/W回路(Column Decoder and Read/Write(k×W Columns))110、行デコーダ(Row Decoder(R Rows))120、検索データ保存回路(Search Data(k×W Bits))130を持つ。この連想メモリ装置は集積回路として1チップ上に実現されており、上記メモリコア部分および周辺回路はこの1チップ上に形成されている。
The best mode for carrying out the present invention will be described below in detail with reference to the drawings.
[Fully parallel associative memory architecture]
FIG. 1 is a block diagram showing the architecture of a fully parallel associative memory device according to the present invention. The memory core portion is composed of a memory area 100, a winner lineup amplifier circuit (hereinafter referred to as a WLA circuit (Winner Line-Up Amplifier)) 200, and an entire winner acquisition circuit (hereinafter referred to as a WTA circuit (Winner Take All Circuit)) 300. In addition, as a peripheral circuit, a column decoder and R / W circuit (Column Decoder and Read / Write (k × W Columns)) 110, a row decoder (Row Decoder (R Rows)) 120, a search data storage circuit (Search Data ( k × W Bits)) 130. This associative memory device is realized as an integrated circuit on one chip, and the memory core portion and the peripheral circuit are formed on this one chip.

メモリ領域100は、参照データをユニット(kビット)単位で保存するためのSRAMセルで形成されるW×R個のユニット保存回路(Unit Storage:US)、ユニット毎に参照データと検索データの差の絶対値計算を行うW×R個のユニット比較回路(Unit Comparison:UC)、計算した絶対差をアナログ電圧(あるいは電流)に変換し変換結果を2乗するR個のワード重み比較回路(Word Comparison:WC)により構成されている。   The memory area 100 includes W × R unit storage circuits (Unit Storage: US) formed of SRAM cells for storing reference data in units (k bits), and the difference between reference data and search data for each unit. W × R unit comparison circuits (Unit Comparison: UC) that calculate the absolute value of R, and R word weight comparison circuits (Word) that convert the calculated absolute difference into an analog voltage (or current) and square the conversion result Comparison: WC).

ワード重み比較回路WCで生成された信号C(Comparison Signal)はWLA回路200に入り、WLA回路200がこの信号Cを回路自身のバランスにより制御し、最初の段階で各行の電圧の差を最も大きく増幅する。WLA回路200とWTA回路300は、行数Rに対する面積増加の割合が行数Rに対して線形のO(R)になるという特徴がある。   A signal C (Comparison Signal) generated by the word weight comparison circuit WC enters the WLA circuit 200, and the WLA circuit 200 controls the signal C according to the balance of the circuit itself, and at the first stage, the voltage difference of each row is maximized. Amplify. The WLA circuit 200 and the WTA circuit 300 are characterized in that the rate of area increase with respect to the number of rows R is O (R) that is linear with respect to the number of rows R.

WTA回路300は、WLA回路200により増幅された各行の電圧出力LAの差を更に増幅する機能を持つ。WTA回路300の出力WTAにおいては、winner(ウィナー)行が"1"、その他のloser(ルーザ)行が"0"のディジタル信号となる。WLA回路200は、フィードバック信号をワード重み比較回路WCに返す際に、当該WLA回路200に内蔵された電圧フォロワ回路を用いることにより、フィードバックを高速化している。
[ユークリッド距離計算回路]
最も近いユークリッド距離を持つパターンデータを検索するために平方根の計算は必要ではなく2乗した距離だけを比較することで十分である。なぜならパターンマッチングでは、距離の相対的な大きさの比較だけが必要であり、平方根はこの相対的な大きさを変えないからである。本実施形態の連想メモリ装置に用いられるユークリッド距離計算回路は、このような観点に基づいて構成されている。
The WTA circuit 300 has a function of further amplifying the difference between the voltage outputs LA of the respective rows amplified by the WLA circuit 200. The output WTA of the WTA circuit 300 is a digital signal in which the winner row is “1” and the other loser rows are “0”. When returning the feedback signal to the word weight comparison circuit WC, the WLA circuit 200 uses a voltage follower circuit built in the WLA circuit 200 to speed up the feedback.
[Euclidean distance calculation circuit]
In order to retrieve pattern data having the nearest Euclidean distance, calculation of the square root is not necessary, and it is sufficient to compare only the squared distances. This is because pattern matching requires only a comparison of the relative magnitudes of distances, and the square root does not change this relative magnitude. The Euclidean distance calculation circuit used in the associative memory device of this embodiment is configured based on such a viewpoint.

本実施形態によるユークリッド距離計算回路は、図1に示すように、取り扱うデータを符号化したkビット(k>1)相当のユニットをW個並べたものとなる。連想メモリ装置の入力となる検索データと連想メモリ装置内に格納されている参照データ(i行)をそれぞれSW、REFiとおくとき、SWとREFiの間のユークリッド距離の2乗は数3のように表される。 As shown in FIG. 1, the Euclidean distance calculation circuit according to the present embodiment is configured by arranging W units corresponding to k bits (k> 1) in which handled data is encoded. Reference data stored in the input to become the search data and the associative memory apparatus of the associative memory device (i line) and SW respectively, when placing the REF i, number squared Euclidean distance between SW and REF i 3 It is expressed as

ユークリッド距離は主にカラー画像やグレースケール画像などのkビット、W個のデータの比較を必要とする画像データ処理などに用いられる。ユークリッド距離の計算を実現するためには、重み付けされた検索データ(SW)と参照データ(REFi)の比較を行う回路、すなわちW個のユニットそれぞれの2つのkビットデータの差の絶対値(|SWj−REFij|)を生成する回路と、この絶対差の2乗を計算する回路が必要となる。 The Euclidean distance is mainly used for image data processing that requires comparison of k-bit and W data such as a color image and a grayscale image. In order to realize the calculation of the Euclidean distance, a circuit that compares the weighted search data (SW) and the reference data (REF i ), that is, the absolute value of the difference between the two k-bit data of each of the W units ( | SW j −REF ij |) and a circuit for calculating the square of the absolute difference are required.

図2は、連想メモリ装置内に構築される、行iに対するユークリッド距離計算回路の構成を示すブロック図(Wユニット分)である。図2において、USi1〜USiWはそれぞれ非反転信号SWおよび反転信号〜SW(〜は反転を意味する。以下同様)のkビットバイナリコードデータによる検索データユニットを取り込み、予め保存されている参照データユニットと共にビット単位で保存するユニット保存回路、UCi1〜UCiWはそれぞれkビット減算器および絶対値計算回路を備え、ユニット保存回路USi1〜USiWから検索データSWと参照データREFiを受け取り、両者の差の絶対値を計算するユニット比較回路である。各ユニット比較回路UCi1〜UCiWで計算された検索データSWと参照データREFiの差の絶対値のデータは、各ビットの出力OUT={0,1}のディジタル値として、ワード重み比較回路WCiへ送られ、ワード重み比較回路WCiにおいて、全ビットのユークリッド距離の2乗(絶対差の2乗)の総和を計算する。 FIG. 2 is a block diagram (for W units) showing the configuration of the Euclidean distance calculation circuit for row i constructed in the associative memory device. In FIG. 2, US i1 to US iW are obtained by fetching search data units based on k-bit binary code data of the non-inverted signal SW and the inverted signals ~ SW (where ~ means inversion, the same applies hereinafter) and stored in advance. Unit storage circuits UC i1 to UC iW that store data in units of bits together with data units are each provided with a k-bit subtractor and an absolute value calculation circuit, and receive search data SW and reference data REF i from unit storage circuits US i1 to US iW . The unit comparison circuit calculates the absolute value of the difference between the two. The data of the absolute value of the difference between the search data SW and the reference data REF i calculated by each of the unit comparison circuits UC i1 to UC iW is used as a digital value of the output OUT = {0, 1} of each bit. sent to WC i, in the word weight comparison circuit WC i, to calculate the sum of the squares of the Euclidean distances of all the bits (square of the absolute differences).

ワード重み比較回路WCiには、ユニット比較回路UCi1〜UCiWの各々に対して電流変換回路10およびアナログ2乗回路20が設けられている。 In the word weight comparison circuit WC i , a current conversion circuit 10 and an analog square circuit 20 are provided for each of the unit comparison circuits UC i1 to UC iW .

各ユニット比較回路UCi1〜UCiWから出力されるディジタル信号OUT1〜OUTkは、対応する電流変換回路10でアナログ電流に変換される。各電流変換回路10は、対応するユニット比較回路から出力されるディジタル信号OUT1〜OUTk(ディジタルの距離)をアナログ電流に変換するために、それぞれのディジタル信号をゲートに受けるk個のPMOS(電流変換トランジスタ)が用いられている。ここでは各ビットの出力値OUT1,OUT2,…,OUTkを、それぞれビットの位置に応じて、最下位ビットの出力OUT1の電流値の2k-1倍になるように調整し重み付けが行われている。調整方法としては、各ビットの出力OUTkに接続するトランジスタのゲート幅Wkを整数(2k-1×W0)倍(W0は基準となるトランジスタ幅を示す)して、アナログ2乗回路20に接続しているトランジスタに流れる電流値を制御することで各ビットの重み付けを行う。 Digital signals OUT 1 to OUT k output from the unit comparison circuits UC i1 to UC iW are converted into analog currents by the corresponding current conversion circuits 10. Each current conversion circuit 10 converts k digital signals OUT 1 to OUT k (digital distances) output from the corresponding unit comparison circuits into analog currents, and receives k digital PMOS signals (k) (received at the gate). Current conversion transistor) is used. Here, the output values OUT 1 , OUT 2 ,..., OUT k of each bit are adjusted and weighted so as to be 2 k-1 times the current value of the output OUT 1 of the least significant bit according to the position of each bit. Has been done. As an adjustment method, the gate width W k of the transistor connected to the output OUT k of each bit is multiplied by an integer (2 k−1 × W 0 ) (W 0 indicates a reference transistor width), and the square of the analog Each bit is weighted by controlling the value of the current flowing through the transistor connected to the circuit 20.

各電流変換回路10からの出力電流Iiは、対応するアナログ2乗回路20により2乗される。アナログ2乗回路20の回路構成例を図3に示す。各アナログ2乗回路20から出力される電流(絶対差の2乗に応じた電流)Ioはマッチラインに流れ、これによって各グループの検索データSWiと参照データREFijのユークリッド距離の2乗に対応した電流が流れ、全体の検索データSWと参照データREFiのユークリッド距離DEuclid, iの2乗に相当する電流値Iが得られる。この電流値Iは電圧値に変換されてWLA回路200、WTA回路300に送られ、最もユークリッド距離が最小となる行の信号が増幅され、距離が最小の行から"1"が出力される。 The output current I i from each current conversion circuit 10 is squared by the corresponding analog squaring circuit 20. A circuit configuration example of the analog squaring circuit 20 is shown in FIG. The current (current corresponding to the square of the absolute difference) I o output from each analog squaring circuit 20 flows to the match line, whereby the square of the Euclidean distance between the search data SW i and the reference data REF ij of each group. A current value I corresponding to the square of the Euclidean distance D Euclid, i between the entire search data SW and the reference data REF i is obtained. The current value I is converted into a voltage value and sent to the WLA circuit 200 and the WTA circuit 300. The signal of the row with the shortest Euclidean distance is amplified, and “1” is output from the row with the shortest distance.

なお、図2に示したユニット保存回路(US)、ユニット比較回路(UC)については公知の回路を用いて実現可能であり、たとえば特許文献2に開示されているものを用いて実現することができる。
[最小ユークリッド距離検索連想メモリの性能評価]
本実施形態に基づく最小ユークリッド距離検索連想メモリの性能をHSPICEによってシミュレーションで確認した。テクノロジは0.35μm CMOSで16個の5-bitバイナリ(図2におけるW=16、k=5)と128個の参照データ(図1におけるR=128)を用いた。図3に示したアナログ2乗回路20のBasic Squarer部についてのシミュレーション結果を図4に、最小ユークリッド距離の参照データを検索するための時間(Winner 検索時間)の結果を図5に、平均消費電力の結果を図6にそれぞれ示す。このように、本実施形態に基づく最小ユークリッド距離検索連想メモリは、ウィナーを参照データとウィナー距離の広い範囲において見つけることができる。
[本実施形態の変形例]
なお、図2に示したユークリッド距離計算回路の代わりに図7に示すユークリッド距離計算回路を用いることも可能である。図7に示すユークリッド距離計算回路のワード重み比較回路WCiには、ユニット比較回路UCi1〜UCiWの各々に対してディジタル2乗回路30および電流変換回路40が設けられている。各ユニット比較回路UCi1〜UCiWから出力されるディジタル信号(kビット)OUT1〜OUTkは、対応するディジタル2乗回路により2乗される。ディジタル2乗回路30からの出力(2kビット、k>1)OUT1〜OUT2kは、対応する電流変換回路40でアナログ電流に変換される。各電流変換回路40は、対応するディジタル2乗回路30から出力されるディジタル信号OUT1〜OUT2kをアナログ電流に変換するために、それぞれのディジタル信号をゲートに受ける2k個のPMOS(電流変換トランジスタ)が用いられている。ここでは各ビットの出力値OUT1,OUT2,…,OUT2kを、それぞれビットの位置に応じて、最下位ビットの出力OUT1の電流値の22k1倍になるように調整し重み付けが行われている。調整方法としては、各ビットの出力OUT2k(k>1)に接続するトランジスタのゲート幅W2kを整数(22kー1×W0)倍(W0は基準となるトランジスタ幅を示す)して、電流変換回路40内のトランジスタに流れる電流値を制御することで各ビットの重み付けを行う。各電流変換回路40から出力される電流(絶対差の2乗に応じた電流)はマッチラインに流れ、これによって各グループの検索データSWiと参照データREFijのユークリッド距離の2乗に対応した電流が流れ、全体の検索データSWと参照データREFiのユークリッド距離DEuclid, iの2乗に相当する電流値Iが得られる。
The unit storage circuit (US) and the unit comparison circuit (UC) shown in FIG. 2 can be realized by using a known circuit, for example, by using the one disclosed in Patent Document 2. it can.
[Performance evaluation of minimum Euclidean distance search associative memory]
The performance of the minimum Euclidean distance search associative memory based on this embodiment was confirmed by simulation with HSPICE. The technology used was 0.35 μm CMOS and 16 5-bit binaries (W = 16, k = 5 in FIG. 2) and 128 reference data (R = 128 in FIG. 1). The simulation results for the Basic Squarer section of the analog squaring circuit 20 shown in FIG. 3 are shown in FIG. 4, the time for searching the reference data of the minimum Euclidean distance (Winner search time) is shown in FIG. The results are shown in FIG. Thus, the minimum Euclidean distance search associative memory according to the present embodiment can find a winner in a wide range of reference data and a winner distance.
[Modification of this embodiment]
Note that the Euclidean distance calculation circuit shown in FIG. 7 can be used instead of the Euclidean distance calculation circuit shown in FIG. In the word weight comparison circuit WC i of the Euclidean distance calculation circuit shown in FIG. 7, a digital squaring circuit 30 and a current conversion circuit 40 are provided for each of the unit comparison circuits UC i1 to UC iW . Digital signal output from each unit comparator circuits UC i1 ~UC iW (k bits) OUT 1 to OUT k is squared by the corresponding digital squaring circuit. The output from the digital squaring circuit 30 (2k bits, k> 1) OUT 1 ~OUT 2k is converted into an analog current by the corresponding current conversion circuit 40. Each current conversion circuit 40 includes 2k PMOS (current conversion transistors) that receive respective digital signals at their gates in order to convert the digital signals OUT 1 to OUT 2k output from the corresponding digital squaring circuit 30 into analog currents. ) Is used. Here, the output values OUT 1 , OUT 2 ,..., OUT 2k of each bit are adjusted and weighted so as to be 2 2k - 1 times the current value of the output OUT 1 of the least significant bit according to the position of each bit. Has been done. As an adjustment method, the gate width W 2k of the transistor connected to the output OUT 2k (k> 1) of each bit is multiplied by an integer (2 2k −1 × W 0 ) (W 0 indicates a reference transistor width). Thus, each bit is weighted by controlling the current value flowing through the transistor in the current conversion circuit 40. The current output from each current conversion circuit 40 (current corresponding to the square of the absolute difference) flows to the match line, thereby corresponding to the square of the Euclidean distance between the search data SW i and the reference data REF ij of each group. A current flows, and a current value I corresponding to the square of the Euclidean distance D Euclid, i of the entire search data SW and reference data REF i is obtained.

また、本実施形態において示した回路(図2、3、7)の論理は一例であり、論理回路を正または負論理に反転させることも可能である。例えば、メモリ領域のN−MOSをP−MOS、電流変換回路10,40のP−MOSをN−MOSに変更したりしても、その作用効果に変わりはない。   The logic of the circuits (FIGS. 2, 3, and 7) shown in this embodiment is an example, and the logic circuit can be inverted to positive or negative logic. For example, even if the N-MOS in the memory area is changed to P-MOS and the P-MOS in the current conversion circuits 10 and 40 is changed to N-MOS, the operational effect remains unchanged.

本発明に係る連想メモリ装置は、人工知能システム、データバンクシステム、インターネットルータ、モバイル端末(例えば、モバイルテレビ電話)、コードブックベースデータ圧縮、および、対象認識などの圧縮、認識処理技術全般に利用することができる。   The associative memory device according to the present invention is used for artificial intelligence systems, data bank systems, Internet routers, mobile terminals (for example, mobile videophones), codebook-based data compression, compression such as object recognition, and general recognition processing techniques. can do.

本発明に係る実施形態として、ユークリッド距離計算回路を用いる全並列型連想メモリ装置のアーキテクチャを示すブロック図。1 is a block diagram showing an architecture of a fully parallel associative memory device using an Euclidean distance calculation circuit as an embodiment according to the present invention. 図1に示すメモリ内のユークリッド距離計算回路の1行分の構成を示すブロック図。The block diagram which shows the structure for 1 line of the Euclidean distance calculation circuit in the memory shown in FIG. 図2に示すアナログ2乗回路の内部構成を示す回路図。FIG. 3 is a circuit diagram showing an internal configuration of the analog square circuit shown in FIG. 2. 図3に示したアナログ2乗回路20のBasic Squarer部についてのシミュレーション結果を示す図。The figure which shows the simulation result about the Basic Squarer part of the analog squaring circuit 20 shown in FIG. Winner 検索時間のシミュレーション結果を示す図。The figure which shows the simulation result of Winner search time. 平均消費電力のシミュレーション結果を示す図。The figure which shows the simulation result of average power consumption. 図1に示すメモリ内のユークリッド距離計算回路の1行分の構成の変形例を示すブロック図。The block diagram which shows the modification of the structure for 1 line of the Euclidean distance calculation circuit in the memory shown in FIG.

符号の説明Explanation of symbols

100 メモリ領域
200 ウィナー・ラインナップ増幅回路(WLA:Winner Line-Up Amplifier)
300 全ウィナー取得回路(WTA:Winner Take All Circuit)
110 行デコーダおよびR/W回路(Column Decoder and Read/Write (k x W Column))
120 列デコーダ(Row Decoder (R Rows))
130 検索データ保存回路(Search Data (k bit x W))
US ユニット保存回路(Unit Storage)
UC ユニット比較回路(Unit Comparison)
WC ワード重み比較回路(Word Comparison)
10 電流変換回路
20 アナログ2乗回路
30 ディジタル2乗回路
40 電流変換回路

100 memory area 200 winner line-up amplifier (WLA)
300 Winner Take All Circuit (WTA)
110 Row Decoder and Read / Write (kx W Column)
120 Row Decoder (R Rows)
130 Search Data Storage Circuit (Search Data (k bit x W))
US Unit Storage Circuit (Unit Storage)
UC Unit Comparison Circuit (Unit Comparison)
WC Word Weight Comparison Circuit (Word Comparison)
DESCRIPTION OF SYMBOLS 10 Current conversion circuit 20 Analog square circuit 30 Digital square circuit 40 Current conversion circuit

Claims (4)

検索データについて複数の参照データと並列に差の絶対値計算に基づくユークリッド距離の2乗を計算する距離計算回路と、前記ユークリッド距離の2乗の計算結果から最小距離の参照データを検索する検索回路とをメモリ上に形成してなる連想メモリ装置であって、
前記検索データおよび参照データがそれぞれkビット(k>1)単位でユニット化されている場合に、
前記距離計算回路は、
前記参照データをユニット単位で保存するためのW列R行のユニット保存回路と、
ユニット毎に参照データと検索データの差の絶対値計算を行うW列R行のユニット比較回路と、
行毎に前記W列のユニット比較回路で計算された差の絶対値の2乗の和に相当する電流または電圧信号を生成するR行のワード重み比較回路とを備える、
ことを特徴とする最小ユークリッド距離検索連想メモリ装置。
A distance calculation circuit for calculating the square of the Euclidean distance based on the absolute value calculation of the difference in parallel with a plurality of reference data, and a search circuit for searching for the reference data of the minimum distance from the calculation result of the square of the Euclidean distance Is an associative memory device formed on a memory,
When the search data and the reference data are unitized in units of k bits (k> 1),
The distance calculation circuit includes:
A unit storage circuit of W columns and R rows for storing the reference data in units;
A unit comparison circuit of W columns and R rows that calculates the absolute value of the difference between the reference data and the search data for each unit;
A word weight comparison circuit for R rows that generates a current or voltage signal corresponding to the sum of the squares of the absolute values of the differences calculated by the unit comparison circuit for the W columns for each row.
A minimum Euclidean distance search associative memory device.
請求項1において、
前記R行のワード重み比較回路の各々は、
対応する行のユニット比較回路の各々に対応させて電流変換回路とアナログ2乗回路とが設けられており、
前記電流変換回路の各々は、
対応するユニット比較回路から出力されるディジタル信号をアナログ電流に変換するものであり、
前記アナログ2乗回路の各々は、
対応する電流変換回路からの出力電流を2乗して対応する行のマッチラインに出力するものである、
ことを特徴とする最小ユークリッド距離検索連想メモリ。
In claim 1,
Each of the R row word weight comparison circuits comprises:
A current conversion circuit and an analog square circuit are provided corresponding to each of the unit comparison circuits in the corresponding row,
Each of the current conversion circuits includes:
The digital signal output from the corresponding unit comparison circuit is converted into an analog current.
Each of the analog square circuits is
The output current from the corresponding current conversion circuit is squared and output to the match line of the corresponding row.
A minimum Euclidean distance search associative memory.
請求項1において、
前記R行のワード重み比較回路の各々は、
対応する行のユニット比較回路の各々に対応させてディジタル2乗回路と電流変換回路とが設けれており、
前記ディジタル2乗回路の各々は、
対応するユニット比較回路から出力されるディジタル信号を2乗するものであり、
前記電流変換回路の各々は、
対応するディジタル2乗回路から出力されるディジタル信号をアナログ電流に変換して対応する行のマッチラインに出力するものである、
ことを特徴とする最小ユークリッド距離検索連想メモリ。
In claim 1,
Each of the R row word weight comparison circuits comprises:
A digital squaring circuit and a current conversion circuit are provided corresponding to each of the unit comparison circuits in the corresponding row,
Each of the digital squaring circuits
The digital signal output from the corresponding unit comparison circuit is squared,
Each of the current conversion circuits includes:
A digital signal output from a corresponding digital squaring circuit is converted into an analog current and output to a match line of the corresponding row;
A minimum Euclidean distance search associative memory.
請求項1において、
前記距離計算回路および前記検索回路は半導体集積回路の同一チップ上に形成されている、
ことを特徴とする最小ユークリッド距離検索連想メモリ。

In claim 1,
The distance calculation circuit and the search circuit are formed on the same chip of a semiconductor integrated circuit,
A minimum Euclidean distance search associative memory.

JP2005266250A 2005-09-14 2005-09-14 Minimum Euclidean distance search associative memory device Active JP4892720B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005266250A JP4892720B2 (en) 2005-09-14 2005-09-14 Minimum Euclidean distance search associative memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005266250A JP4892720B2 (en) 2005-09-14 2005-09-14 Minimum Euclidean distance search associative memory device

Publications (2)

Publication Number Publication Date
JP2007080375A JP2007080375A (en) 2007-03-29
JP4892720B2 true JP4892720B2 (en) 2012-03-07

Family

ID=37940521

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005266250A Active JP4892720B2 (en) 2005-09-14 2005-09-14 Minimum Euclidean distance search associative memory device

Country Status (1)

Country Link
JP (1) JP4892720B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6085187B2 (en) * 2013-02-13 2017-02-22 国立大学法人広島大学 Associative memory

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03283193A (en) * 1990-03-30 1991-12-13 Hikari Mizutani Associate memory associating reference storage whose humming distance is the nearest
JP3731046B2 (en) * 2001-01-19 2006-01-05 国立大学法人広島大学 Semiconductor associative memory
JP2005190429A (en) * 2003-12-26 2005-07-14 Hiroshima Univ Reference data recognition/learning method and pattern recognition system
JP3861157B2 (en) * 2004-02-27 2006-12-20 国立大学法人広島大学 Reference data optimization device and pattern recognition system

Also Published As

Publication number Publication date
JP2007080375A (en) 2007-03-29

Similar Documents

Publication Publication Date Title
US7203382B2 (en) Pattern matching and pattern recognition system, associative memory apparatus, and pattern matching and pattern recognition processing method
Chen et al. NAGphormer: A tokenized graph transformer for node classification in large graphs
KR20160142791A (en) Method and apparatus for implementing neural network
Kaukoranta et al. A fast exact GLA based on code vector activity detection
Mattausch et al. Compact associative-memory architecture with fully parallel search capability for the minimum Hamming distance
WO2005083632A1 (en) Reference data optimization learning method and pattern recognition system
JP7070653B2 (en) Learning devices, speech recognition ranking estimators, their methods, and programs
Lou et al. A mixed signal architecture for convolutional neural networks
US7113416B2 (en) Associative memory apparatus for searching data in which manhattan distance is minimum
Tsai et al. RePIM: Joint exploitation of activation and weight repetitions for in-ReRAM DNN acceleration
US6693815B2 (en) Semiconductor associative memory
US11366874B2 (en) Analog circuit for softmax function
Kim et al. Provable memorization capacity of transformers
JP4892720B2 (en) Minimum Euclidean distance search associative memory device
Abedin et al. Mixed digital–analog associative memory enabling fully-parallel nearest euclidean distance search
JP4208958B2 (en) Amplifier circuit and associative memory
CN116310624A (en) Model training method for image and unsupervised image hash retrieval method
CN114692076A (en) Memristor chip and operation method thereof
Abedin et al. Fully parallel associative memory architecture with mixed digital-analog match circuit for nearest Euclidean distance search
Abedin et al. Fully-parallel associative memory architecture realizing minimum euclidean distance search
Zhang et al. Image retrieval via balanced and maximum variance deep hashing
Hsiao et al. Quantization of Deep Neural Network Models Considering Per-Layer Computation Complexity for Efficient Execution in Multi-Precision Accelerators
CN117009530A (en) Aspect-level emotion classification method and aspect-level emotion classification model
Jou et al. CMOS implementation of neural networks for speech recognition
JP2024012076A (en) Storage device for in-memory computing

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080718

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110705

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150