JPWO2014102924A1 - Bit determination circuit, bit string data selection circuit, and bit string data selection method - Google Patents

Bit determination circuit, bit string data selection circuit, and bit string data selection method Download PDF

Info

Publication number
JPWO2014102924A1
JPWO2014102924A1 JP2013557304A JP2013557304A JPWO2014102924A1 JP WO2014102924 A1 JPWO2014102924 A1 JP WO2014102924A1 JP 2013557304 A JP2013557304 A JP 2013557304A JP 2013557304 A JP2013557304 A JP 2013557304A JP WO2014102924 A1 JPWO2014102924 A1 JP WO2014102924A1
Authority
JP
Japan
Prior art keywords
bit
bit string
string
selection
determination
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.)
Pending
Application number
JP2013557304A
Other languages
Japanese (ja)
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.)
Kousokuya Inc
Original Assignee
Kousokuya 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 Kousokuya Inc filed Critical Kousokuya Inc
Publication of JPWO2014102924A1 publication Critical patent/JPWO2014102924A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/02Comparing digital values

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

複数のビット列データからビット列データを選択するための情報を高速に出力するために、複数のビット列データの同一のビット位置のビットと検索ビット列のビットを最上位から最下位まで順次比較していく。比較の結果一度ビットが検索ビット列のビットと一致しなかったビット列データのビットを比較の対象から外すことにより、最下位のビット位置で選択されたビットが属するビット列データを検索ビット列と一致するビット列データとする。In order to output information for selecting bit string data from a plurality of bit string data at high speed, the bits in the same bit position of the plurality of bit string data and the bits in the search bit string are sequentially compared from the most significant to the least significant. Bit string data that matches the search bit string with the bit string data to which the bit selected at the least significant bit position belongs by excluding the bit string data bit whose bit did not match the bit of the search bit string from the comparison target. And

Description

本発明は、複数のビット列データの同一ビット位置にあるビットを判定するビット判定回路と、ビット判定回路を用いて複数のビット列データのうちのビット列データを選択するための情報を出力するビット列データ選択回路及びビット列データ選択方法に関する。 The present invention relates to a bit determination circuit that determines a bit at the same bit position of a plurality of bit string data, and a bit string data selection that outputs information for selecting bit string data among the plurality of bit string data using the bit determination circuit The present invention relates to a circuit and a bit string data selection method.

情報処理の技術分野においては、複数のビット列データからある条件を満たすビット列データ、例えばある検索ビット列と一致するビット列データを求めることが行われている。このような検索ビット列と一致するビット列データを求める処理は、例えば、下記特許文献1に示すように、検索対象のビット列データを記憶したメモリからビット列データを1つずつ読み出して検索ビット列と比較することにより実行されている。 In the technical field of information processing, obtaining bit string data satisfying a certain condition from a plurality of bit string data, for example, bit string data matching a certain search bit string is performed. For example, as shown in Patent Document 1 below, the processing for obtaining bit string data that matches the search bit string is to read bit string data one by one from the memory storing the bit string data to be searched and compare it with the search bit string. Has been executed by.

図1は、上述の従来の検索処理の処理例を説明する図である。
図1に示す検索処理の例では、複数のビット列データの集合であるビット列データ群101は、4つのビット列データ、D1、D2、D3、D4から構成されており、それぞれのビット列データは、D1=111、D2=010、D3=011、D4=100である。検索ビット列S260は、“010”である。
FIG. 1 is a diagram for explaining a processing example of the above-described conventional search processing.
In the example of the search process shown in FIG. 1, the bit string data group 101, which is a set of a plurality of bit string data, is composed of four bit string data, D1, D2, D3, and D4. 111, D2 = 010, D3 = 011, and D4 = 100. The search bit string S260 is “010”.

図1に示すように、ステップ1で例えばビット列データのうち矢印111aで示す先頭に位置するビット列データD1と検索ビット列S260との一致判定121aが行われ、ビット列データD1は検索ビット列Sと不一致であると判定される。 As shown in FIG. 1, in step 1, for example, the bit string data D1 positioned at the head indicated by the arrow 111a in the bit string data is matched with the search bit string S260 121a, and the bit string data D1 does not match the search bit string S. It is determined.

次にステップ2において、矢印111bで示す次のビット列データD2と検索ビット列S260との一致判定121bが行われ、ビット列データD2は検索ビット列Sと一致すると判定される。 Next, in step 2, a match determination 121b between the next bit string data D2 indicated by the arrow 111b and the search bit string S260 is performed, and it is determined that the bit string data D2 matches the search bit string S.

次にステップ3において、矢印111cで示す次のビット列データD3と検索ビット列S260との一致判定121cが行われ、ビット列データD3は検索ビット列Sと不一致であると判定される。 Next, in step 3, a match determination 121c between the next bit string data D3 indicated by the arrow 111c and the search bit string S260 is performed, and it is determined that the bit string data D3 does not match the search bit string S.

最後にステップ4において、矢印111dで示す最後のビット列データD4と検索ビット列S260との一致判定121dが行われ、ビット列データD4は検索ビット列Sと不一致であると判定される。 Finally, in step 4, a match determination 121d between the last bit string data D4 indicated by the arrow 111d and the search bit string S260 is performed, and it is determined that the bit string data D4 does not match the search bit string S.

上述の検索処理は、下記特許文献に記載されたように、検索に適したハードウェアを用いて実行されている。また、CPUを使用してソフトウェアによる処理で実現することができる。しかし、いずれにしろ、検索対象のビット列データを記憶したメモリからビット列データを1つずつ読み出して検索ビット列と比較することにより実行するものである。 The search process described above is executed using hardware suitable for the search, as described in the following patent document. Moreover, it is realizable by the process by software using CPU. In any case, however, the bit string data is read one by one from the memory storing the bit string data to be searched and is compared with the search bit string.

一方、下記特許文献2に開示されているように、並列に処理しようとするビット列データの数に相当する複数の比較器を用いてビット列データの比較を行うものも知られている。 On the other hand, as disclosed in Patent Document 2 below, there is also known one that compares bit string data using a plurality of comparators corresponding to the number of bit string data to be processed in parallel.

特開平10−222535号公報JP-A-10-222535 特開2010−224818号公報JP 2010-224818 A

上述の特許文献1に記載された検索処理は、検索対象のビット列データを記憶したメモリからビット列データを1つずつ読み出して検索ビット列と比較するため、ビット列データの個数が増大するとそれに比例して処理時間が増大する。
また、上述の特許文献2に記載されたビット列データの比較処理は、ビット列データの個数が増大すると多数の比較器を必要とする。
The search processing described in the above-mentioned Patent Document 1 reads out bit string data one by one from the memory storing the bit string data to be searched and compares it with the search bit string. Time increases.
Further, the bit string data comparison process described in Patent Document 2 requires a large number of comparators as the number of bit string data increases.

そこで本発明が解決しようとする課題は、処理対象のビット列データが増大してもそれに比例して処理時間が増大せず、多数の比較器を必要とせずに複数のビット列データのうち検索ビット列と一致するビット列データを選択するための情報を出力するための手法を提供することである。 Therefore, the problem to be solved by the present invention is that the processing time does not increase in proportion to the increase in the bit string data to be processed, and the search bit string among the plurality of bit string data without the need for a large number of comparators. To provide a method for outputting information for selecting matching bit string data.

本発明の第1の実施形態は、完全一致検索のためのものである。本発明の第1の実施形態の一つの観点によれば、ビット長がm(mは1以上の整数)であるN個(Nは2以上の整数)のビット列データそれぞれの同一のビット位置i(i=0〜m−1)から取り出したビットであり、それぞれ各ビット列データに対応するN個のビットからなる同一位置ビット列のビットそれぞれと、ビット長がmである検索ビット列のビット位置iの検索ビットとのビット比較を行い、同一位置ビット列のビットと検索ビットが一致するか否かを表す判定ビットからなる判定ビット列を出力する。そして、同一位置ビット列のそれぞれのビットをビット判定の対象として選択するか否かを表すビットであってそれぞれ各ビット列データに対応するN個の選択ビットからなる選択ビット列と判定ビット列とのビット列演算を行い、各ビット列データそれぞれの同一のビット位置iの次のビット位置(i+1)から取り出したビットであってそれぞれ各ビット列データに対応するN個のビットからなる次同一位置ビット列のそれぞれのビットをビット判定の対象として選択するか否かを表すビットであり、それぞれ各ビット列データに対応するN個の次選択ビットからなる次選択ビット列を、選択ビット列の選択ビットが同一位置ビット列のビットをビット判定の対象として選択することを表す有意のビットであれば該選択ビットと対応する判定ビットを次選択ビットとし、選択ビット列の選択ビットが有意のビットでなければ該選択ビットを次選択ビットとして出力することにより、N個のビット列データの同一のビット位置iのビットをビット判定する。 The first embodiment of the present invention is for an exact match search. According to one aspect of the first embodiment of the present invention, the same bit position i of each of N (N is an integer of 2 or more) bit string data whose bit length is m (m is an integer of 1 or more). (I = 0 to m−1) are bits taken out from (i = 0 to m−1), and each bit of the same position bit string composed of N bits corresponding to each bit string data and the bit position i of the search bit string having a bit length of m A bit comparison with the search bit is performed, and a determination bit string including a determination bit indicating whether or not the bit in the same position bit string matches the search bit is output. A bit string operation is performed on the selected bit string including the N selected bits corresponding to each bit string data and the determination bit string, each bit indicating whether or not each bit in the same position bit string is selected as a bit determination target. The bit extracted from the next bit position (i + 1) of the same bit position i of each bit string data and each bit of the next same position bit string composed of N bits corresponding to each bit string data This bit indicates whether or not to select as a determination target. Each bit string data includes N next selection bits corresponding to each bit string data. If it is a significant bit indicating selection as a target, it corresponds to the selected bit The constant bit is set as the next selection bit, and if the selection bit of the selected bit string is not a significant bit, the selection bit is output as the next selection bit, so that the bit at the same bit position i of the N bit string data is bit-determined. .

また本発明の第1の実施形態の別の観点によれば、上述のビット判定をビット列データのビット幅分順次実行する。そして、同一のビット位置(m−1)のビットに対するビット判定により出力される次選択ビット列を、検索ビット列に完全一致するビット列データを選択するための情報として出力する。 According to another aspect of the first embodiment of the present invention, the above bit determination is sequentially executed for the bit width of the bit string data. Then, the next selected bit string output by the bit determination for the bit at the same bit position (m−1) is output as information for selecting bit string data that completely matches the search bit string.

本発明の第2の実施形態は、部分一致検索のためのものである。本発明の第2の実施形態の一つの観点によれば、同一のビット位置iから取り出されたビットからなる同一位置ビット列のビットをビット判定の対象から除外するか否かを表すビットでありそれぞれ前記同一のビット位置iに対応するm個のスキップビットからなるスキップビット列が与えられ、スキップビットが対応する同一位置ビット列を構成するビットをビット判定の対象から除外することを示す有意のビットであれば、上記第1の実施形態のビット判定における選択ビット列を次選択ビット列として出力し、スキップビットが有意のビットでなければ、第1の実施形態のビット判定により出力される次選択ビット列を次選択ビット列として出力することにより、N個のビット列データの同一のビット位置iのビットを判定する。 The second embodiment of the present invention is for partial match search. According to one aspect of the second embodiment of the present invention, each bit represents whether or not to exclude a bit in the same position bit string made up of bits extracted from the same bit position i from a bit determination target. A skip bit string composed of m skip bits corresponding to the same bit position i is given, and the skip bit is a significant bit indicating that the bits constituting the corresponding same position bit string are excluded from the bit determination target. For example, the selected bit string in the bit determination of the first embodiment is output as the next selected bit string, and if the skip bit is not a significant bit, the next selected bit string output by the bit determination of the first embodiment is next selected. By outputting as a bit string, the bit at the same bit position i of N bit string data is determined.

また本発明の第2の実施形態の別の観点によれば、上述のビット判定をビット列データのビット幅分順次実行する。そして、同一のビット位置(m−1)のビットに対するビット判定により出力される次選択ビット列を、検索ビット列に部分一致するビット列データを選択するための情報として出力する。 According to another aspect of the second embodiment of the present invention, the above bit determination is sequentially executed for the bit width of the bit string data. Then, the next selected bit string output by the bit determination for the bit at the same bit position (m−1) is output as information for selecting bit string data partially matching the search bit string.

本発明の第3の実施形態は、最長一致検索のためのものである。本発明の第3の実施形態の一つの観点によれば、選択ビット列の選択ビットにより選択された同一位置ビット列のビットが対応する全ての検索ビットと一致しないか判定し、全不一致ビットを出力する。また、全不一致ビットが選択ビット列の選択ビットにより選択された同一位置ビット列のビットが全て対応する検索ビットと一致しないことを表す有意のビットであるか、あるいは、ビット列データからビットを取り出した同一のビット位置iより上位のビット位置において該上位のビット位置の同一位置ビット列のビットが全て対応する検索ビットと一致しないものであれば、上記第1の実施形態のビット判定における選択ビット列を次選択ビット列として出力し、全不一致ビットが有意でなく、かつ、ビット列データからビットを取り出した同一のビット位置iより上位の全てのビット位置において該上位のビット位置の同一位置ビット列のビットが対応する全ての検索ビットと一致しないものでなければ、第1の実施形態のビット判定により出力される次選択ビット列を次選択ビット列として出力することにより、N個のビット列データの同一のビット位置iのビットを判定する。 The third embodiment of the present invention is for the longest match search. According to one aspect of the third embodiment of the present invention, it is determined whether or not the bits of the same position bit string selected by the selected bits of the selected bit string match all the corresponding search bits, and all the unmatched bits are output. . In addition, all the unmatched bits are significant bits indicating that all the bits in the same position bit string selected by the selected bits of the selected bit string do not match the corresponding search bits, or the same bit extracted from the bit string data. If all the bits in the same position bit string in the upper bit position do not match the corresponding search bits at the bit position higher than the bit position i, the selected bit string in the bit determination of the first embodiment is the next selected bit string. All the inconsistent bits are not significant, and all the bit positions in the same position bit string at the higher bit positions corresponding to all the bit positions higher than the same bit position i from which the bits are extracted from the bit string data If the bit does not match the search bit, the bit determination of the first embodiment By outputting the next selected bit string to be more outputted as the next selected bit string to determine identical bits at bit position i of the N-bit string data.

また本発明の第3の実施形態の別の観点によれば、上述のビット判定をビット列データのビット幅分順次実行する。そして、同一のビット位置(m−1)のビットに対するビット判定により出力される次選択ビット列を、検索ビット列に最長一致するビット列データを選択するための情報として出力する。 According to another aspect of the third embodiment of the present invention, the above bit determination is sequentially executed for the bit width of the bit string data. Then, the next selected bit string output by the bit determination with respect to the bit at the same bit position (m−1) is output as information for selecting the bit string data having the longest match with the search bit string.

本発明によれば、処理対象のビット列データが増大してもそれに比例して処理時間が増大せず、多数の比較器を必要とせずに複数のビット列データのうち検索ビット列と一致するビット列データを選択するための情報を出力する手法を提供することができる。
そして、本発明の提供する手法を利用することにより、複数のビット列データのうち検索ビット列と一致するビット列データを取得することができる。
According to the present invention, even if the number of bit string data to be processed increases, the processing time does not increase proportionally, and bit string data that matches the search bit string among a plurality of bit string data without requiring a large number of comparators. A method of outputting information for selection can be provided.
By using the technique provided by the present invention, it is possible to acquire bit string data that matches the search bit string from among a plurality of bit string data.

従来の検索処理について説明する図である。It is a figure explaining the conventional search process. 本発明の第1の実施形態における完全一致選択処理の一例を概念的に説明する図である。It is a figure which illustrates notionally an example of the exact matching selection process in the 1st Embodiment of this invention. 本発明の第1の実施形態における完全一致選択処理の別の例を概念的に説明する図である。It is a figure which illustrates notionally another example of the exact matching selection process in the 1st Embodiment of this invention. 本発明の第1の実施形態における完全一致選択回路を概念的に説明する図である。FIG. 2 is a diagram conceptually illustrating a complete match selection circuit according to the first embodiment of the present invention. 本発明の第1の実施形態におけるビット判定回路の実施例を説明する図である。It is a figure explaining the Example of the bit determination circuit in the 1st Embodiment of this invention. 本発明の第2の実施形態における部分一致選択処理を概念的に説明する図である。It is a figure which illustrates notionally the partial matching selection process in the 2nd Embodiment of this invention. 本発明の第2の実施形態における部分一致選択回路を概念的に説明する図である。It is a figure which illustrates notionally the partial coincidence selection circuit in the 2nd Embodiment of this invention. 本発明の第2の実施形態におけるビット判定回路の実施例を説明する図である。It is a figure explaining the Example of the bit determination circuit in the 2nd Embodiment of this invention. 本発明の第3の実施形態における最長一致選択処理を概念的に説明する図である。It is a figure which illustrates notionally the longest match selection process in the 3rd Embodiment of this invention. 本発明の第3の実施形態における最長一致選択回路を概念的に説明する図である。It is a figure which illustrates notionally the longest match selection circuit in the 3rd Embodiment of this invention. 本発明の第3の実施形態におけるビット判定回路の実施例を説明する図である。It is a figure explaining the Example of the bit determination circuit in the 3rd Embodiment of this invention.

以下、本発明を実施するための形態を、図面を参照して説明する。
図2Aは、本発明の第1の実施形態における完全一致選択処理の一例を概念的に説明する図である。この例では、図2Aに例示するビット列データ群101及び検索ビット列S260は、図1において例示したものと同じである。この例では、ビット列データ群101に検索ビット列Sと完全一致するビット列データが含まれる。
Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.
FIG. 2A is a diagram conceptually illustrating an example of a complete match selection process according to the first embodiment of the present invention. In this example, the bit string data group 101 and the search bit string S260 illustrated in FIG. 2A are the same as those illustrated in FIG. In this example, the bit string data group 101 includes bit string data that completely matches the search bit string S.

図2Aに示すように、ステップ1では選択ビット列210aには初期値として“1111”が設定されている。選択ビット列の初期値は、以下に説明する各実施形態において、全て“1111”である。選択ビット列210aの左側に記載されたE1、E2、E3、E4は選択ビット列のビットを示しており、E1、E2、E3、E4の各ビットはビット列データD1、D2、D3、D4にそれぞれ対応している。ビットExのビットが“1”であれば、それに対応するビット列データDxから取り出したビットをビット判定の対象として選択する。処理の態様としては、後に説明するように、ビット列データDxから取り出したビットと検索ビット列Sのビットとの比較結果を表すビットに対するビット演算により、ビット列データDxから取り出したビットをビット判定の対象として選択する。そこで以下の説明において、上述のビット演算を行うことを、ビット比較の結果に対してビット判定を行うということがある。また、選択ビット列を符号Eにより表記することがある。 As shown in FIG. 2A, in step 1, “1111” is set as the initial value in the selected bit string 210a. The initial value of the selected bit string is all “1111” in each embodiment described below. E1, E2, E3, and E4 described on the left side of the selected bit string 210a indicate bits of the selected bit string, and each bit of E1, E2, E3, and E4 corresponds to the bit string data D1, D2, D3, and D4, respectively. ing. If the bit Ex is “1”, the bit extracted from the corresponding bit string data Dx is selected as a bit determination target. As a mode of processing, as will be described later, the bit extracted from the bit string data Dx is subjected to bit determination by performing a bit operation on the bit representing the comparison result between the bit extracted from the bit string data Dx and the bit of the search bit string S. select. Therefore, in the following description, performing the above bit calculation sometimes means performing bit determination on the result of bit comparison. In addition, the selected bit string may be represented by the symbol E.

ビット列データ群101には、各ビット列データのビット位置0、1、2が示されている。ビット位置毎に点線で囲まれたビットを取り出したビット列を同一位置ビット列と定義する。ビット列データD1、D2、D3、D4の各ビット位置0、1、2のビットを取り出すことにより、同一位置ビット列F1(240)、F2(241)、F3(242)が構成される。ステップ2以降では、同一ビット列の符号240、241、242は省略されている。なお、以下の説明において、同一位置ビット列を、サフィックスを省略して符号Fにより表記することがある。 In the bit string data group 101, bit positions 0, 1, and 2 of each bit string data are shown. A bit string obtained by extracting bits surrounded by a dotted line for each bit position is defined as the same position bit string. By extracting the bits at bit positions 0, 1, and 2 of the bit string data D1, D2, D3, and D4, the same position bit strings F1 (240), F2 (241), and F3 (242) are configured. In step 2 and subsequent steps, reference numerals 240, 241, and 242 of the same bit string are omitted. In the following description, the same position bit string may be represented by the symbol F with the suffix omitted.

図2Aにおいて、検索ビット列S260にも、ビット位置0、1、2が示されている。各ビット位置の検索ビットをS1、S2、S3と表記している。なお、以下の説明において、検索ビットを、サフィックスを省略して符号Sにより表記することがある。 In FIG. 2A, the bit positions 0, 1, and 2 are also shown in the search bit string S260. The search bits at each bit position are denoted as S1, S2, and S3. In the following description, the search bit may be represented by the symbol S with the suffix omitted.

ステップ1では、双方向の矢印160aで示すように、検索ビット列S260のビット位置0に位置する検索ビットS1と同一位置ビット列F1(240)の各ビットが比較される。さらに双方向の矢印220aで示すように、同一位置ビット列F1(240)の各ビットに対するビット比較160aの結果に対して選択ビット列210aの対応する各選択ビットによりビット判定が行われる。 In step 1, as indicated by a bidirectional arrow 160a, each bit of the same position bit string F1 (240) is compared with the search bit S1 located at the bit position 0 of the search bit string S260. Furthermore, as indicated by a bidirectional arrow 220a, bit determination is performed on the result of the bit comparison 160a for each bit of the same position bit string F1 (240) by each corresponding selected bit of the selected bit string 210a.

本発明の各実施形態においては、検索ビットと同一位置ビット列の各ビットの比較により、一致すればビット“1”を不一致であればビット“0”を比較の結果を表すものとする。そしてビット判定は、選択ビット列の“1”である選択ビットに対応するビット比較の結果が“1”であるかを判定する。この判定結果に基づいて、次のステップで選択ビット列として用いられる次選択ビット列を出力する。なお、以下の説明において、次選択ビット列を構成するビットを、次選択ビットに替えて選択ビットと呼ぶことがある。 In each embodiment of the present invention, by comparing each bit of the same position bit string with the search bit, the bit “1” represents the result of the comparison if they match and the bit “0” represents the result of the comparison if they do not match. In the bit determination, it is determined whether the result of bit comparison corresponding to the selected bit that is “1” in the selected bit string is “1”. Based on this determination result, the next selected bit string used as the selected bit string in the next step is output. In the following description, the bits constituting the next selection bit string may be referred to as selection bits instead of the next selection bits.

上記判定でビット比較の結果が“1”であると判定すると、上述の“1”である選択ビットが対応するビット列データと同一のビット列データに対応する次選択ビット列の次選択ビットを“1”とし、ビット比較の結果が“0”であると判定すると、上述の“1”である選択ビットが対応するビット列データと同一のビット列データに対応する次選択ビット列の次選択ビットを“0”とする。また、“0”である選択ビットに対応するビット列データと同一のビット列データに対応する次選択ビット列の次選択ビットを“0”、すなわち上述の“0”である選択ビットとする。 If it is determined in the above determination that the result of the bit comparison is “1”, the next selected bit of the next selected bit string corresponding to the same bit string data as the bit string data corresponding to the selected bit of “1” is “1”. If the result of bit comparison is determined to be “0”, the next selected bit of the next selected bit string corresponding to the same bit string data as the bit string data corresponding to the selected bit of “1” is set to “0”. To do. Further, the next selection bit of the next selection bit string corresponding to the same bit string data as the bit string data corresponding to the selection bit of “0” is set to “0”, that is, the above-described selection bit of “0”.

図2Aの例示では、検索ビットS1は“0”、同一位置ビット列F1(240)は“1001”、選択ビット列210aは“1111”、であるから、点線の矢印230aで示すように、判定結果の次選択ビット列211aは“0110”となる。 In the example of FIG. 2A, the search bit S1 is “0”, the same position bit string F1 (240) is “1001”, and the selected bit string 210a is “1111”. Therefore, as shown by the dotted arrow 230a, The next selection bit string 211a is “0110”.

次のステップ2では、双方向の矢印160bで示すように、検索ビット列S260のビット位置1に位置する検索ビットS2と同一位置ビット列F2(241)の各ビットが比較される。さらに双方向の矢印220bで示すように、ステップ1における判定結果である次選択ビット列211aが選択ビット列210bとして用いられ、同一位置ビット列F2(241)の各ビットに対するビット比較160bの結果に対して選択ビット列210bの対応する各選択ビットによりビット判定が行われる。 In the next step 2, as indicated by the bidirectional arrow 160b, each bit of the same position bit string F2 (241) is compared with the search bit S2 located at the bit position 1 of the search bit string S260. Further, as indicated by a bidirectional arrow 220b, the next selected bit string 211a, which is the determination result in step 1, is used as the selected bit string 210b and selected for the result of the bit comparison 160b for each bit of the same position bit string F2 (241). Bit determination is performed by each selection bit corresponding to the bit string 210b.

図2Aの例示では、検索ビットS2は“1”、同一位置ビット列F2(241)は“1110”、選択ビット列210bは“0110”、であるから、点線の矢印230bで示すように、判定結果の次選択ビット列211bは“0110”となる。 In the example of FIG. 2A, the search bit S2 is “1”, the same-position bit string F2 (241) is “1110”, and the selected bit string 210b is “0110”. Therefore, as shown by the dotted arrow 230b, The next selection bit string 211b is “0110”.

次のステップ3では、双方向の矢印160cで示すように、検索ビット列S260のビット位置2に位置する検索ビットS3と同一位置ビット列F3(242)の各ビットが比較される。さらに双方向の矢印220cで示すように、ステップ2における判定結果である次選択ビット列211bが選択ビット列210cとして用いられ、同一位置ビット列F3(242)の各ビットに対するビット比較160cの結果に対して選択ビット列210cの対応する各選択ビットによりビット判定が行われる。 In the next step 3, as indicated by the bidirectional arrow 160c, each bit of the same position bit string F3 (242) is compared with the search bit S3 located at the bit position 2 of the search bit string S260. Further, as indicated by a two-way arrow 220c, the next selected bit string 211b, which is the determination result in step 2, is used as the selected bit string 210c and selected for the result of the bit comparison 160c for each bit of the same position bit string F3 (242). Bit determination is performed by each corresponding selection bit of the bit string 210c.

図2Aの例示では、検索ビットS3は“0”、同一位置ビット列F3(242)は“1010”、選択ビット列210cは“0110”、であるから、点線の矢印230cで示すように、判定結果の次選択ビット列211cは“0100”となる。 In the example of FIG. 2A, the search bit S3 is “0”, the same-position bit string F3 (242) is “1010”, and the selected bit string 210c is “0110”. Therefore, as shown by the dotted arrow 230c, The next selection bit string 211c is “0100”.

ステップ3までの処理により、最下位のビット位置までのビットの判定が終了するので、“次選択ビット列211cが検索ビット列Sと完全一致するビット列データを選択するための情報となる。
図2Aの例示では、矢印250で示すように、選択ビットE2のみが“1”であり、選択ビットE2に対応するビット列データD2が検索ビット列Sと完全一致するビット列データであることが分かる。
Since the determination of the bits up to the lowest bit position is completed by the processing up to step 3, “the next selection bit string 211c is information for selecting bit string data that completely matches the search bit string S.
In the example of FIG. 2A, as indicated by the arrow 250, only the selection bit E2 is “1”, and it can be seen that the bit string data D2 corresponding to the selection bit E2 is bit string data that completely matches the search bit string S.

以上の処理ステップを勝ち残りの競争に例えると、ビット列データの最上位ビットから最下位ビットまで、勝ち残ったビット列データの同一ビット位置のビットが検索ビット列Sの検索ビットと一致するかの判定を行い、一致するビット列データを勝者、一致しないビット列データを敗者として勝ち残りの選抜を行うものに相当する。但し、データ処理としては、検索ビットとのビット比較を先に行い、一致した同一ビット位置のビットが対応するビット列データが勝ち残ってきたものであるかの判定を次に行うものである。 If the above processing steps are compared to the winning competition, it is determined from the most significant bit to the least significant bit of the bit string data whether the bit at the same bit position of the winning bit string data matches the search bit of the search bit string S, This is equivalent to selecting the remaining bit string data with the matching bit string data as the winner and the unmatched bit string data as the loser. However, in the data processing, the bit comparison with the search bit is performed first, and it is next determined whether or not the bit string data corresponding to the matched bit at the same bit position has been won.

上述の説明では、選択ビットExが“1”であればそれに対応するビット列データDxから取り出したビットがビット判定の対象として選択される、としたが、選択ビットExが“0”であればそれに対応するビット列データDxから取り出したビットをビット判定の対象として選択することにしても完全一致選択処理が可能であることは明らかである。そこで、ビット列データDxから取り出したビットをビット判定の対象として選択することを示す選択ビットExを有意のビットと、あるいはその選択ビットExは有意のビットであると、またビット列データDxから取り出したビットをビット判定の対象として選択しないことを示す選択ビットExは有意のビットではないと、いうこともある。 In the above description, if the selected bit Ex is “1”, the bit extracted from the corresponding bit string data Dx is selected as a bit determination target. However, if the selected bit Ex is “0”, It is obvious that the complete match selection process can be performed even when the bit extracted from the corresponding bit string data Dx is selected as the bit determination target. Therefore, the selection bit Ex indicating that the bit extracted from the bit string data Dx is selected as a bit determination target is a significant bit, or the selected bit Ex is a significant bit, and the bit extracted from the bit string data Dx. May not be a significant bit.

さらに、上述の説明では、ビット比較の結果の一致をビット“1”で、不一致をビット“0”で表すとしたが、これも逆にすることが可能であることは明らかである。そこで、後に再度説明するが、ビット比較の結果を表すビットを判定ビットと定義し、一致を表す判定ビットは有意のビットである、あるいは有意であると、また比較の結果不一致であることを示す判定ビットは有意のビットではない、あるいは有意ではないと、いうこともある。 Furthermore, in the above description, the match of the bit comparison results is represented by bit “1” and the mismatch is represented by bit “0”. However, it is obvious that this can be reversed. Therefore, as will be described later, a bit representing the result of bit comparison is defined as a decision bit, and a decision bit representing coincidence is a significant bit or is significant, and indicates that the comparison result is inconsistent. The decision bit may not be significant or not significant.

さらに、ビット列データ群の中に同一のビット列データが含まれていてもよい。その場合には、最下位ビット位置のビット判定の出力である次選択ビット列にビット“1”が複数存在する可能性が生まれる。
以上の選択ビット、判定ビット、及びビット列データの重複についての記述は、第1の実施形態に限らず、後に説明する第2の実施形態及び第3の実施形態においても同様に成り立つ。
Furthermore, the same bit string data may be included in the bit string data group. In this case, there is a possibility that a plurality of bits “1” exist in the next selected bit string that is the output of the bit determination at the least significant bit position.
The description about the overlap of the selection bit, the determination bit, and the bit string data described above is not limited to the first embodiment, and similarly applies to the second embodiment and the third embodiment described later.

図2Bは、本発明の第1の実施形態における完全一致選択処理の別の例を概念的に説明する図である。図2Bに例示するビット列データ群101は、図2Aにおいて例示したものと同じである。図2Bに記載された検索ビット列S261は“001”であり、図2Aに記載された検索ビット列S260とは異なる。図2Bに記載されたでは、ビット列データ群101に検索ビット列S261と完全一致するビット列データは含まれていない。 FIG. 2B is a diagram conceptually illustrating another example of the exact match selection process according to the first embodiment of the present invention. The bit string data group 101 illustrated in FIG. 2B is the same as that illustrated in FIG. 2A. The search bit string S261 described in FIG. 2B is “001”, which is different from the search bit string S260 described in FIG. 2A. 2B, the bit string data group 101 does not include bit string data that completely matches the search bit string S261.

ステップ1では、双方向の矢印161aで示すように、検索ビット列S261のビット位置0に位置する検索ビットS1と同一位置ビット列F1(240)の各ビットが比較される。さらに双方向の矢印221aで示すように、同一位置ビット列F1(240)の各ビットに対するビット比較161aの結果に対して選択ビット列212aの対応する各選択ビットによりビット判定が行われる。 In step 1, as indicated by a bidirectional arrow 161a, each bit of the same position bit string F1 (240) is compared with the search bit S1 located at the bit position 0 of the search bit string S261. Further, as indicated by a bidirectional arrow 221a, bit determination is performed on the result of the bit comparison 161a for each bit of the same position bit string F1 (240) by each corresponding selected bit of the selected bit string 212a.

図2Bの例示では、検索ビットS1は“0”、同一位置ビット列F1(240)は“1001”、選択ビット列212aは“1111”、であるから、点線の矢印231aで示すように、判定結果の次選択ビット列213aは“0110”となる。 In the example of FIG. 2B, the search bit S1 is “0”, the same position bit string F1 (240) is “1001”, and the selected bit string 212a is “1111”. The next selection bit string 213a is “0110”.

次のステップ2では、双方向の矢印161bで示すように、検索ビット列S261のビット位置1に位置する検索ビットS2と同一位置ビット列F2(241)の各ビットが比較される。さらに双方向の矢印221bで示すように、ステップ1における判定結果である次選択ビット列213aが選択ビット列212bとして用いられ、同一位置ビット列F2(241)の各ビットに対するビット比較161bの結果に対して選択ビット列212bの対応する各選択ビットによりビット判定が行われる。 In the next step 2, as indicated by the bidirectional arrow 161b, each bit of the same position bit string F2 (241) is compared with the search bit S2 located at the bit position 1 of the search bit string S261. Further, as indicated by the bidirectional arrow 221b, the next selected bit string 213a, which is the determination result in step 1, is used as the selected bit string 212b, and is selected for the result of the bit comparison 161b for each bit of the same position bit string F2 (241). Bit determination is performed by each corresponding selection bit of the bit string 212b.

図2Bの例示では、検索ビットS2は“0”、同一位置ビット列F2(241)は“1110”、選択ビット列210bは“0110”、であるから、点線の矢印231bで示すように、判定結果の次選択ビット列213bは“0000”となる。 In the example of FIG. 2B, the search bit S2 is “0”, the same-position bit string F2 (241) is “1110”, and the selected bit string 210b is “0110”, so that the determination result is as shown by the dotted arrow 231b. The next selection bit string 213b is “0000”.

次のステップ3では、双方向の矢印161cで示すように、検索ビット列S261のビット位置2に位置する検索ビットS3と同一位置ビット列F3(242)の各ビットが比較される。さらに双方向の矢印221cで示すように、ステップ2における判定結果である次選択ビット列213bが選択ビット列212cとして用いられ、同一位置ビット列F3(242)の各ビットに対するビット比較161cの結果に対して選択ビット列212cの対応する各選択ビットによりビット判定が行われる。 In the next step 3, as indicated by a bidirectional arrow 161c, each bit of the same position bit string F3 (242) is compared with the search bit S3 located at the bit position 2 of the search bit string S261. Further, as indicated by a bidirectional arrow 221c, the next selected bit string 213b, which is the determination result in step 2, is used as the selected bit string 212c, and is selected for the result of the bit comparison 161c for each bit of the same position bit string F3 (242). Bit determination is performed by each corresponding selection bit of the bit string 212c.

図2Bの例示では、検索ビットS3は“1”、同一位置ビット列F3は“1010”、選択ビット列212cは“0000”、であるから、点線の矢印231cで示すように、判定結果の次選択ビット列213cは“0000”となる。 In the example of FIG. 2B, the search bit S3 is “1”, the same-position bit string F3 is “1010”, and the selection bit string 212c is “0000”, so that the next selected bit string of the determination result is indicated by a dotted arrow 231c. 213c becomes “0000”.

ステップ3までの処理により、最下位のビット位置までのビットの判定が終了するので、“次選択ビット列213cが検索ビット列Sと完全一致するビット列データを選択するための情報となる。
図2Bの例示では、矢印250−1で示すように、“1”である選択ビットが存在しないので、検索ビット列Sと完全一致するビット列データに該当するものはビット列データ群には存在しないことが分かる。
Since the determination of the bits up to the lowest bit position is completed by the processing up to step 3, “the next selection bit string 213c becomes information for selecting bit string data that completely matches the search bit string S”.
In the example of FIG. 2B, as indicated by the arrow 250-1, there is no selection bit that is “1”, and therefore, there is no case in the bit string data group that corresponds to the bit string data that completely matches the search bit string S. I understand.

次に本発明の第1の実施形態に係る回路について、図3及び図4を参照して説明する。図3及び図4において、図2A及び図2Bと同様な部分の説明は省略する。 Next, a circuit according to the first embodiment of the present invention will be described with reference to FIGS. In FIG. 3 and FIG. 4, the description of the same parts as in FIG. 2A and FIG. 2B is omitted.

図3は、本発明の第1の実施形態における完全一致選択回路を概念的に説明する図である。
図3に例示するデータレジスタ群301には、図2A及び図2Bに例示したビット列データ群101が格納されている。また、検索ビットレジスタ370には、図2Aに例示した検索ビット列S260が格納されている。選択ビットレジスタ310には、選択ビット列の初期値“1111”が格納されている。
FIG. 3 is a diagram conceptually illustrating the exact match selection circuit in the first embodiment of the present invention.
In the data register group 301 illustrated in FIG. 3, the bit string data group 101 illustrated in FIGS. 2A and 2B is stored. The search bit register 370 stores the search bit string S260 illustrated in FIG. 2A. The selection bit register 310 stores an initial value “1111” of the selection bit string.

図3に示すように完全一致選択回路300aは、同一位置ビット列F1(240)に対応するビット判定回路320a、同一位置ビット列F2(241)に対応するビット判定回路320b、及び同一位置ビット列F3(242)に対応するビット判定回路320cを含む。これらのビット判定回路は基本的には同じ構成を用いることができる。 As shown in FIG. 3, the exact match selection circuit 300a includes a bit determination circuit 320a corresponding to the same position bit string F1 (240), a bit determination circuit 320b corresponding to the same position bit string F2 (241), and a same position bit string F3 (242). ) Corresponding to the bit determination circuit 320c. These bit determination circuits can basically use the same configuration.

データレジスタ群301に格納されたビット列データD1、D2、D3、D4の同一ビット位置のビットが取り出された同一位置ビット列F1、F2、F3は、それぞれ4ビットの並列バス340a、340b、340cにより、ビット判定回路320a、320b、320cに入力される。ビット判定回路320a、320b、320cにおいて、それぞれ図2Aに示すステップ1、2、3の処理が実行される。 The same-position bit strings F1, F2, and F3 from which the bits at the same bit positions of the bit string data D1, D2, D3, and D4 stored in the data register group 301 are extracted are respectively obtained by 4-bit parallel buses 340a, 340b, and 340c. Input to the bit determination circuits 320a, 320b, and 320c. In the bit determination circuits 320a, 320b, and 320c, steps 1, 2, and 3 shown in FIG. 2A are executed.

選択ビットレジスタ310に格納された選択ビット列は、4ビットの並列バス330aにより、ビット判定回路320aに入力される。ビット判定回路320aのビット判定結果出力310bは、4ビットの並列バス330bによりビット判定回路320bに入力される。次に、ビット判定回路320bのビット判定結果出力310cは、4ビットの並列バス330cによりビット判定回路320cに入力される。さらに、ビット判定回路320cのビット判定結果出力は、4ビットの並列バス330dにより選択結果レジスタ360に入力される。 The selected bit string stored in the selected bit register 310 is input to the bit determination circuit 320a through the 4-bit parallel bus 330a. The bit determination result output 310b of the bit determination circuit 320a is input to the bit determination circuit 320b through the 4-bit parallel bus 330b. Next, the bit determination result output 310c of the bit determination circuit 320b is input to the bit determination circuit 320c through the 4-bit parallel bus 330c. Further, the bit determination result output of the bit determination circuit 320c is input to the selection result register 360 through the 4-bit parallel bus 330d.

図3の例示では、選択結果レジスタ360には、図2Aに示す次選択ビット列211cが格納され、矢印350で示すように、ビットE2に対応するビット列データD2が検索ビット列レジスタ370に格納された検索ビット列Sと完全一致することが分かる。 In the example of FIG. 3, the selection result register 360 stores the next selection bit string 211 c shown in FIG. 2A, and as indicated by the arrow 350, the search is performed by storing the bit string data D2 corresponding to the bit E <b> 2 in the search bit string register 370. It can be seen that the bit string S completely matches.

図4は、本発明の第1の実施形態におけるビット判定回路の実施例を説明する図である。図4の(a)に示すのは、上記本発明の第1の実施形態のビット判定回路の実施例の回路構成である。この回路構成は、図3に示すビット判定回路320a、320b、320cに共通である。図4の(b)に示すのは、本発明の第1の実施形態におけるビット判定回路の実施例の構成要素の入出力論理を説明するものである。なお、以下の説明においては、ビット列データ群はn個のビット列データを含むものとする。なおnビットの並列バスの各ビットを添え字xで表記することがある。 FIG. 4 is a diagram for explaining an example of the bit determination circuit according to the first embodiment of the present invention. FIG. 4A shows a circuit configuration of an example of the bit determination circuit according to the first embodiment of the present invention. This circuit configuration is common to the bit determination circuits 320a, 320b, and 320c shown in FIG. FIG. 4B illustrates the input / output logic of the constituent elements of the bit determination circuit according to the first embodiment of the present invention. In the following description, it is assumed that the bit string data group includes n bit string data. Each bit of the n-bit parallel bus may be represented by a subscript x.

図4の(a)に示すように、ビット判定回路320は、ビット比較器410、次選択ビット設定器420を含んでいる。ビット判定回路320には、nビットの並列バス340により同一位置ビット列Fが入力され、またnビットの並列バス330により選択ビット列Eが入力され、さらにシングルビットバス341により検索ビットSが入力される。 As shown in FIG. 4A, the bit determination circuit 320 includes a bit comparator 410 and a next selection bit setting unit 420. The bit determination circuit 320 receives the same-position bit string F from the n-bit parallel bus 340, receives the selected bit string E from the n-bit parallel bus 330, and receives the search bit S from the single bit bus 341. .

上記入力された同一位置ビット列Fと検索ビットSはビット比較器410に入力され、同一位置ビット列Fの各ビットと検索ビットSとの論理演算により先に述べた判定ビットからなる判定ビット列Pが求められる。判定ビット列Pと選択ビット列Eは次選択ビット列設定器420に入力される。次選択ビット列設定器420では判定ビット列Pと選択ビット列Eのビットごとの論理演算が行われ、新たなビット列Qが求められる。ビット列Qは、次選択ビット列としてnビットの並列バス331に出力される。なお、上述のように、ビット列のビットごとの論理演算により同じビット幅の新たなビット列を求めること、あるいは1つのビットを求めることをビット列演算ということがある。 The input same-position bit string F and search bit S are input to the bit comparator 410, and a determination bit string P including the above-described determination bits is obtained by logical operation of each bit of the same-position bit string F and the search bit S. It is done. The determination bit string P and the selection bit string E are input to the next selection bit string setting unit 420. The next selected bit string setting unit 420 performs a logical operation for each bit of the determination bit string P and the selected bit string E to obtain a new bit string Q. The bit string Q is output to the n-bit parallel bus 331 as the next selected bit string. As described above, obtaining a new bit string having the same bit width by a logical operation for each bit of a bit string, or obtaining one bit may be referred to as a bit string operation.

図4の(b)に示すのは、本発明の第1の実施の形態におけるビット比較器410のビット列演算Pと次選択ビット列設定器420のビット列演算Qの論理式である。記号“*”は論理積を表すものとしている。 FIG. 4B shows logical expressions of the bit string operation P of the bit comparator 410 and the bit string operation Q of the next selected bit string setting unit 420 in the first embodiment of the present invention. The symbol “*” represents a logical product.

ビット比較器410のビット列演算の出力であるビット列PのビットPxは、同一位置ビット列FのビットFxの論理否定と検索ビットSの論理否定との論理積と、ビットFxと検索ビットSの論理積と、の論理和、すなわちビットFxと検索ビットSの排他的論理和であり、ビットFxと検索ビットSが一致するときに“1”となり、一致しないときは“0”である。 The bit Px of the bit string P, which is the output of the bit string operation of the bit comparator 410, is the logical product of the logical negation of the bit Fx of the same position bit string F and the logical negation of the search bit S, and the logical product of the bit Fx and the search bit S. Is the exclusive OR of the bit Fx and the search bit S, and is “1” when the bit Fx and the search bit S match, and “0” when they do not match.

また、次選択ビット列設定器420のビット列演算の出力であるビット列QのビットQxは、上記PxとExの論理積である。すなわち、選択ビットExが“1”のときQxはPx、選択ビットExが“0”のときQxは“0”、すなわちExである。
上述のビット列演算Pとビット列演算Qにより、検索ビットSに対する同一位置ビット列Fの各ビットのビット判定が行われ、ビット判定回路320から次選択ビット列が出力される。
The bit Qx of the bit string Q, which is the output of the bit string operation of the next selected bit string setter 420, is the logical product of the above Px and Ex. That is, when the selection bit Ex is “1”, Qx is Px, and when the selection bit Ex is “0”, Qx is “0”, that is, Ex.
The bit determination of each bit of the same position bit string F with respect to the search bit S is performed by the bit string calculation P and the bit string calculation Q described above, and the next selection bit string is output from the bit determination circuit 320.

次に図5〜図7を参照して本発明の第2の実施形態を説明する。この第2の実施形態は、部分一致選択に関するものである。
図5は、本発明の第2の実施形態における部分一致選択処理を概念的に説明する図である。図5に示すように、ビット列データ群101及び検索ビット列S261は、図2Bに記載したものと同じである。したがって、同様な部分の説明は省略する。
Next, a second embodiment of the present invention will be described with reference to FIGS. This second embodiment relates to partial match selection.
FIG. 5 is a diagram conceptually illustrating the partial match selection process in the second embodiment of the present invention. As shown in FIG. 5, the bit string data group 101 and the search bit string S261 are the same as those described in FIG. 2B. Therefore, description of similar parts is omitted.

図5には、検索ビットSとの同一性の判定を行わないビット列データDxのビットのビット位置を示すスキップビットからなるスキップビット列K280が示されている。ビット位置0のスキップビットK1は“0”、ビット位置1のスキップビットK2は“1”、ビット位置2のスキップビットK3は“0”である。 FIG. 5 shows a skip bit string K280 made up of skip bits indicating the bit positions of the bits of the bit string data Dx for which the identity determination with the search bit S is not performed. The skip bit K1 at bit position 0 is “0”, the skip bit K2 at bit position 1 is “1”, and the skip bit K3 at bit position 2 is “0”.

以下の説明において、スキップビット“1”が、スキップビットのビット位置に対応するビット列データDxのビットと検索ビットSとの同一性の判定を行わないことを示す、とするが、スキップビット“0”が、スキップビットのビット位置に対応するビット列データDxのビットと検索ビットSとの同一性の判定を行わないことを示す、としてもよいことは当業者には明らかである。そこで、選択ビット等と同様に、ビット列データDxのビットと検索ビットSとの同一性の判定を行わないことを示すスキップビットを有意のビットと、あるいはそのスキップビットは有意のビットであると、またビット列データDxのビットと検索ビットSとの同一性の判定をスキップしないことを示すスキップビットは有意のビットではないと、いうこともある。なお、以下の説明において、スキップビットをサフィックスを省略して符号Kにより表記することがある。 In the following description, it is assumed that the skip bit “1” indicates that the identity of the bit string data Dx corresponding to the bit position of the skip bit and the search bit S is not determined. It is obvious to those skilled in the art that "" may indicate that the identity of the bit string data Dx corresponding to the bit position of the skip bit and the search bit S is not determined. Therefore, similarly to the selected bit or the like, a skip bit indicating that the identity of the bit string data Dx and the search bit S is not determined is a significant bit, or the skip bit is a significant bit. The skip bit indicating that the determination of the identity between the bit string data Dx and the search bit S is not skipped may not be a significant bit. In the following description, the skip bit may be represented by the symbol K with the suffix omitted.

ステップ1では、双方向の矢印162aで示すように、検索ビット列S261のビット位置0に位置する検索ビットS1と同一位置ビット列F1(240)の各ビットが比較される。さらに双方向の矢印222aで示すように、同一位置ビット列F1(240)の各ビットに対するビット比較162aの結果に対して選択ビット列214aの対応する各選択ビットによりビット判定が行われる。 In step 1, as indicated by a bidirectional arrow 162a, each bit of the same position bit string F1 (240) is compared with the search bit S1 located at the bit position 0 of the search bit string S261. Further, as indicated by a bidirectional arrow 222a, bit determination is performed on the result of bit comparison 162a for each bit of the same position bit string F1 (240) by each corresponding selected bit of the selected bit string 214a.

図5の例示では、検索ビットS1は“0”、同一位置ビット列F1(240)は“1001”、選択ビット列214aは“1111”、であり、スキップビットK1は“0”であるから、点線の矢印292aで示すように、点線の矢印232aで示す判定結果が出力されて次選択ビット列215aは“0110”となる。 In the example of FIG. 5, the search bit S1 is “0”, the same position bit string F1 (240) is “1001”, the selection bit string 214a is “1111”, and the skip bit K1 is “0”. As indicated by the arrow 292a, the determination result indicated by the dotted arrow 232a is output, and the next selected bit string 215a becomes “0110”.

次のステップ2では、双方向の矢印162bで示すように、検索ビット列S261のビット位置1に位置する検索ビットS2“0”と同一位置ビット列F2(241)の各ビットが比較される。しかし、図5の例ではスキップビットK2が“1”であるため、比較結果は無視、あるいは比較されずにビット判定はスキップされ、点線の矢印292b及び矢印272bに示すように、ステップ1における判定結果である次選択ビット列215aが用いられた選択ビット列214bが、ステップ2の出力である次選択ビット列215bとされる。 In the next step 2, as indicated by a bidirectional arrow 162b, each bit of the same position bit string F2 (241) is compared with the search bit S2 “0” located at the bit position 1 of the search bit string S261. However, since the skip bit K2 is “1” in the example of FIG. 5, the comparison result is ignored or the bit determination is skipped without being compared, and the determination in step 1 is performed as indicated by the dotted arrows 292b and arrows 272b. The selected bit string 214b using the resulting next selected bit string 215a is used as the next selected bit string 215b that is the output of step 2.

次のステップ3では、双方向の矢印162cで示すように、検索ビット列S261のビット位置2に位置する検索ビットS3と同一位置ビット列F3(242)の各ビットが比較される。さらに双方向の矢印222cで示すように、ステップ2における判定結果である次選択ビット列214bが選択ビット列214cとして用いられ、同一位置ビット列F3(242)の各ビットに対するビット比較162cの結果に対して選択ビット列214cの対応する各選択ビットによりビット判定が行われる。 In the next step 3, as indicated by a bidirectional arrow 162c, each bit of the same position bit string F3 (242) is compared with the search bit S3 located at the bit position 2 of the search bit string S261. Further, as indicated by a bidirectional arrow 222c, the next selected bit string 214b, which is the determination result in step 2, is used as the selected bit string 214c, and is selected for the result of the bit comparison 162c for each bit of the same position bit string F3 (242). Bit determination is performed by each corresponding selection bit of the bit string 214c.

図5の例示では、検索ビットS3は“1”、同一位置ビット列F3(242)は“1010”、選択ビット列214cは“0110”、であり、スキップビットK2は“0”であるから、点線の矢印292cで示すように、点線の矢印232cで示す判定結果が出力されて次選択ビット列215cは“0010”となる。 In the example of FIG. 5, the search bit S3 is “1”, the same position bit string F3 (242) is “1010”, the selection bit string 214c is “0110”, and the skip bit K2 is “0”. As indicated by the arrow 292c, the determination result indicated by the dotted arrow 232c is output, and the next selected bit string 215c becomes “0010”.

ステップ3までの処理により、最下位のビット位置までのビットの判定が終了するので、“次選択ビット列215cが検索ビット列Sと部分一致するビット列データを選択するための情報となる。
図5の例示では、矢印251で示すように、選択ビットE3が“1”であり、選択ビットE3に対応するビット列データD3が検索ビット列Sと部分一致するビット列データであることが分かる。
Since the determination of the bits up to the least significant bit position is completed by the processing up to step 3, “the next selection bit string 215c is information for selecting bit string data partially matching the search bit string S.
In the example of FIG. 5, as indicated by the arrow 251, it can be seen that the selection bit E3 is “1” and the bit string data D3 corresponding to the selection bit E3 is bit string data that partially matches the search bit string S.

次に本発明の第2の実施形態に係る回路について、図6及び図7を参照して説明する。図6及び図7において、図5と同様な部分の説明は省略する。 Next, a circuit according to a second embodiment of the present invention will be described with reference to FIGS. 6 and 7, the description of the same part as in FIG. 5 is omitted.

図6は、本発明の第2の実施形態における部分一致選択回路を概念的に説明する図である。
図6に例示するデータレジスタ群301には、図5に例示したビット列データ群101が格納されている。また、検索ビットレジスタ370には、図5に例示した検索ビット列S261が格納されている。スキップビットレジスタ380には、図5に例示したスキップビット列K280が格納されている。選択ビットレジスタ310には、選択ビット列の初期値“1111”が格納されている。
FIG. 6 is a diagram conceptually illustrating a partial match selection circuit according to the second embodiment of the present invention.
In the data register group 301 illustrated in FIG. 6, the bit string data group 101 illustrated in FIG. 5 is stored. The search bit register 370 stores the search bit string S261 illustrated in FIG. The skip bit register 380 stores the skip bit string K280 illustrated in FIG. The selection bit register 310 stores an initial value “1111” of the selection bit string.

図6に示すように部分一致選択回路300bは、同一位置ビット列F1(240)に対応するビット判定回路321a、同一位置ビット列F2(241)に対応するビット判定回路321b、及び同一位置ビット列F3(242)に対応するビット判定回路321cを含む。これらのビット判定回路は基本的には同じ構成を用いることができる。 As shown in FIG. 6, the partial match selection circuit 300b includes a bit determination circuit 321a corresponding to the same position bit string F1 (240), a bit determination circuit 321b corresponding to the same position bit string F2 (241), and the same position bit string F3 (242). ) Corresponding to the bit determination circuit 321c. These bit determination circuits can basically use the same configuration.

データレジスタ群301に格納されたビット列データD1、D2、D3、D4の同一ビット位置のビットが取り出された同一位置ビット列F1、F2、F3は、それぞれ4ビットの並列バス342a、342b、342cにより、ビット判定回路321a、321b、321cに入力される。ビット判定回路321a、321b、321cにおいて、それぞれ図5に示すステップ1、2、3の処理が実行される。 The same-position bit strings F1, F2, and F3 from which the bits at the same bit positions of the bit string data D1, D2, D3, and D4 stored in the data register group 301 are extracted are respectively obtained by 4-bit parallel buses 342a, 342b, and 342c. Input to the bit determination circuits 321a, 321b, and 321c. In the bit determination circuits 321a, 321b, and 321c, steps 1, 2, and 3 shown in FIG. 5 are executed.

選択ビットレジスタ310に格納された選択ビット列は、4ビットの並列バス331aにより、ビット判定回路321aに入力される。ビット判定回路321aのビット判定結果出力313bは、4ビットの並列バス331bによりビット判定回路321bに入力される。次に、ビット判定回路321bのビット判定結果出力313cは、4ビットの並列バス331cによりビット判定回路321cに入力される。さらに、ビット判定回路321cのビット判定結果出力は、4ビットの並列バス331dにより選択結果レジスタ360に入力される。 The selected bit string stored in the selected bit register 310 is input to the bit determination circuit 321a through the 4-bit parallel bus 331a. The bit determination result output 313b of the bit determination circuit 321a is input to the bit determination circuit 321b through a 4-bit parallel bus 331b. Next, the bit determination result output 313c of the bit determination circuit 321b is input to the bit determination circuit 321c through the 4-bit parallel bus 331c. Further, the bit determination result output of the bit determination circuit 321c is input to the selection result register 360 via the 4-bit parallel bus 331d.

図6の例示では、選択結果レジスタ360には、図5に示す次選択ビット列215cが格納され、矢印351で示すように、ビットE3に対応するビット列データD3が検索ビット列レジスタ370に格納された検索ビット列Sと部分一致することが分かる。 In the example of FIG. 6, the selection result register 360 stores the next selected bit string 215 c shown in FIG. 5, and the bit string data D <b> 3 corresponding to the bit E <b> 3 is stored in the search bit string register 370 as indicated by the arrow 351. It can be seen that the bit string S partially matches.

図7は、本発明の第2の実施形態におけるビット判定回路の実施例を説明する図である。図7の(a)に示すのは、上記本発明の第2の実施形態のビット判定回路の実施例の回路構成である。この回路構成は、図6に示すビット判定回路321a、321b、321cに共通である。図7の(b)に示すのは、本発明の第2の実施形態におけるビット判定回路の実施例の構成要素の入出力論理を説明するものである。 FIG. 7 is a diagram illustrating an example of the bit determination circuit according to the second embodiment of the present invention. FIG. 7A shows a circuit configuration of an example of the bit determination circuit according to the second embodiment of the present invention. This circuit configuration is common to the bit determination circuits 321a, 321b, and 321c shown in FIG. FIG. 7B illustrates the input / output logic of the constituent elements of the example of the bit determination circuit according to the second embodiment of the present invention.

図7の(a)に示すように、ビット判定回路321は、ビット比較器410、次選択ビット設定器420及び判定結果選択器440を含んでいる。ビット判定回路321には、nビットの並列バス342により同一位置ビット列Fが入力され、またnビットの並列バス331により選択ビット列Eが入力され、さらにシングルビットバス343により検索ビットSが入力され、シングルビットバス381によりスキップビットKが入力される。 As shown in FIG. 7A, the bit determination circuit 321 includes a bit comparator 410, a next selection bit setting unit 420, and a determination result selection unit 440. The bit determination circuit 321 receives the same position bit string F through the n-bit parallel bus 342, receives the selection bit string E through the n-bit parallel bus 331, and further receives the search bit S through the single bit bus 343. The skip bit K is input by the single bit bus 381.

図7の(a)に示すビット比較器410と次選択ビット設定器420は図4の(a)に記載したものと同一であり、したがって、それらの入出力論理も同一であるから、ビット比較器410と次選択ビット設定器420及び図7の(b)に示す論理式の説明は省略する。
判定結果選択器440は、スキップビットKが有意であれば、選択ビット列Eを出力ビット列Zとし、スキップビットKが有意でなければ、次選択ビット設定器420の出力であるビット列Qを出力ビット列Zとする。この出力ビット列Zが、ビット判定回路321から次選択ビット列として出力される。
The bit comparator 410 and the next selection bit setter 420 shown in FIG. 7A are the same as those described in FIG. 4A, and therefore their input / output logic is also the same. The description of the logical expressions shown in FIG. 7 and the next selection bit setting unit 420 and FIG.
If the skip bit K is significant, the determination result selector 440 sets the selected bit string E as the output bit string Z. If the skip bit K is not significant, the determination result selector 440 converts the bit string Q output from the next selected bit setter 420 into the output bit string Z. And This output bit string Z is output from the bit determination circuit 321 as the next selected bit string.

次に図8〜図10を参照して本発明の第3の実施形態を説明する。この第3の実施形態は、最長一致選択に関するものである。ここでいう最長一致とは、検索ビット列の最上位側のビットと一致するビット列データの最上位のビットからのビット長が最長であることを言う。
図8は、本発明の第3の実施形態における最長一致選択処理を概念的に説明する図である。図8に示すように、ビット列データ群101及び検索ビット列S261は、図2Bに記載したものと同じである。したがって、同様な部分の説明は省略する。
Next, a third embodiment of the present invention will be described with reference to FIGS. This third embodiment relates to the longest match selection. The longest match here means that the bit length from the most significant bit of the bit string data matching the most significant bit of the search bit string is the longest.
FIG. 8 is a diagram conceptually illustrating the longest match selection process in the third embodiment of the present invention. As shown in FIG. 8, the bit string data group 101 and the search bit string S261 are the same as those described in FIG. 2B. Therefore, description of similar parts is omitted.

ステップ1では、双方向の矢印163aで示すように、検索ビット列S261のビット位置0に位置する検索ビットS1と同一位置ビット列F1(240)の各ビットが比較される。さらに双方向の矢印224aで示すように、同一位置ビット列F1(240)の各ビットに対するビット比較163aの結果に対して選択ビット列216aの対応する各選択ビットによりビット判定が行われる。 In step 1, as indicated by a bidirectional arrow 163a, each bit of the same position bit string F1 (240) is compared with the search bit S1 located at the bit position 0 of the search bit string S261. Further, as indicated by a bidirectional arrow 224a, bit determination is performed on each bit corresponding to the selected bit string 216a with respect to the result of the bit comparison 163a for each bit of the same position bit string F1 (240).

図8の例示では、検索ビットS1は“0”、同一位置ビット列F1(240)は“1001”、選択ビット列216aは“1111”、であるから、点線の矢印234aで示すように、判定結果の次選択ビット列217aは“0110”となる。 In the example of FIG. 8, the search bit S1 is “0”, the same-position bit string F1 (240) is “1001”, and the selected bit string 216a is “1111”. Therefore, as shown by the dotted arrow 234a, The next selection bit string 217a is “0110”.

次のステップ2では、双方向の矢印163bで示すように、検索ビット列S261のビット位置1に位置する検索ビットS2と同一位置ビット列F2(241)の各ビットが比較される。さらに双方向の矢印224bで示すように、ステップ1における判定結果である次選択ビット列217aが選択ビット列216bとして用いられ、同一位置ビット列F2(241)の各ビットに対するビット比較163bの結果に対して選択ビット列216bの対応する各選択ビットによりビット判定が行われる。 In the next step 2, as indicated by the bidirectional arrow 163b, each bit of the same position bit string F2 (241) is compared with the search bit S2 located at the bit position 1 of the search bit string S261. Further, as indicated by a bidirectional arrow 224b, the next selected bit string 217a that is the determination result in step 1 is used as the selected bit string 216b, and is selected for the result of the bit comparison 163b for each bit of the same position bit string F2 (241). Bit determination is performed by each corresponding selection bit of the bit string 216b.

図8の例示では、検索ビットS2は“0”、同一位置ビット列F2(241)は“1110”、選択ビット列216bは“0110”、であるから、点線の矢印234bで示すように、判定結果の次選択ビット列217b−1は“0000”となり、検索ビット列Sとビット位置0からビット位置1までのビットが全て一致するビット列データは存在しない。 In the example of FIG. 8, the search bit S2 is “0”, the same position bit string F2 (241) is “1110”, and the selected bit string 216b is “0110”. Therefore, as shown by the dotted arrow 234b, The next selection bit string 217b-1 is “0000”, and there is no bit string data in which all the bits from the search bit string S to the bit position 0 to the bit position 1 match.

そこで、点線の矢印235bと矢印224b−1で示すように、選択ビット列216bがステップ2における次選択ビット列217bとして出力される。また、ステップ2において、検索ビット列Sと最上位のビット位置であるビット位置0からビット位置1までのビットが全て一致するビット列データは存在しない、すなわち検索ビット列Sと完全一致するビット列データは不存在と判定した履歴(以下、判定履歴ということがある。)が、点線の矢印235cで示すように、ステップ3に継承される。 Therefore, the selected bit string 216b is output as the next selected bit string 217b in step 2, as indicated by the dotted arrow 235b and the arrow 224b-1. In step 2, there is no bit string data in which all the bits from bit position 0 to bit position 1 which are the most significant bit positions match the search bit string S, that is, there is no bit string data that completely matches the search bit string S. The history determined as (hereinafter also referred to as determination history) is inherited by step 3 as indicated by the dotted arrow 235c.

次のステップ3では、双方向の矢印163cで示すように、検索ビット列S261のビット位置2に位置する検索ビットS3と同一位置ビット列F3(242)の各ビットが比較される。さらに双方向の矢印224cで示すように、ステップ2における判定結果である次選択ビット列217bが選択ビット列216cとして用いられ、同一位置ビット列F3(242)の各ビットに対するビット比較163cの結果に対して選択ビット列216cの対応する各選択ビットによりビット判定が行われる。 In the next step 3, as indicated by a bidirectional arrow 163c, each bit of the same position bit string F3 (242) is compared with the search bit S3 located at the bit position 2 of the search bit string S261. Further, as indicated by the bidirectional arrow 224c, the next selected bit string 217b, which is the determination result in step 2, is used as the selected bit string 216c, and is selected for the result of the bit comparison 163c for each bit of the same position bit string F3 (242). Bit determination is performed by each corresponding selection bit of the bit string 216c.

図8の例示では、検索ビットS3は“1”、同一位置ビット列F3(242)は“1010”、選択ビット列216cは“0110”、であるから、点線の矢印234cで示すように、判定結果の次選択ビット列217c−1は“0010”となる。
しかし、点線の矢印235cで示すように、ステップ2における判定履歴がステップ3に継承されているので、矢印224c−1で示すように、選択ビット列217bがステップ3における次選択ビット列217cとして出力される。
In the example of FIG. 8, the search bit S3 is “1”, the same-position bit string F3 (242) is “1010”, and the selected bit string 216c is “0110”. Therefore, as shown by the dotted arrow 234c, The next selection bit string 217c-1 is “0010”.
However, since the determination history in step 2 is inherited by step 3 as indicated by the dotted arrow 235c, the selected bit string 217b is output as the next selected bit string 217c in step 3 as indicated by the arrow 224c-1. .

ステップ3までの処理により、最下位のビット位置までのビットの判定が終了するので、“次選択ビット列217cが検索ビット列Sと最長一致するビット列データを選択するための情報となる。
図8の例示では、矢印252で示すように、選択ビットE2、E3が“1”であり、選択ビットE2、E3に対応するビット列データD2、D3が検索ビット列Sと最長一致するビット列データであることが分かる。
Since the determination of the bits up to the lowest bit position is completed by the processing up to step 3, “the next selection bit string 217c is information for selecting the bit string data that has the longest match with the search bit string S.
In the example of FIG. 8, as indicated by an arrow 252, the selection bits E2 and E3 are “1”, and the bit string data D2 and D3 corresponding to the selection bits E2 and E3 are the bit string data that is the longest match with the search bit string S. I understand that.

次に本発明の第3の実施形態に係る回路について、図9及び図10を参照して説明する。図9及び図10において、図8と同様な部分の説明は省略する。なお、以下の説明において、図8を参照して説明した判定履歴の有無を表すビットを履歴ビットと呼び、判定履歴ありを表す履歴ビットを有意のビットと、あるいはその履歴ビットは有意であるということがある。また、判定履歴なしを表す履歴ビットは有意のビットではない、あるいは有意ではないということがある。 Next, a circuit according to a third embodiment of the present invention will be described with reference to FIGS. In FIG. 9 and FIG. 10, the description of the same part as FIG. 8 is omitted. In the following description, the bit indicating the presence / absence of the determination history described with reference to FIG. 8 is referred to as a history bit, and the history bit indicating that there is a determination history is referred to as a significant bit, or the history bit is significant. Sometimes. In addition, a history bit indicating that there is no determination history may not be a significant bit or may not be significant.

図9は、本発明の第3の実施形態における最長一致選択回路を概念的に説明する図である。
図9に例示するデータレジスタ群301には、図8に例示したビット列データ群101が格納されている。また、検索ビットレジスタ370には、図8に例示した検索ビット列S261が格納されている。選択ビットレジスタ310には、選択ビット列の初期値“1111”が格納されている。
FIG. 9 is a diagram conceptually illustrating the longest match selection circuit in the third embodiment of the present invention.
In the data register group 301 illustrated in FIG. 9, the bit string data group 101 illustrated in FIG. 8 is stored. The search bit register 370 stores the search bit string S261 illustrated in FIG. The selection bit register 310 stores an initial value “1111” of the selection bit string.

図9に示すように最長一致選択回路300cは、同一位置ビット列F1(240)に対応するビット判定回路324a、同一位置ビット列F2(241)に対応するビット判定回路324b、及び同一位置ビット列F3(242)に対応するビット判定回路324cを含む。これらのビット判定回路は基本的には同じ構成を用いることもできる。 As shown in FIG. 9, the longest match selection circuit 300c includes a bit determination circuit 324a corresponding to the same position bit string F1 (240), a bit determination circuit 324b corresponding to the same position bit string F2 (241), and the same position bit string F3 (242). ) Corresponding to the bit determination circuit 324c. These bit determination circuits can basically use the same configuration.

データレジスタ群301に格納されたビット列データD1、D2、D3、D4の同一ビット位置のビットが取り出された同一位置ビット列F1、F2、F3は、それぞれ4ビットの並列バス344a、344b、344cにより、ビット判定回路324a、324b、324cに入力される。ビット判定回路324a、324b、324cにおいて、それぞれ図8に示すステップ1、2、3の処理が実行される。 The same-position bit strings F1, F2, and F3 from which the bits at the same bit position of the bit string data D1, D2, D3, and D4 stored in the data register group 301 are extracted are respectively obtained by 4-bit parallel buses 344a, 344b, and 344c. Input to the bit determination circuits 324a, 324b, 324c. In the bit determination circuits 324a, 324b, and 324c, the processes of steps 1, 2, and 3 shown in FIG. 8 are executed.

選択ビットレジスタ310に格納された選択ビット列は、4ビットの並列バス334aにより、ビット判定回路324aに入力される。また、判定履歴の有無を表す履歴ビットは、ビット判定回路324aが最上位のビット位置についての同一位置ビット列に対応するものであるので、初期値として有意でない履歴ビット、図10の例では“0”がシングルビットバス335aによりビット判定回路324aに入力される。ビット判定回路324aのビット判定結果出力314bは、4ビットの並列バス334bによりビット判定回路324bに入力される。また、ビット判定回路324aの判定履歴の有無を表す履歴ビットは、シングルビットバス335bによりビット判定回路324bに入力される。次に、ビット判定回路324bのビット判定結果出力314cは、4ビットの並列バス334cによりビット判定回路324cに入力される。また、ビット判定回路324bから出力される履歴ビットは、シングルビットバス335cによりビット判定回路324cに入力される。さらに、ビット判定回路324cのビット判定結果出力は、4ビットの並列バス334dにより選択結果レジスタ360に入力される。 The selected bit string stored in the selected bit register 310 is input to the bit determination circuit 324a through the 4-bit parallel bus 334a. Further, the history bit indicating the presence / absence of the determination history corresponds to the same position bit string for the most significant bit position by the bit determination circuit 324a. Therefore, the history bit is not significant as an initial value. In the example of FIG. "Is input to the bit determination circuit 324a by the single bit bus 335a. The bit determination result output 314b of the bit determination circuit 324a is input to the bit determination circuit 324b through a 4-bit parallel bus 334b. A history bit indicating the presence / absence of the determination history of the bit determination circuit 324a is input to the bit determination circuit 324b through the single bit bus 335b. Next, the bit determination result output 314c of the bit determination circuit 324b is input to the bit determination circuit 324c through the 4-bit parallel bus 334c. The history bit output from the bit determination circuit 324b is input to the bit determination circuit 324c through the single bit bus 335c. Further, the bit determination result output of the bit determination circuit 324c is input to the selection result register 360 through the 4-bit parallel bus 334d.

図9の例示では、選択結果レジスタ360には、図8に示す次選択ビット列217cが格納され、矢印352で示すように、ビットE2に対応するビット列データD2とビットE3に対応するビット列データD3が検索ビット列レジスタ370に格納された検索ビット列Sと最長一致することが分かる。 In the example of FIG. 9, the selection result register 360 stores the next selection bit string 217c shown in FIG. 8, and as shown by the arrow 352, the bit string data D2 corresponding to the bit E2 and the bit string data D3 corresponding to the bit E3 are stored. It can be seen that the search bit string S stored in the search bit string register 370 is the longest match.

図10は、本発明の第3の実施形態におけるビット判定回路の実施例を説明する図である。図10の(a)に示すのは、上記本発明の第3の実施形態のビット判定回路の実施例の回路構成である。図10の(b)に示すのは、本発明の第3の実施形態におけるビット判定回路の実施例の構成要素の入出力論理を説明するものである。 FIG. 10 is a diagram illustrating an example of the bit determination circuit according to the third embodiment of the present invention. FIG. 10A shows a circuit configuration of an example of the bit determination circuit according to the third embodiment of the present invention. FIG. 10B illustrates the input / output logic of the components of the example of the bit determination circuit in the third embodiment of the present invention.

図10の(a)に示すように、ビット判定回路324は、ビット比較器410、次選択ビット設定器420、全不一致判定器430、判定結果選択器440及びOR回路470を含んでいる。ビット判定回路324には、nビットの並列バス344により同一位置ビット列Fが入力され、またnビットの並列バス334により選択ビット列Eが入力され、さらにシングルビットバス345により検索ビットSが入力され、シングルビットバス335により履歴ビットMが入力される。 As shown in FIG. 10A, the bit determination circuit 324 includes a bit comparator 410, a next selection bit setting unit 420, an all mismatch determination unit 430, a determination result selection unit 440, and an OR circuit 470. The bit determination circuit 324 receives the same position bit string F through the n-bit parallel bus 344, receives the selection bit string E through the n-bit parallel bus 334, and further receives the search bit S through the single bit bus 345. The history bit M is input by the single bit bus 335.

図10の(a)に示すビット比較器410と次選択ビット設定器420は図7の(a)に記載したものと同一であり、したがって、それらの入出力論理も同一であるから、ビット比較器410と次選択ビット設定器420及び図7の(b)に示すPxとQxの論理式の説明は省略する。
図10の(a)に示す判定結果選択器440は、図7の(a)に記載したものと、セレクタ端子sに入力されるビットがスキップビットKではない点で異なり、入力と出力は同じである。すなわち、入力切り替えの論理が異なるだけである。
The bit comparator 410 and the next selection bit setter 420 shown in FIG. 10A are the same as those described in FIG. 7A, and therefore their input / output logic is also the same. The description of the logical expressions of Px and Qx shown in FIG.
The determination result selector 440 shown in FIG. 10A is different from that shown in FIG. 7A in that the bit input to the selector terminal s is not the skip bit K, and the input and output are the same. It is. That is, only the input switching logic is different.

全不一致判定器430は、判定ビット列Pと選択ビット列Eとのビット列演算を図10の(b)に示す論理式により実行し、全不一致ビットRを求める。全不一致ビットRは、ビットごとのPxとExの論理積の論理否定を全てのビットについて論理積を取ったものである。Rの値は、Exが“1”である全てのビットについてPxが“0”のときのみ“1”であり、Exが“1”でありPxが“1”のビットが少なくとも1つ存在する場合は“0”である。すなわち、対応する選択ビットが有意である同一位置ビット列のビットに対応する判定ビットが全て有意でないとき、言い換えれば上記同一位置ビット列のビットが全て対応する検索ビットと不一致であるときのみ、全不一致ビットRは“1”である。 The total mismatch determination unit 430 performs a bit string operation on the determination bit string P and the selected bit string E according to the logical expression shown in FIG. The total mismatch bit R is a logical negation of the logical product of Px and Ex for each bit and the logical product of all bits. The value of R is “1” only when Px is “0” for all bits where Ex is “1”, and there is at least one bit where Ex is “1” and Px is “1”. In this case, it is “0”. That is, when all the determination bits corresponding to the bits of the same position bit string in which the corresponding selected bits are significant are not significant, in other words, only when all the bits of the same position bit string do not match the corresponding search bits, R is “1”.

全不一致ビットRと履歴ビットMはOR回路470に入力される。全不一致ビットRと履歴ビットMの論理和であるOR回路470の出力Uは、シングルビットバス335−1によりビット判定回路324から履歴ビットとして出力されるとともに、ライン335−2を介して判定結果選択器440のセレクタ端子sに入力される。
判定結果選択器440は、OR回路470の出力Uが“0”であれば次選択ビット設定器420の出力であるビット列Qを出力ビット列Zとし、OR回路470の出力Uが“1”であれば選択ビット列Eを出力ビット列Zとする。この出力ビット列Zがビット判定回路324からnビットの並列バス331により次選択ビット列として出力される。
All mismatch bits R and history bit M are input to OR circuit 470. The output U of the OR circuit 470, which is the logical sum of all the mismatch bits R and the history bit M, is output as a history bit from the bit determination circuit 324 via the single bit bus 335-1 and also the determination result via the line 335-2. The signal is input to the selector terminal s of the selector 440.
If the output U of the OR circuit 470 is “0”, the determination result selector 440 sets the bit string Q that is the output of the next selection bit setting unit 420 as the output bit string Z, and the output U of the OR circuit 470 is “1”. For example, the selected bit string E is set as the output bit string Z. This output bit string Z is output from the bit determination circuit 324 as the next selected bit string through the n-bit parallel bus 331.

なお、ビット列データ群に属する全てのビット列データの最上位ビットが検索ビット列の最上位ビットと一致しないという例外的な入力が想定される場合には、図4の(a)に示すビット判定回路320を用いて、ビット列データの最上位ビットの一致判定を行い、その判定結果出力を選択ビット列として、選択ビットレジスタ310に替えて、4ビットの並列バス334aにより、ビット判定回路324aに入力するようにすればよい。 When an exceptional input that the most significant bit of all bit string data belonging to the bit string data group does not match the most significant bit of the search bit string is assumed, the bit determination circuit 320 shown in FIG. Is used to determine the coincidence of the most significant bit of the bit string data, and the determination result output is input to the bit determination circuit 324a through the 4-bit parallel bus 334a instead of the selection bit register 310 as the selected bit string. do it.

以上、本発明の実施の形態について詳細に説明したことから明らかなとおり、本発明によれば受動回路によりビット列データ群からビット列データを選択する回路を構成できるので、高速な動作が可能である。また、上述の説明に限らず本発明の実施の形態について種々の変形が可能なことは当業者に明らかである。
本発明の実施の形態には、詳細に説明をしたビット判定回路とビット列データ選択回路のほか、図2A、図5、図8に記載した処理ステップによるビット列データ選択方法を含む。これらのビット列データ選択方法をハードウェア回路で実行するものとして説明したが、これらのビット列データ選択方法をコンピュータ上のソフトウェアにより実現できることも当業者に明らかである。

As described above, the embodiments of the present invention have been described in detail, and according to the present invention, a circuit for selecting bit string data from a bit string data group can be configured by a passive circuit, so that high-speed operation is possible. Moreover, it will be apparent to those skilled in the art that various modifications can be made to the embodiment of the present invention in addition to the above description.
In addition to the bit determination circuit and bit string data selection circuit described in detail, the embodiment of the present invention includes a bit string data selection method according to the processing steps described in FIGS. 2A, 5, and 8. Although these bit string data selection methods have been described as being executed by a hardware circuit, it is obvious to those skilled in the art that these bit string data selection methods can be realized by software on a computer.

Claims (9)

ビット長がm(mは1以上の整数)であるN個(Nは2以上の整数)のビット列データの同一のビット位置i(i=0〜m−1)のビットを判定するビット判定回路において、
前記ビット列データそれぞれの同一のビット位置iから取り出したビットであり、それぞれ各ビット列データに対応するN個のビットからなる同一位置ビット列のビットそれぞれと、ビット長がmである検索ビット列のビット位置iの検索ビットとのビット比較を行い、前記同一位置ビット列のビットと前記検索ビットが一致するか否かを表す判定ビットからなる判定ビット列を出力するビット比較器と、
前記同一位置ビット列のそれぞれのビットをビット判定の対象として選択するか否かを表すビットであり、それぞれ各ビット列データに対応するN個の選択ビットからなる選択ビット列と、前記判定ビット列とのビット列演算を行い、各ビット列データそれぞれの前記同一のビット位置iの次のビット位置(i+1)から取り出したビットであってそれぞれ各ビット列データに対応するN個のビットからなる次同一位置ビット列のそれぞれのビットを、ビット判定の対象として選択するか否かを表すビットであり、それぞれ各ビット列データに対応するN個の次選択ビットからなる次選択ビット列を出力する次選択ビット設定器と、を備え、
前記次選択ビット設定器は、前記選択ビット列の選択ビットが前記同一位置ビット列のビットをビット判定の対象として選択することを表す有意のビットであれば該選択ビットと対応する前記判定ビットを前記次選択ビットとし、前記選択ビット列の選択ビットが前記有意のビットでなければ該選択ビットを前記次選択ビットとすること
を特徴とするビット判定回路。
Bit determination circuit for determining bits at the same bit position i (i = 0 to m−1) of N (N is an integer of 2 or more) bit string data having a bit length of m (m is an integer of 1 or more) In
Bits extracted from the same bit position i of each of the bit string data, each bit of the same position bit string consisting of N bits corresponding to each bit string data, and the bit position i of the search bit string whose bit length is m A bit comparator that outputs a determination bit string including a determination bit that indicates whether or not the bit in the same position bit string matches the search bit;
It is a bit indicating whether or not to select each bit of the same position bit string as an object of bit determination, and a bit string operation between a selection bit string composed of N selection bits corresponding to each bit string data and the determination bit string The bit extracted from the bit position (i + 1) next to the same bit position i of each bit string data, and each bit of the next same position bit string composed of N bits corresponding to each bit string data , And a next selection bit setter that outputs a next selection bit string composed of N next selection bits corresponding to each bit string data,
The next selected bit setter sets the determination bit corresponding to the selected bit if the selected bit of the selected bit string is a significant bit indicating that the bit of the same position bit string is selected as a bit determination target. A bit determination circuit, characterized in that the bit is a selection bit, and if the selection bit of the selection bit string is not a significant bit, the selection bit is the next selection bit.
それぞれのビット長がm(mは1以上の整数)であるN個(Nは2以上の整数)のビット列データからビット長がmである検索ビット列と一致するビット列データを選択するためのビット列データ選択回路において、
請求項1に記載されたビット判定回路を、同一のビット位置iのビットを判定するビット判定回路の出力である次選択ビット列を同一のビット位置(i+1)のビットを判定するビット判定回路の選択ビット列として入力するようにm段直列に接続し、
m段目のビット判定回路の出力である次選択ビット列を、前記検索ビット列と一致するビット列データを選択するための情報として出力すること
を特徴とするビット列データ選択回路。
Bit string data for selecting bit string data that matches a search bit string having a bit length of m from N (N is an integer of 2 or more) bit string data each having a bit length of m (m is an integer of 1 or more) In the selection circuit,
The bit determination circuit according to claim 1, wherein the next selection bit string output from the bit determination circuit for determining the bit at the same bit position i is selected as the bit determination circuit for determining the bit at the same bit position (i + 1). Connect m stages in series to input as a bit string,
A bit string data selection circuit for outputting a next selection bit string, which is an output of an m-th stage bit determination circuit, as information for selecting bit string data matching the search bit string.
請求項1に記載のビット判定回路において、
判定結果選択器をさらに備え、
前記判定結果選択器は、前記同一のビット位置iから取り出されたビットからなる同一位置ビット列のビットをビット判定の対象から除外するか否かを表すビットでありそれぞれ前記同一のビット位置iに対応するm個のスキップビットからなるスキップビット列のスキップビットが、前記対応する同一位置ビット列を構成するビットをビット判定の対象から除外することを示す有意のビットであれば、前記次選択ビット設定器が出力する前記次選択ビット列に替えて前記選択ビット列を次選択ビット列として出力し、前記スキップビットが有意のビットでなければ、前記次選択ビット設定器が出力する前記次選択ビット列を次選択ビット列として出力すること
を特徴とするビット判定回路。
The bit determination circuit according to claim 1,
A judgment result selector;
The determination result selector is a bit indicating whether or not to exclude a bit of the same position bit string made up of bits extracted from the same bit position i from the object of bit determination, and corresponds to the same bit position i. If the skip bit of the skip bit string composed of m skip bits is a significant bit indicating that the bit constituting the corresponding same-position bit string is excluded from the bit determination target, the next selection bit setter is The selected bit string is output as the next selected bit string instead of the next selected bit string to be output, and if the skip bit is not a significant bit, the next selected bit string output by the next selected bit setter is output as the next selected bit string A bit determination circuit characterized by:
それぞれのビット長がm(mは1以上の整数)であるN個(Nは2以上の整数)のビット列データからビット長がmである検索ビット列と部分一致するビット列データを選択するためのビット列データ選択回路において、
請求項3に記載されたビット判定回路を、同一のビット位置iのビットを判定するビット判定回路の出力である次選択ビット列を同一のビット位置(i+1)のビットを判定するビット判定回路の選択ビット列として入力するようにm段直列に接続し、
m段目のビット判定回路の出力である次選択ビット列を、前記検索ビット列と部分一致するビット列データを選択するための情報として出力すること
を特徴とするビット列データ選択回路。
Bit string for selecting bit string data partially matching a search bit string having a bit length of m from N (N is an integer of 2 or more) bit string data each having a bit length of m (m is an integer of 1 or more) In the data selection circuit,
The bit determination circuit according to claim 3, wherein the next selection bit string which is an output of the bit determination circuit for determining the bit at the same bit position i is selected by the bit determination circuit for determining the bit at the same bit position (i + 1). Connect m stages in series to input as a bit string,
A bit string data selection circuit for outputting a next selection bit string, which is an output of an m-th stage bit determination circuit, as information for selecting bit string data partially matching the search bit string.
請求項1に記載のビット判定回路において、
全不一致判定器と、判定結果選択器と、をさらに備え、
全不一致判定器は、前記選択ビット列の前記選択ビットにより選択された前記同一位置ビット列のビットが全て前記判定ビットの論理否定であるか判定して判定結果を全不一致ビットとして出力し、
判定結果選択器は、前記全不一致ビットが前記選択ビット列の前記選択ビットにより選択された前記同一位置ビット列のビットが対応する全ての検索ビットと一致しないことを表す有意のビットであるか、あるいは、前記ビット列データからビットを取り出した前記同一のビット位置iより上位のビット位置において該上位のビット位置の同一位置ビット列のビットが対応する全ての検索ビットと一致しなければ、前記次選択ビット設定器が出力する前記次選択ビット列に替えて前記選択ビット列を前記次選択ビット列として出力し、前記全不一致ビットが有意でなく、かつ、前記ビット列データからビットを取り出した前記同一のビット位置iより上位の全てのビット位置において該上位のビット位置の同一位置ビット列のビットが対応する全ての検索ビットと一致しなければ、前記次選択ビット設定器の出力である次選択ビット列を出力すること、
を特徴とするビット判定回路。
The bit determination circuit according to claim 1,
A total discriminator and a judgment result selector;
The all mismatch judgment unit judges whether all the bits of the same position bit string selected by the selection bit of the selected bit string are logical negation of the judgment bit, and outputs a judgment result as a whole mismatch bit,
The determination result selector is a significant bit indicating that the all unmatched bits do not match all the search bits corresponding to the bits of the same position bit string selected by the selected bits of the selected bit string, or If the bit in the same bit position at the upper bit position does not match all corresponding search bits at the bit position higher than the same bit position i from which the bit has been extracted from the bit string data, the next selection bit setter The selected bit string is output as the next selected bit string in place of the next selected bit string output from the above, and the all unmatched bits are not significant and are higher than the same bit position i from which the bit is extracted from the bit string data. In all the bit positions, the bit in the same position bit string in the upper bit position corresponds. If matches any search bit, to output the next selection bit string, which is the output of the next selected bit setter,
A bit determination circuit characterized by the above.
それぞれのビット長がm(mは1以上の整数)であるN個(Nは2以上の整数)のビット列データからビット長がmである検索ビット列と最長一致するビット列データを選択するためのビット列データ選択回路において、
請求項5に記載されたビット判定回路を、同一のビット位置iのビットを判定するビット判定回路の出力である次選択ビット列を同一のビット位置(i+1)のビットを判定するビット判定回路の選択ビット列として入力するようにm段直列に接続するとともに、前段のビット判定回路の出力する全不一致ビットを次段のビット判定回路に入力し、
m段目のビット判定回路の出力である次選択ビット列を、前記検索ビット列と最長一致するビット列データを選択するための情報として出力すること
を特徴とするビット列データ選択回路。
A bit string for selecting bit string data having the longest match with the search bit string having a bit length of m from N (N is an integer of 2 or more) bit string data each having a bit length of m (m is an integer of 1 or more). In the data selection circuit,
6. The bit determination circuit according to claim 5, wherein the next selection bit string which is an output of the bit determination circuit for determining the bit at the same bit position i is selected by the bit determination circuit for determining the bit at the same bit position (i + 1). M stages are connected in series so as to be input as a bit string, and all non-matching bits output from the previous stage bit determination circuit are input to the next stage bit determination circuit.
A bit string data selection circuit for outputting a next selection bit string, which is an output of an m-th stage bit determination circuit, as information for selecting bit string data having the longest match with the search bit string.
それぞれのビット長がm(mは1以上の整数)であるN個(Nは2以上の整数)のビット列データからビット長がmである検索ビット列と一致するビット列データを選択するためのビット列データ選択方法において、
前記ビット列データそれぞれの同一のビット位置i(i=0〜m−1)から取り出したビットであり、それぞれ各ビット列データに対応するN個のビットからなる同一位置ビット列のビットそれぞれと、ビット長がmである検索ビット列のビット位置iの検索ビットとのビット比較を行い、前記同一位置ビット列のビットと前記検索ビットが一致するか否かを表す判定ビットからなる判定ビット列を出力するビット比較サブステップと、
前記同一位置ビット列のそれぞれのビットをビット判定の対象として選択するか否かを表すビットであり、それぞれ各ビット列データに対応するN個の選択ビットからなる選択ビット列と前記判定ビット列とのビット列演算を行い、各ビット列データそれぞれの前記同一のビット位置iの次のビット位置(i+1)から取り出したビットであってそれぞれ各ビット列データに対応するN個のビットからなる次同一位置ビット列のそれぞれのビットを、ビット判定の対象として選択するか否かを表すビットであり、それぞれ各ビット列データに対応するN個の次選択ビットからなる次選択ビット列を出力するものであり、前記選択ビット列の選択ビットが前記同一位置ビット列のビットをビット判定の対象として選択することを表す有意のビットであれば該選択ビットと対応する前記判定ビットを前記次選択ビットとし、前記選択ビット列の選択ビットが前記有意のビットでなければ該選択ビットを前記次選択ビットとする次選択ビット設定サブステップと
を含むビット判定ステップを備え、
該ビット判定ステップを、同一のビット位置iのビットを判定するビット判定ステップの出力である次選択ビット列を同一のビット位置(i+1)のビットを判定するビット判定ステップの選択ビット列として入力してm回順次繰り返し、
同一のビット位置(m−1)のビットを判定するビット判定ステップで出力される次選択ビット列を、前記検索ビット列と一致するビット列データを選択するための情報として出力する
ことを特徴とするビット列データ選択方法。
Bit string data for selecting bit string data that matches a search bit string having a bit length of m from N (N is an integer of 2 or more) bit string data each having a bit length of m (m is an integer of 1 or more) In the selection method,
Bits extracted from the same bit position i (i = 0 to m−1) of each of the bit string data, each bit of the same position bit string composed of N bits corresponding to each bit string data, and the bit length a bit comparison sub-step for performing a bit comparison with a search bit at a bit position i of a search bit string of m and outputting a determination bit string including a determination bit indicating whether or not the bit in the same position bit string matches the search bit When,
It is a bit indicating whether or not each bit of the same position bit string is selected as a bit determination target, and a bit string operation is performed between the selected bit string including N selection bits corresponding to each bit string data and the determination bit string. The bit extracted from the next bit position (i + 1) of the same bit position i of each bit string data and each bit of the next same position bit string composed of N bits corresponding to each bit string data, respectively. , Which represents whether or not to select as a bit determination target, and outputs a next selection bit string composed of N next selection bits corresponding to each bit string data, and the selection bit of the selection bit string is the bit Significant bit indicating that the bit in the same position bit string is selected as a bit judgment target. If so, the determination bit corresponding to the selection bit is the next selection bit, and if the selection bit of the selection bit string is not the significant bit, the next selection bit setting substep in which the selection bit is the next selection bit; Including a bit determination step including
In this bit determination step, the next selected bit string, which is the output of the bit determination step for determining the bit at the same bit position i, is input as the selected bit string for the bit determination step for determining the bit at the same bit position (i + 1). Repeated sequentially,
Bit sequence data characterized in that the next selected bit sequence output in the bit determination step for determining the bit at the same bit position (m-1) is output as information for selecting bit sequence data that matches the search bit sequence Selection method.
それぞれのビット長がm(mは1以上の整数)であるN個(Nは2以上の整数)のビット列データからビット長がmである検索ビット列と部分一致するビット列データを選択するためのビット列データ選択方法において、
前記ビット列データそれぞれの同一のビット位置i(i=0〜m−1)から取り出したビットであり、それぞれ各ビット列データに対応するN個のビットからなる同一位置ビット列のビットそれぞれと、ビット長がmである検索ビット列のビット位置iの検索ビットとのビット比較を行い、前記同一位置ビット列のビットと前記検索ビットが一致するか否かを表す判定ビットからなる判定ビット列を出力するビット比較サブステップと、
前記同一位置ビット列のそれぞれのビットをビット判定の対象として選択するか否かを表すビットであり、それぞれ各ビット列データに対応するN個の選択ビットからなる選択ビット列と前記判定ビット列とのビット列演算を行い、各ビット列データそれぞれの前記同一のビット位置iの次のビット位置(i+1)から取り出したビットであってそれぞれ各ビット列データに対応するN個のビットからなる次同一位置ビット列のそれぞれのビットを、ビット判定の対象として選択するか否かを表すビットであり、それぞれ各ビット列データに対応するN個の次選択ビットからなる次選択ビット列を出力するものであり、前記選択ビット列の選択ビットが前記同一位置ビット列のビットをビット判定の対象として選択することを表す有意のビットであれば該選択ビットと対応する前記判定ビットを前記次選択ビットとし、前記選択ビット列の選択ビットが前記有意のビットでなければ該選択ビットを前記次選択ビットとする次選択ビット設定サブステップと、
前記同一のビット位置iから取り出されたビットからなる同一位置ビット列のビットをビット判定の対象から除外するか否かを表すビットでありそれぞれ前記同一のビット位置iに対応するm個のスキップビットからなるスキップビット列のスキップビットが、前記対応する同一位置ビット列を構成するビットをビット判定の対象から除外することを示す有意のビットであれば、前記次選択ビット設定サブステップにおいて出力される前記次選択ビット列に替えて前記選択ビット列を次選択ビット列として出力し、前記スキップビットが有意のビットでなければ、前記次選択ビット設定サブステップにおいて出力される前記次選択ビット列を次選択ビット列として出力する判定結果選択サブステップと
を含み、前記判定結果選択サブステップにおいて出力された次選択ビット列を出力するビット判定ステップを備え、
該ビット判定ステップを、同一のビット位置iのビットを判定するビット判定ステップの出力である次選択ビット列を同一のビット位置(i+1)のビットを判定するビット判定ステップの選択ビット列として入力してm回順次繰り返し、
同一のビット位置(m−1)のビットを判定するビット判定ステップで出力される次選択ビット列を、前記検索ビット列と部分一致するビット列データを選択するための情報として出力する
ことを特徴とするビット列データ選択方法。
Bit string for selecting bit string data partially matching a search bit string having a bit length of m from N (N is an integer of 2 or more) bit string data each having a bit length of m (m is an integer of 1 or more) In the data selection method,
Bits extracted from the same bit position i (i = 0 to m−1) of each of the bit string data, each bit of the same position bit string composed of N bits corresponding to each bit string data, and the bit length a bit comparison sub-step for performing a bit comparison with a search bit at a bit position i of a search bit string of m and outputting a determination bit string including a determination bit indicating whether or not the bit in the same position bit string matches the search bit When,
It is a bit indicating whether or not each bit of the same position bit string is selected as a bit determination target, and a bit string operation is performed between the selected bit string including N selection bits corresponding to each bit string data and the determination bit string. The bit extracted from the next bit position (i + 1) of the same bit position i of each bit string data and each bit of the next same position bit string composed of N bits corresponding to each bit string data, respectively. , Which represents whether or not to select as a bit determination target, and outputs a next selection bit string composed of N next selection bits corresponding to each bit string data, and the selection bit of the selection bit string is the bit Significant bit indicating that the bit in the same position bit string is selected as a bit judgment target. If so, the determination bit corresponding to the selection bit is the next selection bit, and if the selection bit of the selection bit string is not the significant bit, the next selection bit setting substep in which the selection bit is the next selection bit; ,
It is a bit indicating whether or not bits in the same position bit string composed of bits taken out from the same bit position i are excluded from the bit determination targets, and each of m skip bits corresponding to the same bit position i. If the skip bit in the skip bit string is a significant bit indicating that the bits constituting the corresponding same-position bit string are excluded from the bit determination target, the next selection output in the next selection bit setting sub-step Determination result of outputting the selected bit string as a next selected bit string in place of the bit string and outputting the next selected bit string output in the next selected bit setting substep if the skip bit is not a significant bit Including a selection substep, and the determination result selection substep Comprising a bit determination step of outputting a next selection bit string Oite output,
In this bit determination step, the next selected bit string, which is the output of the bit determination step for determining the bit at the same bit position i, is input as the selected bit string for the bit determination step for determining the bit at the same bit position (i + 1). Repeated sequentially,
A bit string characterized in that the next selected bit string output in the bit determining step for determining the bit at the same bit position (m-1) is output as information for selecting bit string data partially matching the search bit string Data selection method.
それぞれのビット長がm(mは1以上の整数)であるN個(Nは2以上の整数)のビット列データからビット長がmである検索ビット列と最長一致するビット列データを選択するためのビット列データ選択方法において、
前記ビット列データそれぞれの同一のビット位置i(i=0〜m−1)から取り出したビットであり、それぞれ各ビット列データに対応するN個のビットからなる同一位置ビット列のビットそれぞれと、ビット長がmである検索ビット列のビット位置iの検索ビットとのビット比較を行い、前記同一位置ビット列のビットと前記検索ビットが一致するか否かを表す判定ビットからなる判定ビット列を出力するビット比較サブステップと、
前記同一位置ビット列のそれぞれのビットをビット判定の対象として選択するか否かを表すビットであり、それぞれ各ビット列データに対応するN個の選択ビットからなる選択ビット列と前記判定ビット列とのビット列演算を行い、各ビット列データそれぞれの前記同一のビット位置iの次のビット位置(i+1)から取り出したビットであってそれぞれ各ビット列データに対応するN個のビットからなる次同一位置ビット列のそれぞれのビットを、ビット判定の対象として選択するか否かを表すビットであり、それぞれ各ビット列データに対応するN個の次選択ビットからなる次選択ビット列を出力するものであり、前記選択ビット列の選択ビットが前記同一位置ビット列のビットをビット判定の対象として選択することを表す有意のビットであれば該選択ビットと対応する前記判定ビットを前記次選択ビットとし、前記選択ビット列の選択ビットが前記有意のビットでなければ該選択ビットを前記次選択ビットとする次選択ビット設定サブステップと、
前記選択ビット列の前記選択ビットにより選択された前記同一位置ビット列のビットが対応する全ての検索ビットと一致しないか判定し、全不一致ビットを出力する全不一致判定サブステップと、
前記全不一致ビットが、前記選択ビット列の前記選択ビットにより選択された前記同一位置ビット列のビットが対応する全ての検索ビットと一致しないことを表す有意のビットであるか、あるいは、前記ビット列データからビットを取り出した前記同一のビット位置iより上位のビット位置において該上位のビット位置の同一位置ビット列のビットが対応する全ての検索ビットと一致しないものであれば、前記次選択ビット設定サブステップにおいて出力される前記次選択ビット列に替えて前記選択ビット列を前記次選択ビット列として出力し、前記全不一致ビットが有意でなく、かつ、前記ビット列データからビットを取り出した前記同一のビット位置iより上位の全てのビット位置において該上位のビット位置の同一位置ビット列のビットが対応する全ての検索ビットと一致しないものでなければ、前記次選択ビット設定サブステップにおいて出力された次選択ビット列を出力する判定結果選択サブステップと
を含み、前記判定結果選択サブステップにおいて出力された次選択ビット列を出力するとともに前記全不一致ビットを出力するビット判定ステップを備え、
該ビット判定ステップを、同一のビット位置iのビットを判定するビット判定ステップの出力である次選択ビット列を同一のビット位置(i+1)のビットを判定するビット判定ステップの選択ビット列として入力してm回順次繰り返し、
同一のビット位置(m−1)のビットを判定するビット判定ステップで出力される次選択ビット列を、前記検索ビット列と最長一致するビット列データを選択するための情報として出力する
ことを特徴とするビット列データ選択方法。
A bit string for selecting bit string data having the longest match with the search bit string having a bit length of m from N (N is an integer of 2 or more) bit string data each having a bit length of m (m is an integer of 1 or more). In the data selection method,
Bits extracted from the same bit position i (i = 0 to m−1) of each of the bit string data, each bit of the same position bit string composed of N bits corresponding to each bit string data, and the bit length a bit comparison sub-step for performing a bit comparison with a search bit at a bit position i of a search bit string of m and outputting a determination bit string including a determination bit indicating whether or not the bit in the same position bit string matches the search bit When,
It is a bit indicating whether or not each bit of the same position bit string is selected as a bit determination target, and a bit string operation is performed between the selected bit string including N selection bits corresponding to each bit string data and the determination bit string. The bit extracted from the next bit position (i + 1) of the same bit position i of each bit string data and each bit of the next same position bit string composed of N bits corresponding to each bit string data, respectively. , Which represents whether or not to select as a bit determination target, and outputs a next selection bit string composed of N next selection bits corresponding to each bit string data, and the selection bit of the selection bit string is the bit Significant bit indicating that the bit in the same position bit string is selected as a bit judgment target. If so, the determination bit corresponding to the selection bit is the next selection bit, and if the selection bit of the selection bit string is not the significant bit, the next selection bit setting substep in which the selection bit is the next selection bit; ,
Determining whether the bits of the same-position bit string selected by the selected bits of the selected bit string do not match all the corresponding search bits, and outputting all mismatch bits;
The all unmatched bits are significant bits indicating that the bits of the same position bit string selected by the selected bits of the selected bit string do not match all corresponding search bits, or bits from the bit string data If the bits in the same bit sequence at the higher bit position do not match all the corresponding search bits at the bit position higher than the same bit position i from which the data is taken out, output in the next selected bit setting sub-step The selected bit string is output as the next selected bit string in place of the next selected bit string, and all the bits that are not significant and are higher than the same bit position i from which the bit is extracted from the bit string data Bit position of the same position bit string of the upper bit position. Is not in agreement with all the corresponding search bits, includes a determination result selection substep for outputting the next selection bit string output in the next selection bit setting substep, and is output in the determination result selection substep. A bit determination step of outputting the next selected bit string and outputting all the non-matching bits,
In this bit determination step, the next selected bit string, which is the output of the bit determination step for determining the bit at the same bit position i, is input as the selected bit string for the bit determination step for determining the bit at the same bit position (i + 1). Repeated sequentially,
A bit string characterized in that the next selected bit string output in the bit determining step for determining the bit at the same bit position (m-1) is output as information for selecting bit string data having the longest match with the search bit string. Data selection method.
JP2013557304A 2012-12-26 2012-12-26 Bit determination circuit, bit string data selection circuit, and bit string data selection method Pending JPWO2014102924A1 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/083603 WO2014102924A1 (en) 2012-12-26 2012-12-26 Bit assessment circuit, bit sequence data selection circuit and bit sequence data selection method

Publications (1)

Publication Number Publication Date
JPWO2014102924A1 true JPWO2014102924A1 (en) 2017-01-12

Family

ID=51020083

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013557304A Pending JPWO2014102924A1 (en) 2012-12-26 2012-12-26 Bit determination circuit, bit string data selection circuit, and bit string data selection method

Country Status (2)

Country Link
JP (1) JPWO2014102924A1 (en)
WO (1) WO2014102924A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11149476A (en) * 1997-11-14 1999-06-02 Nec Corp System and method for extracting similar data
JPH11261647A (en) * 1998-03-12 1999-09-24 Nec Corp Router and longest matching retrieval device
JPH11284658A (en) * 1998-03-30 1999-10-15 Kawasaki Steel Corp Longest coincident retrieval device
JP2002207771A (en) * 2000-10-04 2002-07-26 Lsi Logic Corp Fast and flexible search engine for longest prefix match

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11149476A (en) * 1997-11-14 1999-06-02 Nec Corp System and method for extracting similar data
JPH11261647A (en) * 1998-03-12 1999-09-24 Nec Corp Router and longest matching retrieval device
JPH11284658A (en) * 1998-03-30 1999-10-15 Kawasaki Steel Corp Longest coincident retrieval device
JP2002207771A (en) * 2000-10-04 2002-07-26 Lsi Logic Corp Fast and flexible search engine for longest prefix match

Also Published As

Publication number Publication date
WO2014102924A1 (en) 2014-07-03

Similar Documents

Publication Publication Date Title
Luo et al. SOAP3-dp: fast, accurate and sensitive GPU-based short read aligner
JPH08255176A (en) Method and system for comparison of table of database
Lucchese et al. Exploiting CPU SIMD extensions to speed-up document scoring with tree ensembles
JP2003044267A (en) Data sorting method, data sorting device and data sorting program
CN103473171A (en) Coverage rate dynamic tracking method and device based on function call paths
NL2011817C2 (en) A method of generating a reference index data structure and method for finding a position of a data pattern in a reference data structure.
Zentgraf et al. Fast lightweight accurate xenograft sorting
JP5254742B2 (en) Character string matching method, apparatus configured to execute character string matching method, and computer program
WO2014102924A1 (en) Bit assessment circuit, bit sequence data selection circuit and bit sequence data selection method
CN112506789B (en) Parallel pattern matching method for data packet detection
CN101158980A (en) Multiple modes search method and system
CN114153496A (en) Block chain-based high-speed parallelizable code similarity comparison method and system
JP6613019B2 (en) Device for searching for patterns
US11048844B1 (en) System and method for use in design verification
US11144712B2 (en) Dictionary creation apparatus, dictionary creation method, and non-transitory computer-readable storage medium for storing dictionary creation program
CN102841988B (en) A kind of system and method that nucleic acid sequence information is mated
JP2006259820A (en) Failure detection improving device, failure detection improving program, and failure detection improving method
US20130254201A1 (en) Data structure, data structure generation method, information processing apparatus, information processing system, and computer-readable storage medium having stored therein information processing program
TWI631509B (en) Methods for accelerating compression and apparatuses using the same
CN113705813A (en) Mutation rule supplementing method and device based on genetic algorithm
Pollitt et al. Efficient proof checking with lrat in cadical (work in progress)
US20210382686A1 (en) Apparatus and method for performing bit permutation operations
JP2000020318A (en) Device for reducing memory access instruction and storage medium
JPH08221254A (en) Method and device for merging sort
CN117373538B (en) Biological sequence comparison method and system based on multithread calculation

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20151124