JP4785492B2 - Memory system and search method - Google Patents

Memory system and search method Download PDF

Info

Publication number
JP4785492B2
JP4785492B2 JP2005305628A JP2005305628A JP4785492B2 JP 4785492 B2 JP4785492 B2 JP 4785492B2 JP 2005305628 A JP2005305628 A JP 2005305628A JP 2005305628 A JP2005305628 A JP 2005305628A JP 4785492 B2 JP4785492 B2 JP 4785492B2
Authority
JP
Japan
Prior art keywords
address
data
value
search
memory
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
JP2005305628A
Other languages
Japanese (ja)
Other versions
JP2007115015A (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 JP2005305628A priority Critical patent/JP4785492B2/en
Publication of JP2007115015A publication Critical patent/JP2007115015A/en
Application granted granted Critical
Publication of JP4785492B2 publication Critical patent/JP4785492B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、複数のメモリ内に、その値の昇順または降順に並べて格納されたデータ列(検索対象データ)の中に、特定の値のデータ(検索キーデータ)が含まれているかどうかを検索するメモリシステムおよびデータの検索方法に関するものである。   The present invention searches for data having a specific value (search key data) in a data string (data to be searched) stored in a plurality of memories arranged in ascending or descending order. The present invention relates to a memory system and a data search method.

従来、その値に応じて、1つのメモリの中に複数のデータを昇順または降順に並べて格納しておき、格納されているデータ列中に、特定の値のデータと一致する値のデータが含まれているかどうかを検索する方法として二分法が知られている。以下、一例として、図7のように、N0〜N14までの15個のデータが、その値に応じて、メモリのアドレス1000〜1014に昇順(N0≦N1≦ … ≦N14)に格納されている場合を例に挙げて二分法について説明する。   Conventionally, according to the value, a plurality of data are arranged in ascending or descending order in one memory and stored, and the stored data string includes data of a value that matches the data of a specific value. The bisection method is known as a method for searching whether or not the image is detected. Hereinafter, as an example, as shown in FIG. 7, 15 data from N0 to N14 are stored in ascending order (N0 ≦ N1 ≦... ≦ N14) in memory addresses 1000 to 1014 according to the values. The bisection method will be described by taking a case as an example.

二分法では、15個のデータ列の中にデータVが含まれているかどうかを検索する場合、まず、データ列の中央のアドレス1007のデータN7を読み出し、VとN7とを比較する。その結果、V=N7であれば、その時点で検索は終了する。また、V<N7であれば、データVはデータN8〜N14には含まれていないので、次にアドレス1000〜1006のデータN0〜N6を検索し、逆にV>N7であれば、次に1008〜1014のデータN8〜N14を検索する。   In the bisection method, when searching whether or not the data V is included in the 15 data strings, first, the data N7 at the address 1007 at the center of the data string is read, and V and N7 are compared. As a result, if V = N7, the search ends at that time. If V <N7, the data V is not included in the data N8 to N14, so the data N0 to N6 at the addresses 1000 to 1006 are searched next. Data N8 to N14 of 1008 to 1014 are searched.

例えば、次にアドレス1000〜1006のデータN0〜N6を検索する場合も同様に、その中央のアドレス1003のN3とVとを比較する。この二分法のように、検索範囲を毎回約1/2に絞って検索する方法で、2のN乗−1個のデータ列から所定のデータを検索するためには、メモリからの読み出し比較が最大N−1回必要になる。このため、データ列に含まれるデータ数が多くなるに従って、メモリからのデータ読み出し回数が多くなり、処理時間が長くなるという問題があった。   For example, when data N0 to N6 at addresses 1000 to 1006 are searched next, N3 and V at the center address 1003 are similarly compared. As in this bisection method, in order to search predetermined data from 2 N -1 data strings by a search method with the search range narrowed down to about ½ each time, read comparison from the memory is required. A maximum of N-1 times is required. For this reason, as the number of data included in the data string is increased, the number of times of reading data from the memory is increased, and the processing time is increased.

ここで、本発明に関わる先行技術文献として、特許文献1に開示の二分探索方法及び装置がある。   Here, as a prior art document related to the present invention, there is a binary search method and apparatus disclosed in Patent Document 1.

特許文献1は、その値に応じ昇順又は降順に、連続するアドレスに格納された探索対象データを逐一読み出し、探索キーの比較データと照合するもので、探索対象データを、連続アドレスの内で奇数アドレスのデータ、及び偶数アドレスのデータで区別し、2つの記憶装置に割り振り、記憶しておき、探索対象データを逐一読み出す際、奇数アドレスのデータ、及び偶数アドレスのデータを同時に読み出すようにして、2つの記憶装置に対する読み出しが同時になるようにし、読み出しと比較を並列処理している。   Patent Document 1 reads out the search target data stored in consecutive addresses one by one in ascending or descending order according to the value and collates with the comparison data of the search key. Distinguish between address data and even address data, allocate to two storage devices, store them, and when reading the search target data one by one, read the odd address data and even address data simultaneously, Reading to the two storage devices is performed simultaneously, and reading and comparison are processed in parallel.

特開平11−184858号公報Japanese Patent Laid-Open No. 11-184858

本発明の目的は、前記従来技術に基づく問題点を解消し、その値に応じて、メモリ内に昇順または降順に並べて格納されたデータ列の中に、特定の値のデータが含まれているかどうかを高速に検索することができるメモリシステムおよび検索方法を提供することにある。   An object of the present invention is to solve the problems based on the prior art, and according to the value, whether data of a specific value is included in the data string stored in ascending or descending order in the memory. It is an object of the present invention to provide a memory system and a search method capable of searching whether or not at high speed.

上記目的を達成するために、本発明は、アドレスの下位ビットの値によりアドレス空間を分割したN個(Nは4以上の2のべき乗)のメモリで構成したメモリシステム中に、昇順もしくは降順に並べられたデータ列から特定の値のデータを検索する方法であって、
互いに(N+1)M(Mは以上の整数)離れたN個のアドレスのデータを前記N個のメモリから同時に読み出し、該読み出したデータの値を前記特定の値と比較し、
前記読み出したデータの中に前記特定の値と一致する値のものが無い場合には、次に、
前記読み出したデータの値と前記特定の値との大小関係から、前記特定の値と一致する値のデータが存在するアドレス範囲を特定し、該特定したアドレス範囲内において、互いに(N+1) M-1 離れたN個のアドレスのデータを同時に読み出し、該読み出したデータの値を前記特定の値と比較することを特徴とする検索方法を提供するものである。
In order to achieve the above object, the present invention provides a memory system composed of N memories (N is a power of 2 of 4 or more) obtained by dividing the address space by the value of the lower bits of the address, in ascending or descending order. A method for searching for data having a specific value from the arranged data columns,
Read data of N addresses separated from each other by (N + 1) M (M is an integer of 2 or more) from the N memories, and compare the value of the read data with the specific value ;
If none of the read data has a value that matches the specific value, then:
From the magnitude relationship between the value of the read data and the specific value, an address range in which data having a value matching the specific value exists is specified, and within the specified address range, (N + 1) M− The present invention provides a search method characterized by simultaneously reading data at N addresses apart by one and comparing the value of the read data with the specific value .

また、本発明は、アドレスの下位ビットの値によりアドレス空間を分割した0からN−1番までの識別符号が付されたN個(Nは4以上の2のべき乗)のメモリで構成され、該N個のメモリ内に昇順もしくは降順に並べられたデータ列から特定の値のデータを検索するメモリシステムであって、
前記N個のメモリのそれぞれに対応させて設けられ、共通のグローバルアドレスと、M次(Mは2以上の整数)から0次までの整数の検索次数を示す数値Kを受け取り、互いに(N+1) K 離れたN個のアドレスに対応するローカルアドレスを生成するアドレス発生器を有することを特徴とするメモリシステムを提供する。
Further, the present invention is composed of N memories (N is a power of 2 of 4 or more) with identification codes from 0 to N-1 divided into the address space according to the value of the lower bits of the address, A memory system for retrieving data of a specific value from a data sequence arranged in ascending or descending order in the N memories,
Each of the N memories is provided in correspondence with each other and receives a common global address and a numerical value K indicating an integer search order from the Mth order (M is an integer of 2 or more) to the 0th order, and (N + 1) each other There is provided a memory system having an address generator for generating local addresses corresponding to N addresses separated by K.

ここで、前記アドレス発生器が、該グローバルアドレスに(N+1) K ×L−1(Lは1からNまでの整数)を加えたアドレスに対応するローカルアドレスをそれぞれ生成することが好ましい。 Here, the address generator, to the global address (N + 1) K × L -1 (L is an integer from 1 to N) preferably generates a local address corresponding to the address obtained by adding, respectively.

また、前記グローバルアドレスをNで除した余りがRである時に、R+L−1番(ただし、R+L−1がN以上である場合にはR+L−1−N番)の識別符号が付されたメモリに対応して設けられた前記アドレス発生器が、前記グローバルアドレスに(N+1) K ×L−1を加えたアドレスに対応するローカルアドレスを発生することが好ましい。 Further, when the remainder obtained by dividing the global address by N is R, a memory with an identification code of R + L-1 (if R + L-1 is N or more, R + L-1-N) is attached. It is preferable that the address generator provided corresponding to generate a local address corresponding to an address obtained by adding (N + 1) K × L−1 to the global address.

本発明によれば、4以上の2のべき乗個のメモリから同時にデータの読み出し比較を行うので、従来の二分法よりも高速に検索を行うことができる。また、メモリの分割数を多くするに従って、検索の次数を減らし、メモリからの読み出し比較回数を少なくすることができるので、1回の読み出し比較によって次の検索領域を従来よりも狭い範囲に絞り込むことができ、多数のデータを含むデータ列をより高速に検索することが可能になる。   According to the present invention, since data is read and compared simultaneously from four or more power-of-two memories, a search can be performed faster than the conventional bisection method. In addition, as the number of memory divisions is increased, the number of search orders can be reduced and the number of comparisons of reading from the memory can be reduced, so that the next search area is narrowed down to a narrower range than before by one read comparison. It is possible to search a data string including a large number of data at higher speed.

以下に、添付の図面に示す好適実施形態に基づいて、本発明のメモリシステムおよび検索方法を詳細に説明する。   Hereinafter, a memory system and a search method of the present invention will be described in detail based on preferred embodiments shown in the accompanying drawings.

図1は、本発明のメモリシステムの構成を表す一実施形態の概略図である。同図に示すメモリシステム10は、アドレスの下位2ビットの値によりアドレス空間を4分割した0から3番までの識別符号が付された4個のメモリ内に、その値の昇順または降順に並べられたデータ列の中から、特定の値のデータを検索するものである。メモリシステム10は、メモリコントローラ12と、4つの比較回路14a、14b、14c、14dとによって構成されている。   FIG. 1 is a schematic diagram of an embodiment showing the configuration of a memory system of the present invention. The memory system 10 shown in FIG. 1 arranges the values in ascending or descending order in four memories with identification codes 0 to 3 divided into four address spaces by the value of the lower 2 bits of the address. The data of a specific value is retrieved from the obtained data string. The memory system 10 includes a memory controller 12 and four comparison circuits 14a, 14b, 14c, and 14d.

メモリコントローラ12は、上記4個のメモリに対してデータの書き込みおよび読み出しを行う際の制御と、上記データ列の中から、特定の値のデータを検索する際の動作の制御を行う。メモリコントローラ12からは、グローバルアドレスバス26を介してグローバルアドレスが出力され、信号線30を介して各種の制御信号が出力される。また、メモリコントローラ12と4つの比較回路14a、14b、14c、14dとの間は、グローバルデータバス28を介して相互に接続されている。   The memory controller 12 performs control when data is written to and read from the four memories, and operation when searching for data of a specific value from the data string. A global address is output from the memory controller 12 via the global address bus 26, and various control signals are output via the signal line 30. The memory controller 12 and the four comparison circuits 14a, 14b, 14c, and 14d are connected to each other via a global data bus 28.

続いて、比較回路14a、14b、14c、14dは、上記4個のメモリの各々のアドレスに格納されているデータ列のうち、所定のデータ数毎に配置されているデータ(比較データ)の値と、メモリコントローラ12によって指定される特定のデータ(検索キーデータ)の値とを比較し、その比較結果を出力する。比較回路14a、14b、14c、14dから出力される全ての比較結果は、信号線36を介してメモリコントローラ12に入力される。   Subsequently, the comparison circuits 14a, 14b, 14c, and 14d are the values of the data (comparison data) arranged for each predetermined number of data among the data strings stored in the respective addresses of the four memories. And the value of specific data (search key data) designated by the memory controller 12, and the comparison result is output. All the comparison results output from the comparison circuits 14a, 14b, 14c, and 14d are input to the memory controller 12 through the signal line 36.

以下、比較回路14aを代表例として説明する。   Hereinafter, the comparison circuit 14a will be described as a representative example.

比較回路14aは、アドレス発生器16a(アドレス発生器0)と、メモリ18a(メモリ0)と、ゲート回路20a(G0)と、レジスタ22a(R0)と、比較器24a(比較器0)とによって構成されている。ここで、例えばアドレス発生器0,1,2,3における0,1,2,3の番号は、それぞれアドレス発生器16a、16b、16c、16dの識別符号(ID)を表す。例えばアドレス発生器0の識別符号は0である。他の構成要素についても同じである。   The comparison circuit 14a includes an address generator 16a (address generator 0), a memory 18a (memory 0), a gate circuit 20a (G0), a register 22a (R0), and a comparator 24a (comparator 0). It is configured. Here, for example, the numbers 0, 1, 2, and 3 in the address generators 0, 1, 2, and 3 represent the identification codes (ID) of the address generators 16a, 16b, 16c, and 16d, respectively. For example, the identification code of the address generator 0 is 0. The same applies to the other components.

アドレス発生器16aには、メモリコントローラ12から、グローバルアドレスバス26を介してグローバルアドレスが入力されるとともに、信号線30を介して各種の制御信号が入力される。また、アドレス発生器16aからは、ローカルアドレスバス32aを介してローカルアドレスが出力される。アドレス発生器16aは、メモリコントローラ12からグローバルアドレスと制御信号を受け取り、メモリ18aに対してローカルアドレスを出力する。   The address generator 16 a receives a global address from the memory controller 12 via the global address bus 26 and various control signals via the signal line 30. The address generator 16a outputs a local address via the local address bus 32a. The address generator 16a receives a global address and a control signal from the memory controller 12, and outputs a local address to the memory 18a.

メモリ18aには、上記アドレス発生器16aから、ローカルアドレスバス32aを介してローカルアドレスが入力される。また、メモリ18aは、ゲート回路20aおよび比較器24aとローカルデータバス34aを介して相互に接続されている。   A local address is input to the memory 18a from the address generator 16a via the local address bus 32a. The memory 18a is connected to the gate circuit 20a and the comparator 24a via the local data bus 34a.

メモリ18a、18b、18c、18dが前述の4個のメモリである。4個のメモリ18a、18b、18c、18dに入力されるローカルアドレスは、グローバルアドレスの下位2ビット(4値)の値によって、そのアドレス空間が4つに分割されたアドレスに対応している。本実施形態では、グローバルアドレスの下位2ビットの値が00の時にメモリ18aが選択され、以下同様に01,10,11の時にそれぞれメモリ18b、18c、18dが選択される。   The memories 18a, 18b, 18c, and 18d are the four memories described above. The local addresses input to the four memories 18a, 18b, 18c, and 18d correspond to addresses in which the address space is divided into four by the value of the lower two bits (four values) of the global address. In this embodiment, the memory 18a is selected when the value of the lower 2 bits of the global address is 00, and the memories 18b, 18c, and 18d are selected when the values are 01, 10, and 11, respectively.

つまり、メモリ18a、18b、18c、18dには、グローバルアドレスをメモリ個数の4で除算し、その剰余が0,1,2,3のアドレスに対応するメモリ空間がそれぞれ割り当てられている。例えば、メモリ18aのローカルアドレス0,1,2,…は、グローバルアドレス0,4,8,…に対応する。また、メモリ18b、18c、18dのローカルアドレス0,1,2,…は、それぞれグローバルアドレス1,5,9,…、グローバルアドレス2,6,10,…、グローバルアドレス3,7,11,…に対応する。   In other words, the memory 18a, 18b, 18c, 18d is allocated with memory spaces corresponding to addresses whose addresses are 0, 1, 2, 3 by dividing the global address by 4 of the number of memories. For example, local addresses 0, 1, 2,... Of the memory 18a correspond to global addresses 0, 4, 8,. Further, local addresses 0, 1, 2,... Of the memories 18b, 18c, 18d are global addresses 1, 5, 9,..., Global addresses 2, 6, 10,. Corresponding to

続いて、ゲート回路20aは、グローバルデータバス28を介してメモリコントローラ12と相互に接続されている。また、ゲート回路20aは、前述のように、ローカルデータバス34aを介してメモリ18aおよび比較器24aと相互に接続されている。ゲート回路20aは、例えば双方向バッファ回路等であって、メモリコントローラ12とメモリ18aとの間でデータの書き込みおよび読み出しを行う時に、グローバルデータバス28とローカルデータバス34aとの接続および切断を制御する。   Subsequently, the gate circuit 20 a is connected to the memory controller 12 via the global data bus 28. The gate circuit 20a is connected to the memory 18a and the comparator 24a via the local data bus 34a as described above. The gate circuit 20a is a bidirectional buffer circuit, for example, and controls connection and disconnection between the global data bus 28 and the local data bus 34a when writing and reading data between the memory controller 12 and the memory 18a. To do.

例えば、グローバルアドレスによってメモリ18aが選択される時には、ゲート回路20aがアクティブ状態となる。メモリ18aに対して、データの書き込みが行われる場合、グローバルデータバス28からローカルデータバス34aに向かってデータが入力されるように制御される。これに対し、メモリ18aからデータの読み出しが行われる場合、ローカルデータバス34aからグローバルデータバス28に向かってデータが出力されるように制御される。   For example, when the memory 18a is selected by the global address, the gate circuit 20a becomes active. When data is written to the memory 18a, control is performed so that data is input from the global data bus 28 toward the local data bus 34a. On the other hand, when data is read from the memory 18a, control is performed so that data is output from the local data bus 34a toward the global data bus 28.

続いて、レジスタ22aは、グローバルデータバス28を介してメモリコントローラ12と相互に接続されている。また、レジスタ22aからは、前述する特定の値のデータ(検索キーデータ)が出力される。レジスタ22aは、メモリ18aに格納されているデータ列の中から検索すべき特定の値のデータを、メモリコントローラ12から受け取って保持する。   Subsequently, the register 22 a is connected to the memory controller 12 via the global data bus 28. Further, the specific value data (search key data) described above is output from the register 22a. The register 22a receives data of a specific value to be searched from the data string stored in the memory 18a from the memory controller 12 and holds it.

比較器24aの一方の入力には、メモリ18aから所定の値のデータ(比較データ)が入力され、その他方の入力には、レジスタ22aから特定の値のデータ(検索キーデータ)が入力される。比較器24aは、メモリ14aから入力される比較データの値と、レジスタ22aから入力される検索キーデータの値とを比較し、その比較結果を出力する。比較器24aから出力される比較結果は、信号線36を介してメモリコントローラ12に入力される。   A predetermined value data (comparison data) is input from the memory 18a to one input of the comparator 24a, and a specific value data (search key data) is input from the register 22a to the other input. . The comparator 24a compares the value of the comparison data input from the memory 14a with the value of the search key data input from the register 22a, and outputs the comparison result. The comparison result output from the comparator 24 a is input to the memory controller 12 via the signal line 36.

比較回路14b、14c、14dの構成は、比較回路14aと同様である。そのため、図1では、比較回路14b、14c、14dの対応するアドレス発生器、メモリ、ゲート回路、レジスタ、比較器の符号の末尾をそれぞれb、c、dに変更し、それぞれの構成素子の識別符号をそれぞれ1,2,3に変更して、その説明を省略する。例えば、アドレス発生器は、アドレス発生器16b、16c、16d(アドレス発生器1,2,3)としてある。   The configuration of the comparison circuits 14b, 14c, and 14d is the same as that of the comparison circuit 14a. For this reason, in FIG. 1, the codes of the corresponding address generators, memories, gate circuits, registers, and comparators of the comparison circuits 14b, 14c, and 14d are changed to “b”, “c”, and “d”, respectively. The reference numerals are changed to 1, 2, and 3, respectively, and description thereof is omitted. For example, the address generator is an address generator 16b, 16c, 16d (address generator 1, 2, 3).

次に、メモリシステム10の動作を説明する。   Next, the operation of the memory system 10 will be described.

まず、通常のメモリアクセス、すなわちメモリ18a、18b、18c、18dに対するデータの書き込みおよび読み出し動作を説明する。   First, normal memory access, that is, data write and read operations to the memories 18a, 18b, 18c, and 18d will be described.

この場合、メモリコントローラ12から、データの書き込みまたは読み出しを行おうとするグローバルアドレスが出力される。各々のアドレス発生器16a、16b、16c、16dからは、グローバルアドレスを4で除算した商がローカルアドレスとして出力される。アドレスは2進数で表現されるのが一般的であるので、この場合、グローバルアドレスの最下位ビット側から2ビットを除く上位側の全ビットがローカルアドレスとして出力される。   In this case, a global address for writing or reading data is output from the memory controller 12. Each address generator 16a, 16b, 16c, 16d outputs a quotient obtained by dividing the global address by 4 as a local address. Since the address is generally expressed in binary, in this case, all the bits on the upper side excluding 2 bits from the least significant bit side of the global address are output as the local address.

同時に、アドレス発生器16a、16b、16c、16dから、グローバルアドレスを4で除算した剰余により、メモリ18a、18b、18c、18dのうちの対応する1つのメモリのみに対して、アクティブ状態の書き込みまたは読み出しの制御信号(図1では省略)が入力される。本実施形態の場合、剰余が0,1,2,3の場合、それぞれメモリ18a、18b、18c、18dに対してのみ、アクティブ状態の書き込みまたは読み出しの制御信号が入力される。   At the same time, from the address generators 16a, 16b, 16c, and 16d, an active state write or write to only one corresponding memory among the memories 18a, 18b, 18c, and 18d by the remainder obtained by dividing the global address by 4 or A read control signal (not shown in FIG. 1) is input. In the case of this embodiment, when the remainder is 0, 1, 2, 3, the active state write or read control signals are input only to the memories 18a, 18b, 18c, 18d, respectively.

そして、アクティブ状態の書き込みまたは読み出しの制御信号が入力されたメモリに対応するゲート回路がアクティブ状態とされ、アクティブ状態とされたゲート回路を介して、そのゲート回路に対応するローカルデータバス34a、34b、34c、34dのうちの1つとグローバルデータバス28とが接続される。これにより、メモリコントローラ12と、グローバルアドレスに対応するデータを格納するメモリとの間でデータの書き込みまたは読み出しが行われる。   Then, the gate circuit corresponding to the memory to which the control signal for writing or reading in the active state is input is set in the active state, and the local data buses 34a and 34b corresponding to the gate circuit are set in the active state through the gate circuit. , 34c, 34d and the global data bus 28 are connected. As a result, data is written or read between the memory controller 12 and the memory storing the data corresponding to the global address.

次に、検索動作、すなわち比較データの値と、検索キーデータの値との比較動作について説明する。   Next, the search operation, that is, the comparison operation between the value of the comparison data and the value of the search key data will be described.

まず、図2を参照して、0次検索について説明する。0次検索は、データ列に含まれるデータが比較データのみであって、その個数が、メモリの分割数と同じ4個(4ワード)の場合の検索である。   First, the zero-order search will be described with reference to FIG. The zero-order search is a search in the case where the data included in the data string is only comparison data, and the number of data is four (4 words), which is the same as the number of memory divisions.

図2(a)は、検索領域の先頭アドレスが4の倍数である1000の場合の例である。図中左側の1000,1004,1008,…はグローバルアドレスを表し、同右側の250,251,252,…はローカルアドレスを表す。また、図中上側の+0,+1,+2,+3は、図中左側のグローバルアドレスに対するオフセット値を表す。+0,+1,+2,+3の縦方向の列がそれぞれメモリ18a、18b、18c、18dに格納されているデータを表す。以下の説明においても同様である。   FIG. 2A shows an example in which the starting address of the search area is 1000, which is a multiple of 4. In the figure, 1000, 1004, 1008,... On the left side represent global addresses, and 250, 251, 252,. Further, +0, +1, +2, +3 on the upper side in the figure represent offset values for the global address on the left side in the figure. The vertical columns +0, +1, +2, and +3 represent data stored in the memories 18a, 18b, 18c, and 18d, respectively. The same applies to the following description.

図2(a)に示すデータ列の場合、0次検索では、メモリコントローラ12から、検索領域の先頭アドレスを表すグローバルアドレス1000と、0次検索であることを表す制御信号が出力される。   In the case of the data string shown in FIG. 2A, in the zero-order search, the memory controller 12 outputs a global address 1000 indicating the start address of the search area and a control signal indicating the zero-order search.

各々のアドレス発生器16a、16b、16c、16dでは、先頭アドレス1000をメモリの個数と同じ4で除算して、その商250と剰余0が算出される。0次検索では、図5の表に示すように、剰余が0の場合、識別符号0,1,2,3であるアドレス発生器16a、16b、16c、16dの全てにおいて、商の250に係数値0が加えられ、ローカルアドレス250が発生される。   In each address generator 16a, 16b, 16c, 16d, the head address 1000 is divided by 4 which is the same as the number of memories, and the quotient 250 and the remainder 0 are calculated. In the zero-order search, as shown in the table of FIG. 5, when the remainder is 0, all of the address generators 16a, 16b, 16c, and 16d having the identification codes 0, 1, 2, and 3 are related to the quotient 250. The numerical value 0 is added and a local address 250 is generated.

ここで、図5の表は、検索領域の先頭アドレスをメモリの分割数である4で除算した剰余と、識別符号0,1,2,3それぞれのアドレス発生器16a、16b、16c、16dでのローカルアドレス発生において、商の値に加算される係数値との関係を表す。すなわち、識別符号0,1,2,3それぞれのアドレス発生器16a、16b、16c、16dは、グローバルアドレスで表される先頭アドレスをメモリの個数で除算した商に、図5の表に示される係数値を加算して、ローカルアドレスを発生する。   Here, the table of FIG. 5 shows the remainder obtained by dividing the start address of the search area by 4 that is the number of memory divisions, and the address generators 16a, 16b, 16c, and 16d of the identification codes 0, 1, 2, and 3, respectively. Represents the relationship with the coefficient value added to the value of the quotient. That is, the address generators 16a, 16b, 16c, and 16d of the identification codes 0, 1, 2, and 3 are shown in the table of FIG. 5 as a quotient obtained by dividing the head address represented by the global address by the number of memories. The coefficient value is added to generate a local address.

また、アドレス発生器16a、16b、16c、16dから、各々対応するメモリ18a、18b、18c、18dに対して比較データを読み出すための制御信号が入力される。   Also, control signals for reading comparison data are input from the address generators 16a, 16b, 16c, and 16d to the corresponding memories 18a, 18b, 18c, and 18d, respectively.

また、メモリコントローラ12から検索キーデータが出力される。この検索キーデータは、全てのレジスタ22a、22b、22c、22dに保持される。そして、各々のメモリ18a、18b、18c、18dから読み出された比較データC0〜C3と、各々のレジスタ22a、22b、22c、22dに保持された検索キーデータが、各々対応する比較回路24a、24b、24c、24dに入力され、両者の大小比較が行われる。   Search key data is output from the memory controller 12. This search key data is held in all the registers 22a, 22b, 22c, and 22d. The comparison data C0 to C3 read from each of the memories 18a, 18b, 18c, and 18d and the search key data held in each of the registers 22a, 22b, 22c, and 22d are respectively compared with the corresponding comparison circuits 24a, 24a, 24b, 24c, and 24d are input, and the magnitude comparison between the two is performed.

比較器24a、24b、24c、24dによる比較結果は、信号線36を介してメモリコントローラ12に入力される。メモリコントローラ12は、比較器24a、24b、24c、24dによる比較結果に基づいて、メモリ18a、18b、18c、18dに格納されている比較データC0,C1,C2,C3のうちのどれが検索キーデータと一致しているのか、あるいは、どれとも一致していないのかを判定し、検索動作を終了する。   The comparison results by the comparators 24a, 24b, 24c, and 24d are input to the memory controller 12 via the signal line 36. The memory controller 12 determines which of the comparison data C0, C1, C2, and C3 stored in the memories 18a, 18b, 18c, and 18d is a search key based on the comparison results by the comparators 24a, 24b, 24c, and 24d. It is determined whether the data matches or does not match, and the search operation is terminated.

続いて、図2(b)は、検索領域の先頭アドレスが4の倍数ではない1001の場合の例である。   Next, FIG. 2B is an example in the case where the start address of the search area is 1001 which is not a multiple of 4.

図2(a)と図2(b)との違いは、図2(b)の0次検索では、メモリコントローラ12から、検索領域の先頭アドレスを表すグローバルアドレス1001が出力される点と、アドレス発生器16aから、ローカルアドレスとして250ではなく、251が出力される点である。   The difference between FIG. 2 (a) and FIG. 2 (b) is that, in the zero-order search of FIG. 2 (b), the global address 1001 representing the start address of the search area is output from the memory controller 12 and the address The generator 16a outputs 251 instead of 250 as the local address.

アドレス発生器16aは、検索領域の先頭アドレス1001を同じく4で除算し、その商が250であり、剰余が1であることを算出する。図5の表に示すように、剰余が1の場合には、識別符号(ID)が0であるアドレス発生器16aにおいて、商の250に係数値1が加えられることによって、そのローカルアドレス251が発生される。なお、アドレス発生器16b、16c、16dにおける動作と、これ以後の検索動作は、図2(a)の場合と同じである。   The address generator 16a similarly divides the start address 1001 of the search area by 4, and calculates that the quotient is 250 and the remainder is 1. As shown in the table of FIG. 5, when the remainder is 1, the address generator 16 a having an identification code (ID) of 0 adds a coefficient value of 1 to the quotient 250, so that the local address 251 is changed. Generated. The operations in the address generators 16b, 16c, and 16d and the subsequent search operation are the same as those in FIG.

上記2つの実施形態は、検索領域の先頭アドレスがメモリの分割数である4の倍数の場合と、4の倍数+1の場合であるが、図5の表に示すように、4の倍数+2の場合には剰余が2となり、識別符号(ID)が剰余の2よりも小さい0,1、すなわちアドレス発生器16a、16bにおいて、商の250に1が加えられる。また、4の倍数+3の場合には剰余が3となり、識別符号(ID)が0,1,2、すなわちアドレス発生器16a、16b、16cにおいて、商の250に1が加えられる。   In the above two embodiments, the start address of the search area is a multiple of 4 that is the number of memory divisions and a multiple of 4 + 1, but as shown in the table of FIG. 5, a multiple of 4 + 2 In this case, the remainder is 2, and 0 and 1 whose identification code (ID) is smaller than the remainder 2, that is, 1 is added to the quotient 250 in the address generators 16a and 16b. In the case of a multiple of 4 + 3, the remainder is 3, and the identification code (ID) is 0, 1, 2, that is, 1 is added to the quotient 250 in the address generators 16a, 16b, 16c.

次に、図3を参照して、1次検索について説明する。1次検索は、そのデータ列に含まれるデータとして、0次検索のデータ列に含まれるデータの個数(すなわち、メモリの分割数)と同じ4個(4ワード)のデータを1つの単位(ブロックサイズ)とする5個のブロックB0〜B4を含み、さらに各々のブロックB0〜B5の間に、比較データC0〜C3が1つずつ挿入されている場合の検索である。   Next, the primary search will be described with reference to FIG. In the primary search, as the data included in the data string, four (4 words) data, which is the same as the number of data included in the data string of the zero-order search (that is, the number of memory divisions), is stored in one unit (block). This is a search in the case where five blocks B0 to B4 that are (size) are included, and one comparison data C0 to C3 is inserted between each of the blocks B0 to B5.

図3(a)は、検索領域の先頭アドレスが、同じく4の倍数である1000の場合の例である。   FIG. 3A shows an example in which the start address of the search area is 1000, which is also a multiple of 4.

図3(a)に示す1次検索の場合も同様に、メモリコントローラ12から、検索領域の先頭アドレスを表すグローバルアドレス1000と、1次検索であることを表す制御信号が出力される。   Similarly, in the case of the primary search shown in FIG. 3A, the memory controller 12 outputs a global address 1000 indicating the start address of the search area and a control signal indicating the primary search.

各々のアドレス発生器16a、16b、16c、16dでは、先頭アドレス1000を4で除算して、その商250と剰余0が算出される。1次検索では、図5の表に示すように、剰余が0の場合、識別符号0,1,2,3であるアドレス発生器16a、16b、16c、16dのそれぞれにおいて、商の250に係数値0が加えられる。そして、さらに、図6の表に示す係数値に、ブロックサイズ(この例では4)÷4=1を乗算した値を加えることによって、それぞれローカルアドレス251,252,253,254が発生される。   In each address generator 16a, 16b, 16c, 16d, the head address 1000 is divided by 4, and the quotient 250 and the remainder 0 are calculated. In the primary search, as shown in the table of FIG. 5, when the remainder is 0, the address generators 16a, 16b, 16c, and 16d having the identification codes 0, 1, 2, and 3 are related to the quotient 250. The number 0 is added. Further, local addresses 251, 252, 253, and 254 are generated by adding values obtained by multiplying the coefficient values shown in the table of FIG. 6 by the block size (4 in this example) ÷ 4 = 1, respectively.

ここで、図6の表は、先頭アドレスをメモリの分割数である4で除算した剰余と、識別符号0,1,2,3それぞれのアドレス発生器16a、16b、16c、16dでのローカルアドレス発生において、ブロックサイズ÷4に乗算される係数値との関係を表す。すなわち、識別符号0,1,2,3それぞれのアドレス発生器16a、16b、16c、17dは、グローバルアドレスで表される先頭アドレスをメモリの個数で除算した商に、図5の表に示される係数値を加算し、さらに、図6の表に示される係数値にブロックサイズ÷4を乗算した値を加算して、ローカルアドレスを発生する。   Here, the table of FIG. 6 shows the remainder obtained by dividing the head address by 4 which is the number of memory divisions, and the local addresses at the address generators 16a, 16b, 16c, and 16d of the identification codes 0, 1, 2, and 3, respectively. In generation, it represents the relationship with the coefficient value multiplied by block size ÷ 4. That is, the address generators 16a, 16b, 16c, and 17d of the identification codes 0, 1, 2, and 3 are shown in the table of FIG. 5 as a quotient obtained by dividing the head address represented by the global address by the number of memories. The coefficient value is added, and further, a value obtained by multiplying the coefficient value shown in the table of FIG. 6 by the block size ÷ 4 is added to generate a local address.

これ以後の動作は、図2(a)の場合と同じである。全ての比較結果は、メモリコントローラ12に入力され、その結果、検索キーデータの値が、比較データC0〜C3のうちのどれかと一致していれば、検索動作は終了する。   The subsequent operation is the same as in the case of FIG. All the comparison results are input to the memory controller 12, and as a result, if the value of the search key data matches any of the comparison data C0 to C3, the search operation ends.

これに対し、どれとも一致していない場合には、検索キーデータの値と、比較データC0〜C3との大小関係により、ブロックB0〜B4の中から次に検索対象となるブロックが決定され、そのブロックに対して前述の0次検索が行われる。例えば、検索キーデータの値が、比較データC0よりも大きく、かつ比較データC1よりも小さい場合、ブロックB1が次の検索対象となり、ブロックB1に含まれる4個の比較データC0〜C3に対して0次検索が行われる。   On the other hand, if none of them matches, the block to be searched next is determined from the blocks B0 to B4 according to the magnitude relationship between the value of the search key data and the comparison data C0 to C3. The above-described zero-order search is performed on the block. For example, when the value of the search key data is larger than the comparison data C0 and smaller than the comparison data C1, the block B1 becomes the next search target, and the four comparison data C0 to C3 included in the block B1 A zero-order search is performed.

続いて、図3(b)は、検索領域の先頭アドレスが4の倍数ではない1001の場合の例である。   Next, FIG. 3B is an example in the case where the start address of the search area is 1001 which is not a multiple of 4.

図3(a)と図3(b)との違いは、図3(b)の1次検索では、メモリコントローラ12から、検索領域の先頭アドレスを表すグローバルアドレス1001が出力される点と、アドレス発生器16a、16b、16c、16dから、それぞれローカルアドレスとして251,252,253,254ではなく、図3(a)の場合と同様にして算出される255,251,252,253が出力される点である。   The difference between FIG. 3A and FIG. 3B is that, in the primary search of FIG. 3B, the memory controller 12 outputs a global address 1001 representing the start address of the search area, and the address The generators 16a, 16b, 16c, and 16d output 255, 251, 252, and 253 calculated as in the case of FIG. 3A, instead of 251, 252, 253, and 254 as local addresses, respectively. Is a point.

なお、これ以後の検索動作は、図3(a)の場合と全く同じである。また、剰余が2,3の場合も同様である。   The subsequent search operation is exactly the same as in the case of FIG. The same applies when the remainder is 2 or 3.

次に、図4を参照して、2次検索について説明する。2次検索は、そのデータ列に含まれるデータとして、1次検索のデータ列に含まれるデータの個数(すなわち、4×5+4)と同じ24個(24ワード)のデータを1つの単位(ブロックサイズ)とする5個のブロックB0〜B4を含み、さらに各々のブロックB0〜B5の間に、比較データC0〜C3が挿入されている場合の検索である。   Next, the secondary search will be described with reference to FIG. In the secondary search, as data included in the data string, 24 pieces of data (24 words) which are the same as the number of data included in the data string of the primary search (that is, 4 × 5 + 4) are stored in one unit (block size). ), And the comparison data C0 to C3 is inserted between the blocks B0 to B5.

図4(a)は、検索領域の先頭アドレスが、同じく4の倍数である1000の場合の例である。   FIG. 4A shows an example in which the start address of the search area is 1000, which is also a multiple of 4.

図4(a)に示す2次検索の場合も同様に、メモリコントローラ12から、検索領域の先頭アドレスを表すグローバルアドレス1000と、2次検索であることを表す制御信号が出力される。   Similarly, in the case of the secondary search shown in FIG. 4A, the memory controller 12 outputs a global address 1000 indicating the start address of the search area and a control signal indicating the secondary search.

各々のアドレス発生器16a、16b、16c、16dでは、先頭アドレス1000を4で除算して、その商250と剰余0が算出される。2次検索では、図5の表に示すように、剰余が0の場合、識別符号0,1,2,3であるアドレス発生器16a、16b、16c、16dのそれぞれにおいて、商の250に係数値0が加えられる。そして、さらに、図6の表に示す係数値に、ブロックサイズ(この例の場合24)÷4=6を乗算した値を加えることによって、それぞれローカルアドレス256,262,268,274が発生される。   In each address generator 16a, 16b, 16c, 16d, the head address 1000 is divided by 4, and the quotient 250 and the remainder 0 are calculated. In the secondary search, as shown in the table of FIG. 5, when the remainder is 0, the address generators 16a, 16b, 16c, and 16d having the identification codes 0, 1, 2, and 3 are related to the quotient 250. The number 0 is added. Further, local addresses 256, 262, 268, and 274 are generated by adding the values obtained by multiplying the coefficient values shown in the table of FIG. 6 by the block size (24 in this example) ÷ 4 = 6, respectively. .

これ以後の動作は、1次検索の場合と同様である。すなわち、検索キーデータの値が、比較データC0〜C3のうちのどれかと一致していれば、検索動作は終了する。これに対し、どれとも一致していない場合には、検索キーデータの値と比較データC0〜C3との大小関係により、ブロックB0〜B4の中から次に検索対象となるブロックが決定され、そのブロックに対して前述の1次検索が行われる。   The subsequent operation is the same as in the case of the primary search. That is, if the value of the search key data matches any one of the comparison data C0 to C3, the search operation ends. On the other hand, if none of them matches, the next block to be searched is determined from among the blocks B0 to B4 according to the magnitude relationship between the value of the search key data and the comparison data C0 to C3. The above-described primary search is performed on the block.

続いて、図4(b)は、検索領域の先頭アドレスが4の倍数ではない1001の場合の例である。   Next, FIG. 4B is an example in the case where the start address of the search area is 1001 which is not a multiple of 4.

図4(a)と図4(b)との違いは、図4(b)の2次検索では、メモリコントローラ12から、検索領域の先頭アドレスを表すグローバルアドレス1001が出力される点と、アドレス発生器16a、16b、16c、16dから、それぞれローカルアドレスとして256,262,268,274ではなく、図4(a)の場合と同様にして算出される275,256,262,268が出力される点である。   The difference between FIG. 4A and FIG. 4B is that, in the secondary search of FIG. 4B, the global address 1001 representing the start address of the search area is output from the memory controller 12, and the address The generators 16a, 16b, 16c, and 16d output 275, 256, 262, and 268 calculated in the same manner as in FIG. 4A, instead of 256, 262, 268, and 274 as local addresses, respectively. Is a point.

なお、これ以後の検索動作は、図4(a)の場合と全く同じである。また、剰余が2,3の場合も同様である。   The subsequent search operation is exactly the same as in the case of FIG. The same applies when the remainder is 2 or 3.

検索は、検索対象となるデータ列に含まれるデータ数によって、最高次数の検索から行われる。例えば、3124個(3124ワード)のデータ列であれば、4次検索から開始される。4次検索の比較結果によって一致が検出されれば、その時点で検索動作は終了し、一致が検出されない場合には、比較結果に応じて1つのブロックが決定され、次に3次検索が行われる。以下同様にして、一致が検出されない場合には、順次下位の次数の検索が行われ、最長の場合で0次検索まで検索が行われて検索動作が終了する。   The search is performed from the search of the highest order according to the number of data included in the data string to be searched. For example, if the data string is 3124 (3124 words), the fourth search is started. If a match is detected according to the comparison result of the quaternary search, the search operation ends at that point. If no match is detected, one block is determined according to the comparison result, and then the tertiary search is performed. Is called. Similarly, if no match is detected, the lower order is sequentially searched. In the longest case, the search is performed up to the zeroth search, and the search operation ends.

なお、検索対象のデータ列に含まれるデータ数は任意に設定可能である。その場合は、メモリコントローラ12にデータ列の最後尾のデータが格納されているアドレスを設定しておき、読み出し比較の際、読み出すデータが最後尾のアドレスを超えていれば、その比較結果を採用しないように構成すれば良い。   Note that the number of data included in the data string to be searched can be arbitrarily set. In that case, an address where the last data of the data string is stored is set in the memory controller 12, and if the read data exceeds the last address in the read comparison, the comparison result is adopted. What is necessary is just to comprise so that it may not.

例えば、比較データC0〜C3の内でC3が最後尾アドレスを超えている場合はC0〜C2のみの比較結果を採用し、この中で一致していない場合、0次検索の時には一致データなしとし、1次以上の検索の時には、B4を除くブロックB0〜B3の中から次の検索対象となるブロックを選択すれば良い。この場合、もしC2が最後尾アドレスに等しく、検索キーデータの値がC2よりも大きい場合は一致データなしとする(データが昇順に並べられている場合)。   For example, if C3 exceeds the last address among the comparison data C0 to C3, only the comparison result of C0 to C2 is adopted. At the time of primary or higher search, a block to be searched next may be selected from blocks B0 to B3 excluding B4. In this case, if C2 is equal to the last address and the value of the search key data is larger than C2, no matching data is set (when data is arranged in ascending order).

また、メモリの分割数は4に限らず、4以上の2のべき乗の数、例えば8個、16個、32個、…など、より大きな個数に分割することによって、その検索性能を容易に向上させることができる。すなわち、メモリの分割数を多くするに従って、検索の次数を減らし、メモリからの読み出し比較回数を少なくすることができるので、1回の読み出し比較によって次の検索領域をより狭い範囲に絞り込むことができ、多数のデータを含むデータ列をより高速に検索することが可能になる。   In addition, the number of memory divisions is not limited to 4, and the search performance can be easily improved by dividing the memory into larger numbers such as 4 or more powers of 2 such as 8, 16, 32,. Can be made. That is, as the number of memory divisions is increased, the number of search orders can be reduced and the number of read comparisons from the memory can be reduced, so that the next search area can be narrowed down to a narrower range by one read comparison. Thus, it becomes possible to search a data string including a large number of data at higher speed.

例えば、メモリの分割数を増やして16個にした場合、0次から3次までの検索可能データサイズは順に16,288,4912,83520となり、4回以下の読み出し比較で83520個のデータからなるデータ列から検索を行うことが可能である。これに対し、従来の二分法では、最大17回の読み出し比較で65535個のデータからなるデータ列の検索が可能であるのと比較すると、本発明のメモリシステムであれば、格段に高速化が図られることは明らかである。   For example, when the number of memory divisions is increased to 16, the searchable data size from the 0th order to the 3rd order is 16,288, 4912, 83520 in order, and is composed of 83520 data in four or less read comparisons. It is possible to search from the data string. On the other hand, in the conventional bisection method, the memory system of the present invention can significantly increase the speed as compared with the case where a data string composed of 65535 data can be searched by a maximum of 17 read comparisons. It is clear that it is intended.

ここで、N(Nは4以上の2のべき乗)をメモリの分割数、M(Mは1以上の整数)を検索の次数とする。この場合、本発明では、互いに(N+1)M離れたN個のアドレスに格納されている比較データが、N個のメモリから同時に読み出され、読み出されたN個の比較データの値が検索キーデータと同時に比較される。そして、L(Lは1からNまでの整数)を係数、グローバルアドレス(先頭アドレス)をNで除算した剰余をR(Rは0からN−1までの整数)とすると、それぞれのアドレス発生器は、グローバルアドレスに(N+1)M×L−1を加えたアドレスに対応するローカルアドレスを発生する。そして、M次の検索においては、最大、(N+1)M+1−1個のデータからなるデータ列の検索が可能である。 Here, N (N is a power of 2 of 4 or more) is the number of memory divisions, and M (M is an integer of 1 or more) is the order of search. In this case, according to the present invention, comparison data stored at N addresses separated from each other by (N + 1) M are simultaneously read from N memories, and the values of the read N comparison data are searched. Compared with key data at the same time. When L (L is an integer from 1 to N) is a coefficient and the remainder obtained by dividing the global address (start address) by N is R (R is an integer from 0 to N−1), each address generator Generates a local address corresponding to an address obtained by adding (N + 1) M × L−1 to the global address. In the M-th search, it is possible to search a data string composed of at most (N + 1) M + 1 −1 data.

また、N個のメモリの各々の識別符号は、0〜N−1までの整数で表される。ここで、それぞれのメモリの識別符号を、R+L−1がNよりも小さい場合にはR+L−1と、N以上である場合にはR+L−1−Nと表現する。すると、それぞれR+L−1またはR+L−1−Nと表現される識別符号が付されたメモリに対応して設けられたアドレス発生器は、グローバルアドレスに(N+1)M×L−1を加えたアドレスに対応するローカルアドレスを発生する。 Each identification code of the N memories is represented by an integer from 0 to N-1. Here, the identification code of each memory is expressed as R + L-1 when R + L-1 is smaller than N, and R + L-1-N when N +. Then, the address generator provided corresponding to the memory with the identification code expressed as R + L-1 or R + L-1-N is an address obtained by adding (N + 1) M × L-1 to the global address. A local address corresponding to is generated.

本発明は、基本的に以上のようなものである。
以上、本発明のメモリシステムおよび検索方法について詳細に説明したが、本発明は上記実施形態に限定されず、本発明の主旨を逸脱しない範囲において、種々の改良や変更をしてもよいのはもちろんである。
The present invention is basically as described above.
The memory system and search method of the present invention have been described in detail above. However, the present invention is not limited to the above-described embodiment, and various improvements and modifications may be made without departing from the spirit of the present invention. Of course.

本発明のメモリシステムの構成を表す一実施形態の概略図である。It is the schematic of one Embodiment showing the structure of the memory system of this invention. (a)および(b)は、本発明における0次検索時のデータ列の配列を表す概略図である。(A) And (b) is the schematic showing the arrangement | sequence of the data sequence at the time of the 0th search in this invention. (a)および(b)は、本発明における1次検索時のデータ列の配列を表す概略図である。(A) And (b) is the schematic showing the arrangement | sequence of the data sequence at the time of the primary search in this invention. (a)および(b)は、本発明における2次検索時のデータ列の配列を表す概略図である。(A) And (b) is the schematic showing the arrangement | sequence of the data sequence at the time of the secondary search in this invention. 本発明の各次の検索において、各々のメモリから出力されるローカルアドレスを算出するための表である。It is a table | surface for calculating the local address output from each memory in each next search of this invention. 本発明の1次以上の検索において、各々のメモリから出力されるローカルアドレスを算出するための表である。6 is a table for calculating a local address output from each memory in a primary or higher-order search according to the present invention. 従来の二分法を説明するための概念図である。It is a conceptual diagram for demonstrating the conventional bisection method.

符号の説明Explanation of symbols

10 メモリシステム
12 メモリコントローラ
14a、14b、14c、14d 比較回路
16a、16b、16c、16d アドレス発生器
18a、18b、18c、18d メモリ
20a、20b、20c、20d ゲート回路
22a、22b、22c、22d レジスタ
24a、24b、24c、24d 比較器
26 グローバルアドレスバス
28 グローバルデータバス
30,36 信号線
10 memory system 12 memory controller 14a, 14b, 14c, 14d comparison circuit 16a, 16b, 16c, 16d address generator 18a, 18b, 18c, 18d memory 20a, 20b, 20c, 20d gate circuit 22a, 22b, 22c, 22d register 24a, 24b, 24c, 24d Comparator 26 Global address bus 28 Global data bus 30, 36 Signal line

Claims (4)

アドレスの下位ビットの値によりアドレス空間を分割したN個(Nは4以上の2のべき乗)のメモリで構成したメモリシステム中に、昇順もしくは降順に並べられたデータ列から特定の値のデータを検索する方法であって、
互いに(N+1)M(Mは以上の整数)離れたN個のアドレスのデータを前記N個のメモリから同時に読み出し、該読み出したデータの値を前記特定の値と比較し、
前記読み出したデータの中に前記特定の値と一致する値のものが無い場合には、次に、
前記読み出したデータの値と前記特定の値との大小関係から、前記特定の値と一致する値のデータが存在するアドレス範囲を特定し、該特定したアドレス範囲内において、互いに(N+1) M-1 離れたN個のアドレスのデータを同時に読み出し、該読み出したデータの値を前記特定の値と比較することを特徴とする検索方法。
Data of a specific value from a data string arranged in ascending or descending order in a memory system composed of N memories (N is a power of 2 greater than or equal to 4) that divides the address space according to the value of the lower bits of the address A search method,
Read data of N addresses separated from each other by (N + 1) M (M is an integer of 2 or more) from the N memories, and compare the value of the read data with the specific value ;
If none of the read data has a value that matches the specific value, then:
From the magnitude relationship between the value of the read data and the specific value, an address range in which data having a value matching the specific value exists is specified, and within the specified address range, (N + 1) M− read 1 away N addresses of data at the same time, search method the value of the read-out data and comparing with the specific value.
アドレスの下位ビットの値によりアドレス空間を分割した0からN−1番までの識別符号が付されたN個(Nは4以上の2のべき乗)のメモリで構成され、該N個のメモリ内に昇順もしくは降順に並べられたデータ列から特定の値のデータを検索するメモリシステムであって、
前記N個のメモリのそれぞれに対応させて設けられ、共通のグローバルアドレスと、M次(Mは2以上の整数)から0次までの整数の検索次数を示す数値Kを受け取り、互いに(N+1) K 離れたN個のアドレスに対応するローカルアドレスを生成するアドレス発生器を有することを特徴とするメモリシステム。
It is composed of N memories (N is a power of 2 of 4 or more) with identification codes from 0 to N-1 obtained by dividing the address space by the value of the lower bits of the address. A memory system for retrieving data of a specific value from a data sequence arranged in ascending or descending order,
Each of the N memories is provided in correspondence with each other and receives a common global address and a numerical value K indicating an integer search order from the Mth order (M is an integer of 2 or more) to the 0th order, and (N + 1) each other A memory system comprising an address generator for generating local addresses corresponding to N addresses separated by K.
前記アドレス発生器が、該グローバルアドレスに(N+1) K ×L−1(Lは1からNまでの整数)を加えたアドレスに対応するローカルアドレスをそれぞれ生成することを特徴とする請求項記載のメモリシステム。 Said address generator, to the global address (N + 1) K × L -1 (L is an integer from 1 to N) according to claim 2, characterized in that respectively generate local address corresponding to the address obtained by adding Memory system. 前記グローバルアドレスをNで除した余りがRである時に、R+L−1番(ただし、R+L−1がN以上である場合にはR+L−1−N番)の識別符号が付されたメモリに対応して設けられた前記アドレス発生器が、前記グローバルアドレスに(N+1) K ×L−1を加えたアドレスに対応するローカルアドレスを発生することを特徴とする請求項記載のメモリシステム。 When the remainder obtained by dividing the global address by N is R, it corresponds to a memory with an identification code of R + L-1 (if R + L-1 is N or more, R + L-1-N) 4. The memory system according to claim 3 , wherein the address generator is configured to generate a local address corresponding to an address obtained by adding (N + 1) K × L−1 to the global address.
JP2005305628A 2005-10-20 2005-10-20 Memory system and search method Expired - Fee Related JP4785492B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005305628A JP4785492B2 (en) 2005-10-20 2005-10-20 Memory system and search method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005305628A JP4785492B2 (en) 2005-10-20 2005-10-20 Memory system and search method

Publications (2)

Publication Number Publication Date
JP2007115015A JP2007115015A (en) 2007-05-10
JP4785492B2 true JP4785492B2 (en) 2011-10-05

Family

ID=38097129

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005305628A Expired - Fee Related JP4785492B2 (en) 2005-10-20 2005-10-20 Memory system and search method

Country Status (1)

Country Link
JP (1) JP4785492B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4896839B2 (en) * 2007-08-31 2012-03-14 ルネサスエレクトロニクス株式会社 Microprocessor and data processing method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11232279A (en) * 1998-02-12 1999-08-27 Kawasaki Steel Corp Method and device for split search
JP2003263892A (en) * 2002-03-11 2003-09-19 Toshiba Corp Semiconductor memory device
JP2004287689A (en) * 2003-03-20 2004-10-14 Fujitsu Ltd Database retrieval method and retrieval program

Also Published As

Publication number Publication date
JP2007115015A (en) 2007-05-10

Similar Documents

Publication Publication Date Title
JP5731179B2 (en) Semiconductor memory device
JP3599352B2 (en) Flexible N-way memory interleave scheme
US6353910B1 (en) Method and apparatus for implementing error correction coding (ECC) in a dynamic random access memory utilizing vertical ECC storage
JPS61107596A (en) Associative memory
US9240237B2 (en) Semiconductor device and method of writing/reading entry address into/from semiconductor device
US6760821B2 (en) Memory engine for the inspection and manipulation of data
JPS61294545A (en) Searcher
JP2007234086A (en) Semiconductor memory device
EP0471532A2 (en) Method for determining the size of a memory
US4800535A (en) Interleaved memory addressing system and method using a parity signal
JP4785492B2 (en) Memory system and search method
KR102409615B1 (en) Method for min-max computation in associative memory
JPH024026B2 (en)
US3435420A (en) Contiguous bulk storage addressing
CN109119126B (en) Semiconductor device and error management method
JP6737117B2 (en) Encoded data search program, encoded data search method, and encoded data search device
JP2023131392A (en) Dictionary compression device and memory system
WO2016185849A1 (en) Semiconductor device and method for writing/reading information
US7363460B2 (en) Semiconductor memory device having tag block for reducing initialization time
JPS5962959A (en) Storage device
JP2004213588A (en) Semiconductor device
JP2007323138A (en) Memory controller, flash memory system, and control method of flash memory
JP3272536B2 (en) Kana-Kanji conversion method
JPH11184858A (en) Two division search method/device
JP2590866B2 (en) Data retrieval device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080325

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101029

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101109

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110107

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110712

R150 Certificate of patent or registration of utility model

Ref document number: 4785492

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140722

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees