JP3894135B2 - Information processing device - Google Patents

Information processing device Download PDF

Info

Publication number
JP3894135B2
JP3894135B2 JP2003045031A JP2003045031A JP3894135B2 JP 3894135 B2 JP3894135 B2 JP 3894135B2 JP 2003045031 A JP2003045031 A JP 2003045031A JP 2003045031 A JP2003045031 A JP 2003045031A JP 3894135 B2 JP3894135 B2 JP 3894135B2
Authority
JP
Japan
Prior art keywords
basic condition
layer basic
circuit
result
arithmetic processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003045031A
Other languages
Japanese (ja)
Other versions
JP2004252899A (en
Inventor
英明 岩木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2003045031A priority Critical patent/JP3894135B2/en
Publication of JP2004252899A publication Critical patent/JP2004252899A/en
Application granted granted Critical
Publication of JP3894135B2 publication Critical patent/JP3894135B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、プログラム方式のプロセッサを含む情報処理装置に係わり、特に論理条件式を並列的に計算処理するためのN層基本条件判断器が、そのプロセッサの補助ハードウェアとして設けられてなる情報処理装置に関する。
【0002】
【従来の技術】
プログラム方式のプロセッサでは、論理条件式が多項になると、その計算のためのコスト(実行スピードやinstruction メモリサイズ)は大変重くなる。これは、プログラム方式のプロセッサが、基本的には直列的にしか論理条件式を判断し得ないからである。更に、論理条件式が真の状態となるものを複数の候補から選び出すとなると、一層、その計算コストが大きくなり、実用的でなくなる場合が殆どである。
【0003】
より具体的に説明すれば、プログラム方式のプロセッサで複数ある候補から多項条件式を用いて一致するものを見つけ出すには、以下のようなプログラム(C言語で記述)で行う場合が多い(但し、この例では、説明の簡単化上、2項の条件式を想定)。
【0004】

Figure 0003894135
【0005】
但し、
data_0,dtat_1 :候補の中から条件が一致するものを見付け出すための入力データ
candidate[]:候補のデータを保持する配列
mask[]:入力データと候補との条件式のなかで対象とするbit を表すマスクデータ
candidate _max :候補の数
である。
【0006】
即ち、上記プログラムでは、候補データが順次、更新されている状態で、入力データdata_0 における非マスク部分とは一致し、且つ入力データdata_1 における非マスク部分とは不一致である候補が検索されるようになっており、入力データと候補が条件式により一致した場合、変数i に候補の番号が代入されていることになる。
ところで、そのプログラムのループ部分で、最低、どの程度のinstruction 数が必要になるかを、RISC(reduced instruction set computer:縮小命令セットコンピュータ)上で考えてみれば、以下のようである。
【0007】
1: i < candidate _max の条件判断
2: 計算結果によりループを抜け出すための条件分岐
3: mask_0[i]のレジスタへのロード
4: data_0[i]のレジスタへのロード
5: data_0 & mask_0[i]の計算、レジスタへの代入
6: candidate _0[i] & mask _0[i]の計算、レジスタへ代入
7: 5:の結果と6:の結果の一致比較
8: 7:の計算結果によりloop end(16:) への条件ジャンプ
9: mask_1[i]のレジスタへのロード
10: data_1[i]のレジスタへのロード
11: data_1 & mask_1[i]の計算、レジスタへの代入
12: candidate _1[i] & mask _1[i]の計算、レジスタへ代入
13: 11: の結果と12: の結果の不一致比較
14: 7:の計算結果によりresult = iを実施
15: i++;
16: 1:に戻る
【0008】
以上のように、ループを一周するのに、16instruction が必要になる。したがって、候補が検索される上で、条件との一致の有無が判断されるのに、最大、16×candidate _max instruction数分の時間が必要になる。
【0009】
因みに、特許文献1には、処理要素のSIMD(単一命令複数データ)アレイを備え、その処理要素が複数の処理ブロックに差動可能に分割され、その処理ブロックがデータ項目のそれぞれのグループを処理するように作動可能とされた並列データ処理装置が記載されている。
【0010】
【特許文献1】
特表2002―541586号公報
【0011】
【発明が解決しようとする課題】
以上のように、プログラム方式のプロセッサで複数ある候補から多項条件式を用いて一致するものを見つけ出すにしても、基本となる条件式の項数(上記例では、2項)が増えると、1 回のループinstruction が16よりも更に増え、もはや、プログラム上での実施は、実行速度上、非現実的になることは否めない(仮に、項数が16であるとすれば、100×candidate _max instruction が必要になる) 。
【0012】
本発明の目的は、プログラム方式のプロセッサに論理条件式の真偽を計算させるのではなく、そのプロセッサの補助として、特別に用意されたハードウェア上で多項の論理条件式を並列的に計算処理させることで、計算速度の向上やプログラムメモリ領域の削減、プロセッサの負荷軽減が可能とされた情報処理装置を提供することにある。
【0013】
【課題を解決するための手段】
本発明の情報処理装置は、項数が最大、2N-1 (N:1以上の任意整数)からなる論理条件式を並列的に計算するためのN層基本条件判断器が、プロセッサの補助ハードウェアとして設けられるようにしたものである。
【0014】
そのプロセッサの補助として、特別に用意されたハードウェア、即ち、N層基本条件判断器上で多項の論理条件式が並列的に計算処理される場合には、計算処理速度の向上やプログラムメモリ領域の削減、プロセッサの負荷軽減が同時に可能とされているものである。
【0015】
【発明の実施の形態】
以下、本発明の一実施の形態について、図1から図6により説明する。
先ず本発明の情報処理装置上でのN層基本条件判断器の位置付けについて説明する。そのN層基本条件判断器は、プロセッサの補助ハードウェアとして、一般に、そのプロセッサの内部、または外部に設けられるが、最も容易に考えられるその位置付けを図1に示す。
【0016】
図示のように、本例では、プロセッサ11外部に設けられる場合が想定されており、プロセッサ11に対しては、そのプロセッサ・バス12を介し各種の入出力(I/O)装置13,14や記憶装置15等が収容されているが、これらと同様にして、N層基本条件判断器が補助ハードウェア16として収容されるようになっている。多項の論理条件式を並列的に計算処理する必要がある場合には、例えば、プロセッサ11から補助ハードウェア16をアクセスすることで、計算処理に必要な各種データ等が補助ハードウェア16内に設定された上で、その補助ハードウェア16が起動されるようにし、その補助ハードウェア16での最終計算処理結果等はまた、プロセッサ・バス12を介してプロセッサ11に取り込まれるようになっている。
【0017】
さて、項数が最大、2N-1 からなる論理条件式を並列的に計算処理するためのN層基本条件判断器には、項対応の1層基本条件判断器が含まれているが、図2にその1層基本条件判断器の一例での構成を示す。その構成と動作について説明すれば、以下のようである。
【0018】
即ち、図示のように、同一ビット数構成の入力データ、マスクデータおよび候補データが1層基本条件判断器21内に入力された上、入力データとマスクデータはAND(論理積)回路211で、また、マスクデータと候補データはAND回路212で、それぞれ対応ビット間で論理積されるようになっている。これら対応ビット間での論理積により、入力データ、候補データ各々における構成ビットのうち、計算処理上、不要なビット部分、あるいは無視されるべきビット部分がマスクデータにより強制的に“0”状態におかれるようになっている。次に、AND回路211,212各々からの論理積結果213,214は複数のアキュムレータ215〜220に入力された上、それぞれで所定の演算処理が行われているが、その演算処理の結果は1ビット演算処理結果221〜226として出力されるようになっている。
【0019】
因みに、アキュムレータ213〜218それぞれでの演算処理について説明すれば、以下のようである。
アキュムレータ215:論理積結果213,214の対応ビット間排他的論理和結果が全て“0”、または論理積結果213,214間での減算結果がゼロであって、論理積結果213,214が等しい場合に、1ビット演算処理結果221として“1”を出力。
アキュムレータ216:論理積結果213,214の対応ビット間排他的論理和結果が全てが“0”ではない場合、または論理積結果213,214間での減算結果がゼロではない場合、即ち、論理積結果213,214が等しくない場合に、1ビット演算処理結果222として“1”を出力。
アキュムレータ217:論理積結果213,214間での減算結果として、論理積結果213が論理積結果214よりも大きい場合に、1ビット演算処理結果223として“1”を出力。
【0020】
アキュムレータ218:論理積結果213,214間での減算結果として、論理積結果213が論理積結果214よりも小さい場合に、1ビット演算処理結果224として“1”を出力。
アキュムレータ219:論理積結果213,214間での減算結果として、論理積結果213が論理積結果214よりも大きいか、または論理積結果214と等しい場合に、1ビット演算処理結果225として“1”を出力。
アキュムレータ220:論理積結果213,214間での減算結果として、論理積結果213が論理積結果214よりも小さいか、または論理積結果214と等しい場合に、1ビット演算処理結果226として“1”を出力。
【0021】
以上のように、アキュムレータ215〜220それぞれからは1ビット演算処理結果221〜226が出力された上、セレクタ227に入力されているが、これら1ビット演算処理結果221〜226のうち、何れがセレクタ(選択回路)227から基本条件判断器出力(1層結果)228として選択出力されるかは、外部からの演算処理結果選択信号229によるものとなっている。
【0022】
図3はまた、以上の1層基本条件判断器21を2層にしたもの、即ち、2層基本条件判断器の一例での構成を示したものである。その構成と動作について説明すれば、2層基本条件判断器31内における1層基本条件判断器21−1,21−2それぞれには、外部からそれぞれに対応する入力/マスク/候補データが入力されている他、外部からの演算処理結果選択信号229−1,229−2が入力されており、図2に示すものと同様にして、1層基本条件判断器出力(1層結果−1,1層結果−2)228−1,228−2が外部に出力されている。一方、それら1層基本条件判断器出力228−1,228−2はまた、AND回路311、ОR(論理和)回路312にそれぞれ入力された上、論理積、論理和されることで、論理積結果313、論理和結果314が得られている。これら論理積結果313、論理和結果314のうち、何れがセレクタ315から2層基本条件判断器出力(2層結果)316として選択出力されるかは、外部からの演算処理結果選択信号317によっている。
【0023】
更に、以上の2層基本条件判断器31を2層にしたもの、即ち、3層基本条件判断器の一例での構成を図4に示す。その構成と動作について説明すれば、3層基本条件判断器41内における2層基本条件判断器31−1,31−2それぞれには、外部からそれぞれに対応する入力/マスク/候補データが入力されている他、外部から3つの演算処理結果選択信号(図示省略)が入力されており、図3に示すものと同様にして、1層結果を含む2層基本条件判断器出力(2層結果−1,2層結果−2)316−11,316−21が外部に出力されている。一方、2層基本条件判断器出力316−1,316−2自体は、AND回路411、ОR回路412にそれぞれ入力された上、論理積、論理和されることで、論理積結果413、論理和結果414が得られている。これら論理積結果413、論理和結果414のうち、何れがセレクタ415から3層基本条件判断器出力(3層結果)416として選択出力されるかは、外部からの演算処理結果選択信号417によっている。
【0024】
したがって、以上の2層基本条件判断器31や3層基本条件判断器41から、Nの値が2以上とされるN層基本条件判断器の一般的な構成が容易に推定されるが、そのN層基本条件判断器の構成を図5に示す。その構成と動作について説明すれば、N層基本条件判断器51内における(N−1)層基本条件判断器511,512それぞれには、外部からそれぞれに対応する入力/マスク/候補データが入力されている他、外部から複数の演算処理結果選択信号(図示省略)が入力されており、1層〜(N−2)層の結果を含む(N−1)層基本条件判断器出力((N−1)層結果−1,(N−1)層結果−2)515,516が外部に出力されている。一方、(N−1)層基本条件判断器出力513,514自体は、AND回路517、ОR回路518にそれぞれ入力された上、論理積、論理和されることで、論理積結果519、論理和結果520が得られている。これら論理積結果519、論理和結果520のうち、何れがセレクタ521からN層基本条件判断器出力(N層結果)522として選択出力されるかは、外部からの演算処理結果選択信号523に依存している。
【0025】
以上の図5においては、(N−1)層基本条件判断器からN層基本条件判断器が如何に構成されるか、その一例が示されており、2つの(N−1)層基本条件判断器出力が取り纏められた上、N層基本条件判断器出力(N層結果)が作成されるようになっている。その際、N層基本条件判断器出力のみならず、1層〜(N−1)層の結果も併せて出力される場合は、条件式の一部の結果を得ることも可能となっている。
【0026】
ここで、N層の論理条件式と(N+1)層の論理条件式との関係について説明すれば、以下のようである。
即ち、N層の論理条件式をf0(n) ,f1(n) (但し、f0とf1は、演算種類や入力/マスク/候補データは一般に異なる)とすると、(N+1)層の論理条件式は、f(N+1)=f0 (n)&&f1 (n)、またはf0 (n)||f1 (n)となる。因みに、式中での&&は論理積演算であることを、また、||は論理和演算であることを示す。
但し、N=1の場合は、図2に示す1 層基本条件判断器21でのみ演算処理が行われるが、結果的に、如何なる演算処理が行われるかは、外部からの演算処理結果選択信号229により指定されることになる。
【0027】
以上、N層基本条件判断器の本体そのものについて説明したが、実際には、その周辺に各種設定回路等が設けられることで、初めてその機能が発揮されるようになっている。それら各種設定回路等を含むN層基本条件判断器の概要構成を図6に示す。図示のように、記憶回路61には、候補データとそれに対するマスクデータが複数、インデックスをアドレスとして予め記憶されているが、何れのインデックスの候補データとそれに対するマスクデータが記憶回路61から読み出された上、N層基本条件判断器51に設定されるかは、記憶回路61への読出しインデックスアドレスによっている。インクリメンタ(+1加算器)62とレジスタ63は、所謂、カウンタを構成しているが、そのカウンタでのカウント値が0から順次、インクリメントされることで、そのカウント値が読出しインデックスアドレスとして更新されつつ、記憶回路61に与えられることで、インデックス順に、候補データとそれに対するマスクデータがN層基本条件判断器51に設定されるようになっている。
【0028】
一方、レジスタ64には、入力データが2N-1 個分、予め記憶されることで、N層基本条件判断器51に対し入力データが所定に設定されており、また、レジスタ65には、Nの値によって定まる所定数の演算処理結果選択信号が予め記憶されることで、N層基本条件判断器51に対し、演算処理結果選択信号が所定に設定されるようになっている。結局、N層基本条件判断器51に対し、以上の各種設定が行われることで、N層基本条件判断器51からは、目的とするN層結果を始めとして、1層結果から(N−1)層結果が併せて得られた上、層結果保持器66〜69に対するWrite Enable信号となる。そして層結果保持器66〜69は、そのWrite Enable信号に従いレジスタ63の値を保持する。このようにして保持された各種層結果は、プロセッサに取込みされることで、計算処理速度の向上が図られているものである。
【0029】
ここで、本発明による効果の程を考察する。条件式として、従来の技術で述べたものに例に採れば、この例では、N=2となり、図3に示す2層基本条件判断器が適用されることになる。ここで、candidate _max を128とすれば、本発明によらない場合、実行に必要とされるinstruction 数は2048(=16×candidate _max (=128))となる。
【0030】
しかしながら、それを本発明により行う場合、1 層基本条件判断器21−1では、演算処理結果として"=="のものが選択され、また、1 層基本条件判断器21−2では、演算処理結果として"!="のものが選択され、更に、セレクタ315では、論理積(AND)結果が選択されることになる。ここで、CPUのclock と同じclock で2層基本条件判断器が動作するとすれば、結果を得るまでに必要とされるclock 数は、128(=candidate _max )となる。一般に、instruction 数とclock 数とは、実際に、1対1として対応することは少なく、clock 数が多くなる場合が殆どである。このことを考慮しても、本発明による場合、結果を得るまでに要されるサイクル数は大幅に減少していることが判る。
【0031】
また、本発明による場合、プロセッサの命令としては、以下のような内容となる。
1:index のcounter の値を得る
2:counter < candidate _max なら1 に戻る条件分岐命令
3:結果をレジスタに読み出す
このように、3命令になり、命令を保持するメモリサイズが削減されることになる。
【0032】
最後に、本発明の応用例として、例えば、以下のようなプログラムを考える。
【0033】
Figure 0003894135
Figure 0003894135
【0034】
この場合、2層基本条件判断器を使用するが、1 層結果―1 はresult_0 に、また、1 層結果―2 はresult_1 に、更に、2 層結果はresult_total に対応する。たとえ、このように、プログラム上は複雑なものであっても、必要とされるサイクル数はcandidate _max.となり、完全プログラムで実行するよりも、サイクル数を少なくして実行し得ることになる。
【0035】
以上、本発明者によってなされた発明を実施の形態に基づき、具体的に説明したが、本発明は上記実施の形態に限定されるものではなく、その要旨を逸脱しない範囲内で種々変更可能であることはいうまでもない。
【0036】
【発明の効果】
プログラム方式のプロセッサの補助として、特別に用意されたハードウェア上で多項の論理条件式が並列的に計算処理されることによって、計算速度の向上やプログラムメモリ領域の削減、プロセッサの負荷軽減が可能とされた情報処理装置が提供される。
【図面の簡単な説明】
【図1】本発明の一例での情報処理装置の構成を示す図である。
【図2】1層基本条件判断器の一例での構成を示す図である。
【図3】2層基本条件判断器の一例での構成を示す図である。
【図4】3層基本条件判断器の一例での構成を示す図である。
【図5】N層基本条件判断器の一例での構成を示す図である。
【図6】各種設定回路等を含むN層基本条件判断器の概要構成を示す図である。
【符号の説明】
11…プロセッサ、16…補助ハードウェア、211,212,311,411,517…AND(論理積)回路、215〜220…アキュムレータ、227,315,415,521…セレクタ(選択回路)、312,412,518…ОR(論理和)回路、51…N層基本条件判断器、61…記憶回路、62…インクリメンタ(+1加算回路)、63〜65…レジスタ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an information processing apparatus including a program-type processor, and in particular, an information processing in which an N-layer basic condition determiner for calculating and processing logical conditional expressions in parallel is provided as auxiliary hardware for the processor. Relates to the device.
[0002]
[Prior art]
In a program-type processor, when the logical condition formula becomes multinomial, the cost for the calculation (execution speed and instruction memory size) becomes very heavy. This is because a program-type processor can basically determine a logical conditional expression only serially. Furthermore, if a logical conditional expression that is in a true state is selected from a plurality of candidates, the calculation cost is further increased and it is almost impractical.
[0003]
More specifically, in order to find a match using a polynomial conditional expression from a plurality of candidates in a program-based processor, the following program (described in C language) is often used (however, In this example, for simplicity of explanation, a conditional expression of two terms is assumed).
[0004]
Figure 0003894135
[0005]
However,
data_0, dtat_1: Input data to find a candidate that matches the condition from candidates
candidate []: Array that holds candidate data
mask []: Mask data that represents the target bit in the conditional expression of input data and candidates
candidate_max: The number of candidates.
[0006]
That is, in the above program, the candidate data is sequentially updated so that candidates that match the non-masked portion of the input data data_0 and that do not match the non-masked portion of the input data data_1 are searched. If the input data matches the candidate by the conditional expression, the candidate number is assigned to the variable i.
By the way, considering the minimum number of instructions required in the loop portion of the program on the RISC (reduced instruction set computer), it is as follows.
[0007]
1: i <candidate _max condition judgment
2: Conditional branch to exit the loop depending on the calculation result
3: Load mask_0 [i] into register
4: Load data_0 [i] into register
5: Calculate data_0 & mask_0 [i], assign to register
6: candidate _0 [i] & mask _0 [i] calculation, register assignment
7: Comparison of 5: results and 6: results
8: Conditional jump to loop end (16 :) based on 7: calculation result
9: Load mask_1 [i] into register
10: Load data_1 [i] into register
11: Calculate data_1 & mask_1 [i], assign to register
12: candidate _1 [i] & mask _1 [i] calculation, register substitution
Discrepancy comparison between 13:11: result and 12: result
14: Implement result = i based on the calculation result of 7:
15: i ++;
Return to 16: 1: [0008]
As described above, 16 instructions are required to go around the loop. Therefore, a maximum of 16 × candidate_max instructions is required to determine whether or not there is a match with a condition when searching for candidates.
[0009]
Incidentally, Patent Document 1 includes a SIMD (single instruction multiple data) array of processing elements, and the processing elements are divided into a plurality of processing blocks so that the processing blocks can be divided into groups of data items. A parallel data processing device is described that is operable to process.
[0010]
[Patent Document 1]
Japanese translation of PCT publication No. 2002-541586
[Problems to be solved by the invention]
As described above, even if a program-based processor finds a match among a plurality of candidates using a multiple conditional expression, if the number of terms in the basic conditional expression (two in the above example) increases, 1 The number of loop instructions is further increased from 16, and the implementation on the program can no longer be impractical in terms of execution speed (assuming that the number of terms is 16, 100 × candidate_max instruction is required).
[0012]
The object of the present invention is not to allow a program-type processor to calculate the truth of a logical conditional expression, but as a supplement to the processor, to calculate a multiple logical conditional expression in parallel on specially prepared hardware Accordingly, an object of the present invention is to provide an information processing apparatus capable of improving the calculation speed, reducing the program memory area, and reducing the load on the processor.
[0013]
[Means for Solving the Problems]
In the information processing apparatus of the present invention, the N-layer basic condition determiner for calculating in parallel a logical conditional expression having a maximum number of terms of 2 N-1 (N: an arbitrary integer equal to or greater than 1) It is designed to be provided as hardware.
[0014]
As a supplement to the processor, specially prepared hardware, that is, when multiple logical conditional expressions are calculated in parallel on the N-layer basic condition determiner, the calculation processing speed is improved and the program memory area is increased. And the load on the processor can be reduced at the same time.
[0015]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to FIGS.
First, the positioning of the N-layer basic condition determiner on the information processing apparatus of the present invention will be described. The N-layer basic condition determiner is generally provided inside or outside the processor as auxiliary hardware of the processor, but its most likely position is shown in FIG.
[0016]
As shown in the figure, in this example, it is assumed that the processor 11 is provided outside the processor 11, and various input / output (I / O) devices 13, 14 are connected to the processor 11 via the processor bus 12. Although the storage device 15 and the like are accommodated, the N-layer basic condition determination unit is accommodated as auxiliary hardware 16 in the same manner as these. When it is necessary to perform calculation processing of multiple logical expressions in parallel, for example, by accessing the auxiliary hardware 16 from the processor 11, various data necessary for calculation processing are set in the auxiliary hardware 16. After that, the auxiliary hardware 16 is activated, and the final calculation processing result and the like in the auxiliary hardware 16 are also taken into the processor 11 via the processor bus 12.
[0017]
Now, the N-layer basic condition determiner for calculating and processing the logical conditional expression consisting of 2 N-1 in parallel includes a one-layer basic condition determiner corresponding to the term. FIG. 2 shows a configuration of an example of the one-layer basic condition determiner. The configuration and operation will be described as follows.
[0018]
That is, as shown in the figure, input data, mask data, and candidate data having the same number of bits are input into the one-layer basic condition determination unit 21, and the input data and mask data are AND (logical product) circuit 211. The mask data and candidate data are logically ANDed between corresponding bits by an AND circuit 212. Due to the logical product between these corresponding bits, of the constituent bits in the input data and candidate data, the unnecessary bit part or the bit part that should be ignored in the calculation process is forcibly set to the “0” state by the mask data. It is supposed to be placed. Next, logical product results 213 and 214 from each of the AND circuits 211 and 212 are input to a plurality of accumulators 215 to 220, and predetermined arithmetic processing is performed on each of them. The result of the arithmetic processing is 1 Bit operation processing results 221 to 226 are output.
[0019]
Incidentally, the calculation process in each of the accumulators 213 to 218 will be described as follows.
Accumulator 215: The corresponding bitwise exclusive OR results of the logical product results 213 and 214 are all “0”, or the subtraction result between the logical product results 213 and 214 is zero and the logical product results 213 and 214 are equal. In this case, “1” is output as the 1-bit calculation processing result 221.
Accumulator 216: When the corresponding bitwise exclusive OR results of logical product results 213 and 214 are not all “0”, or the subtraction result between logical product results 213 and 214 is not zero, that is, logical product When the results 213 and 214 are not equal, “1” is output as the 1-bit operation processing result 222.
Accumulator 217: When the logical product result 213 is larger than the logical product result 214 as the subtraction result between the logical product results 213 and 214, “1” is output as the 1-bit operation processing result 223.
[0020]
Accumulator 218: When the logical product result 213 is smaller than the logical product result 214 as the subtraction result between the logical product results 213 and 214, “1” is output as the 1-bit operation processing result 224.
Accumulator 219: When the logical product result 213 is greater than or equal to the logical product result 214 as a subtraction result between the logical product results 213 and 214, “1” is set as the 1-bit arithmetic processing result 225. Output.
Accumulator 220: When the logical product result 213 is smaller than or equal to the logical product result 214 as a subtraction result between the logical product results 213 and 214, “1” is obtained as the 1-bit arithmetic processing result 226. Output.
[0021]
As described above, the accumulators 215 to 220 output 1-bit arithmetic processing results 221 to 226 and are input to the selector 227. Of these 1-bit arithmetic processing results 221 to 226, either Whether or not the selection is output from the (selection circuit) 227 as the basic condition determination device output (first layer result) 228 is based on an arithmetic processing result selection signal 229 from the outside.
[0022]
FIG. 3 also shows a configuration of the above-described one-layer basic condition determiner 21 having two layers, that is, an example of a two-layer basic condition determiner. The configuration and operation will be described. Input / mask / candidate data corresponding to each of the first layer basic condition determiners 21-1 and 21-2 in the two layer basic condition determiner 31 is input from the outside. In addition, external operation processing result selection signals 229-1 and 229-2 are input, and in the same manner as shown in FIG. Layer result-2) 228-1 and 228-2 are output to the outside. On the other hand, these 1-layer basic condition decision unit outputs 228-1 and 228-2 are also inputted to the AND circuit 311 and the OR (logical sum) circuit 312, respectively, and logically ANDed to obtain a logical product. A result 313 and a logical sum result 314 are obtained. Which of the logical product result 313 and the logical sum result 314 is selected and output from the selector 315 as the two-layer basic condition determiner output (two-layer result) 316 depends on an arithmetic processing result selection signal 317 from the outside. .
[0023]
Further, FIG. 4 shows a configuration of an example in which the above-described two-layer basic condition determiner 31 has two layers, that is, a three-layer basic condition determiner. The configuration and operation will be described. Input / mask / candidate data corresponding to each of the two-layer basic condition determiners 31-1 and 31-2 in the three-layer basic condition determiner 41 is input from the outside. In addition, three arithmetic processing result selection signals (not shown) are input from the outside, and in the same manner as shown in FIG. 3, a two-layer basic condition determiner output including a one-layer result (two-layer result− 1st and 2nd layer result-2) 316-11 and 316-21 are output to the outside. On the other hand, the two-layer basic condition determiner outputs 316-1 and 316-2 themselves are inputted to the AND circuit 411 and the OR circuit 412, respectively, and logically ANDed to obtain a logical product result 413, a logical sum. A result 414 is obtained. Which one of the logical product result 413 and the logical sum result 414 is selectively output from the selector 415 as the three-layer basic condition determiner output (three-layer result) 416 depends on an arithmetic processing result selection signal 417 from the outside. .
[0024]
Therefore, a general configuration of an N-layer basic condition determiner in which the value of N is 2 or more can be easily estimated from the two-layer basic condition determiner 31 and the three-layer basic condition determiner 41 described above. The configuration of the N-layer basic condition determiner is shown in FIG. The configuration and operation will be described. Input / mask / candidate data corresponding to each of the (N−1) -layer basic condition determiners 511 and 512 in the N-layer basic condition determiner 51 is input from the outside. In addition, a plurality of arithmetic processing result selection signals (not shown) are input from the outside, and the (N-1) layer basic condition determiner output ((N -1) Layer result-1 and (N-1) Layer result-2) 515, 516 are output to the outside. On the other hand, the (N-1) -layer basic condition determiner outputs 513 and 514 themselves are input to the AND circuit 517 and the OR circuit 518, respectively, and logically ANDed to obtain a logical product result 519 and a logical sum. A result 520 is obtained. Which of the logical product result 519 and the logical sum result 520 is selectively output from the selector 521 as the N-layer basic condition determiner output (N-layer result) 522 depends on the arithmetic processing result selection signal 523 from the outside. is doing.
[0025]
FIG. 5 shows an example of how the N-layer basic condition determiner is configured from the (N-1) -layer basic condition determiner, and shows two (N-1) layer basic conditions. The N-layer basic condition determiner output (N-layer result) is generated after the output of the determiner is compiled. In that case, when not only the N layer basic condition judging device output but also the results of the first layer to the (N-1) layer are output together, it is possible to obtain a partial result of the conditional expression. .
[0026]
Here, the relationship between the logical conditional expression of the N layer and the logical conditional expression of the (N + 1) layer will be described as follows.
That is, if the logical conditional expressions of the N layer are f0 (n) and f1 (n) (where f0 and f1 are generally different in operation type, input / mask / candidate data), the logical conditional expression of the (N + 1) layer Is f (N + 1) = f0 (n) && f1 (n), or f0 (n) || f1 (n). Incidentally, && in an expression indicates a logical product operation, and || indicates a logical sum operation.
However, when N = 1, arithmetic processing is performed only by the first-layer basic condition decision unit 21 shown in FIG. 2. As a result, what arithmetic processing is performed depends on an arithmetic processing result selection signal from the outside. 229.
[0027]
The main body of the N-layer basic condition determination unit has been described above. Actually, however, the function is exhibited for the first time by providing various setting circuits around it. FIG. 6 shows a schematic configuration of an N-layer basic condition determination unit including these various setting circuits. As shown in the figure, the storage circuit 61 stores candidate data and a plurality of mask data corresponding to the candidate data in advance, and the index is used as an address, and the candidate data of any index and the corresponding mask data are read from the storage circuit 61. In addition, whether the N-layer basic condition determination unit 51 is set depends on the read index address to the storage circuit 61. The incrementer (+1 adder) 62 and the register 63 constitute a so-called counter. When the count value in the counter is sequentially incremented from 0, the count value is updated as a read index address. On the other hand, the candidate data and the mask data corresponding to the candidate data are set in the N-layer basic condition determination unit 51 in the order of the index by being given to the storage circuit 61.
[0028]
On the other hand, 2 N-1 pieces of input data are stored in the register 64 in advance, so that the input data is set to the N-layer basic condition determination unit 51 in a predetermined manner. By storing a predetermined number of arithmetic processing result selection signals determined by the value of N in advance, the arithmetic processing result selection signal is set to be predetermined for the N-layer basic condition determination unit 51. Eventually, the above-described various settings are made for the N-layer basic condition determiner 51, so that the N-layer basic condition determiner 51 starts from the first N-layer result (N−1), including the target N-layer result. ) The layer result is obtained together and becomes a Write Enable signal for the layer result holders 66-69. The layer result holders 66 to 69 hold the value of the register 63 in accordance with the Write Enable signal. The various layer results held in this way are taken into the processor, thereby improving the calculation processing speed.
[0029]
Here, the effect of the present invention will be considered. As an example of the conditional expression described in the prior art, in this example, N = 2, and the two-layer basic condition determiner shown in FIG. 3 is applied. Here, if candidate_max is 128, the number of instructions required for execution is 2048 (= 16 × candidate_max (= 128)) unless the present invention is used.
[0030]
However, when this is performed according to the present invention, the first-layer basic condition determiner 21-1 selects "==" as the calculation processing result, and the first-layer basic condition determiner 21-2 selects the calculation process. As a result, “! =” Is selected, and the selector 315 selects a logical product (AND) result. Here, if the two-layer basic condition determiner operates at the same clock as the CPU clock, the number of clocks required to obtain the result is 128 (= candidate_max). In general, the number of instructions and the number of clocks do not actually correspond as one-to-one, and in many cases the number of clocks increases. Considering this, it can be seen that according to the present invention, the number of cycles required to obtain a result is greatly reduced.
[0031]
Further, according to the present invention, the processor instructions are as follows.
1: Get counter value of index 2: If counter <candidate_max, return to 1 Conditional branch instruction 3: Read the result into the register In this way, it becomes 3 instructions and the memory size to hold the instruction is reduced Become.
[0032]
Finally, as an application example of the present invention, for example, the following program is considered.
[0033]
Figure 0003894135
Figure 0003894135
[0034]
In this case, the two-layer basic condition determiner is used, but the first-layer result-1 corresponds to result_0, the first-layer result-2 corresponds to result_1, and the second-layer result corresponds to result_total. Even if the program is complicated as described above, the number of cycles required is candidate_max. Thus, the number of cycles can be reduced as compared with the case of executing with a complete program.
[0035]
As mentioned above, the invention made by the present inventor has been specifically described based on the embodiment. However, the present invention is not limited to the embodiment described above, and various modifications can be made without departing from the scope of the invention. Needless to say.
[0036]
【The invention's effect】
As a supplement to the program-type processor, multiple logical conditional expressions are calculated in parallel on specially prepared hardware, thereby improving calculation speed, reducing program memory area, and reducing processor load. An information processing apparatus is provided.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a configuration of an information processing apparatus according to an example of the present invention.
FIG. 2 is a diagram illustrating a configuration of an example of a one-layer basic condition determiner.
FIG. 3 is a diagram showing a configuration of an example of a two-layer basic condition determiner.
FIG. 4 is a diagram showing a configuration of an example of a three-layer basic condition determiner.
FIG. 5 is a diagram illustrating a configuration of an example of an N-layer basic condition determiner.
FIG. 6 is a diagram showing a schematic configuration of an N-layer basic condition determiner including various setting circuits and the like.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 11 ... Processor, 16 ... Auxiliary hardware, 211, 212, 311, 411, 517 ... AND (logical product) circuit, 215-220 ... Accumulator, 227, 315, 415, 521 ... Selector (selection circuit), 312, 412 , 518 ... OR (logical sum) circuit, 51 ... N layer basic condition determiner, 61 ... memory circuit, 62 ... incrementer (+1 addition circuit), 63 to 65 ... register

Claims (5)

プログラム方式のプロセッサを含む情報処理装置であって、
項数が最大、2N−1(N:1以上の任意整数)からなる論理条件式を並列的に計算処理するためのN層基本条件判断器が、プロセッサの補助ハードウェアとして設けられてなり、
上記N層基本条件判断器は、項対応の1層基本条件判断器を含む状態として構成されてなリ、
上記1層基本条件判断器各々は、
マスクデータと入力データとを論理積する論理積回路と、
上記マスクデータと候補データとを論理積する論理積回路と、
上記論理積回路各々からの論理積結果を用い、それぞれ予め定められた演算処理を行い、演算処理結果を1ビットとして出力する複数のアキュムレータと、
該アキュムレータ各々からの1ビット演算処理結果のうち、何れか1つの1ビット演算処理結果を選択的に出力する選択回路と
から構成されてなる情報処理装置。
An information processing apparatus including a program-type processor,
An N-layer basic condition determiner for calculating and processing a logical conditional expression having a maximum number of terms of 2 N-1 (N: an arbitrary integer of 1 or more) in parallel is not provided as auxiliary hardware of the processor. The
The N-layer basic condition determiner is configured as a state including a one-layer basic condition determiner corresponding to a term,
Each of the above-mentioned first layer basic condition determiners
An AND circuit that ANDs the mask data and the input data;
An AND circuit that ANDs the mask data and candidate data;
A plurality of accumulators that perform predetermined arithmetic processing using the logical product results from each of the logical product circuits and output the arithmetic processing results as one bit;
A selection circuit that selectively outputs one of the 1-bit arithmetic processing results from the one-bit arithmetic processing results from each of the accumulators;
An information processing apparatus comprising:
プログラム方式のプロセッサを含み、且つ項数が最大、2N−1(N:1以上の任意整数)からなる論理条件式を並列的に計算するためのN層基本条件判断器が、上記プロセッサの補助ハードウェアとして設けられてなる情報処理装置であって、
項対応に設けられる1層基本条件判断器が、マスクデータと入力データとを論理積する論理積回路と、上記マスクデータと候補データとを論理積する論理積回路と、上記論理積回路各々からの論理積結果を用い、それぞれ予め定められた演算処理を行い、演算処理結果を1ビットとして出力する複数のアキュムレータと、該アキュムレータ各々からの1ビット演算処理結果のうち、何れか1つの1ビット演算処理結果を選択的に出力する選択回路とから構成されていることを前提として、
N=1である場合、1個の1層基本条件判断器としてN層基本条件判断器が構成され、
N≧2以上である場合、2個の(N−1)層基本条件判断器と、該(N−1)層基本条件判断器各々からの1ビット演算処理結果を論理積する論理積回路と、上記(N−1)層基本条件判断器各々からの1ビット演算処理結果を論理和する論理和回路と、上記論理積回路からの論理積結果、上記論理和回路からの論理和結果のうち、何れか1つを選択的に出力する選択回路とからN層基本条件判断器が構成され
てなる情報処理装置。
An N-layer basic condition determiner including a program-type processor and having a maximum number of terms for calculating a logical conditional expression consisting of 2 N-1 (N: an arbitrary integer greater than or equal to 1) in parallel. An information processing apparatus provided as auxiliary hardware,
A one-layer basic condition determiner provided for each term includes an AND circuit that ANDs mask data and input data, an AND circuit that ANDs the mask data and candidate data, and each of the AND circuits One of the plurality of accumulators that perform predetermined arithmetic processing and output the arithmetic processing result as one bit, and one bit arithmetic processing result from each of the accumulators. Assuming that it is composed of a selection circuit that selectively outputs the operation processing result,
When N = 1, an N-layer basic condition determiner is configured as one single-layer basic condition determiner,
When N ≧ 2, two (N-1) layer basic condition determiners, and a logical product circuit that ANDs the results of 1-bit arithmetic processing from each of the (N-1) layer basic condition determiners, A logical sum circuit that logically sums the 1-bit arithmetic processing results from each of the (N-1) layer basic condition determiners, a logical product result from the logical product circuit, and a logical sum result from the logical sum circuit An information processing apparatus in which an N-layer basic condition determination unit is configured from a selection circuit that selectively outputs any one of them.
請求項記載の情報処理装置において、
上記N層基本条件判断器の周辺には、
1層基本条件判断器各々に対し、入力データを設定する入力データ設定手段と、
上記1層基本条件判断器各々に対し、マスクデータおよび候補データをインデックス更新の度に、更新設定するマスク・候補データ設定手段と、
上記N層基本条件判断器内に含まれる、1以上の選択回路各々に対し、1ビット演算処理結果を選択するための選択信号を1以上、設定する選択信号設定手段と
が設けられてなる情報処理装置。
The information processing apparatus according to claim 2 ,
In the vicinity of the N-layer basic condition determiner,
Input data setting means for setting input data for each one-layer basic condition determiner;
A mask / candidate data setting means for updating the mask data and candidate data for each index update for each of the first layer basic condition determiners;
Information provided with selection signal setting means for setting one or more selection signals for selecting a 1-bit arithmetic processing result for each of one or more selection circuits included in the N layer basic condition determination unit. Processing equipment.
プログラム方式のプロセッサを含み、且つ項数が最大、2N−1(N:1以上の任意整数)からなる論理条件式を並列的に計算するためのN層基本条件判断器が、上記プロセッサの補助ハードウェアとして設けられてなる情報処理装置であって、
項対応に設けられる1層基本条件判断器が、マスクデータと入力データとを論理積する論理積回路と、上記マスクデータと候補データとを論理積する論理積回路と、上記論理積回路各々からの論理積結果を用い、それぞれ予め定められた演算処理を行い、演算処理結果を1ビットとして出力する複数のアキュムレータと、該アキュムレータ各々からの1ビット演算処理結果のうち、何れか1つの1ビット演算処理結果を選択的に出力する選択回路とから構成されていることを前提として、
N層基本条件判断器は、
N=1である場合、1個の1層基本条件判断器として構成され、
N≧2以上である場合、2個の(N−1)層基本条件判断器と、該(N−1)層基本条件判断器各々からの1ビット演算処理結果を論理積する論理積回路と、上記(N−1)層基本条件判断器各々からの1ビット演算処理結果を論理和する論理和回路と、上記論理積回路からの論理積結果、上記論理和回路からの論理和結果のうち、何れか1つを選択的に出力する選択回路とから構成された上、
プロセッサ・バスに収容接続された状態で、該プロセッサからアクセス可能とされてなる情報処理装置。
An N-layer basic condition determiner including a program-type processor and having a maximum number of terms for calculating a logical conditional expression consisting of 2 N-1 (N: an arbitrary integer greater than or equal to 1) in parallel. An information processing apparatus provided as auxiliary hardware,
A one-layer basic condition determiner provided for each term includes an AND circuit that ANDs mask data and input data, an AND circuit that ANDs the mask data and candidate data, and each of the AND circuits One of the plurality of accumulators that perform predetermined arithmetic processing and output the arithmetic processing result as one bit, and one bit arithmetic processing result from each of the accumulators. Assuming that it is composed of a selection circuit that selectively outputs the operation processing result,
N-layer basic condition determiner
When N = 1, it is configured as one single layer basic condition determiner,
When N ≧ 2, two (N-1) layer basic condition determiners, and a logical product circuit that ANDs the results of 1-bit arithmetic processing from each of the (N-1) layer basic condition determiners, A logical sum circuit that logically sums the 1-bit arithmetic processing results from each of the (N-1) layer basic condition determiners, a logical product result from the logical product circuit, and a logical sum result from the logical sum circuit And a selection circuit that selectively outputs any one of them,
An information processing apparatus that is accessible from the processor while being accommodated and connected to the processor bus.
請求項記載の情報処理装置において、
上記N層基本条件判断器の周辺には、
1層基本条件判断器各々に対し、入力データを設定する入力データ設定手段と、
上記1層基本条件判断器各々に対し、マスクデータおよび候補データをインデックス更新の度に、更新設定するマスク・候補データ設定手段と、
上記N層基本条件判断器内に含まれる、1以上の選択回路各々に対し、1ビット演算処理結果を選択するための選択信号を1以上、設定する選択信号設定手段と
が設けられてなる情報処理装置。
The information processing apparatus according to claim 4 .
In the vicinity of the N-layer basic condition determiner,
Input data setting means for setting input data for each one-layer basic condition determiner;
A mask / candidate data setting means for updating the mask data and candidate data for each index update for each of the first layer basic condition determiners;
Information provided with selection signal setting means for setting one or more selection signals for selecting a 1-bit arithmetic processing result for each of one or more selection circuits included in the N layer basic condition determination unit. Processing equipment.
JP2003045031A 2003-02-21 2003-02-21 Information processing device Expired - Fee Related JP3894135B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003045031A JP3894135B2 (en) 2003-02-21 2003-02-21 Information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003045031A JP3894135B2 (en) 2003-02-21 2003-02-21 Information processing device

Publications (2)

Publication Number Publication Date
JP2004252899A JP2004252899A (en) 2004-09-09
JP3894135B2 true JP3894135B2 (en) 2007-03-14

Family

ID=33027556

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003045031A Expired - Fee Related JP3894135B2 (en) 2003-02-21 2003-02-21 Information processing device

Country Status (1)

Country Link
JP (1) JP3894135B2 (en)

Also Published As

Publication number Publication date
JP2004252899A (en) 2004-09-09

Similar Documents

Publication Publication Date Title
US5880981A (en) Method and apparatus for reducing the power consumption in a programmable digital signal processor
JP3729881B2 (en) Circuit and method for performing parallel addition and averaging
US11662979B2 (en) Adder circuitry for very large integers
JPH06208456A (en) Cpu with integrated multiplication / accumulation unit
WO2022046570A1 (en) Vector processor architectures
JP2009037302A (en) Branch prediction device, hybrid branch prediction device, processor, branch prediction method, and branch prediction control program
US7054895B2 (en) System and method for parallel computing multiple packed-sum absolute differences (PSAD) in response to a single instruction
JP2012209755A (en) Arithmetic circuit and binary number conversion method
JP2023505177A (en) Processor unit for multiply-accumulate operations
WO2006121444A1 (en) Vector processor with special purpose registers and high speed memory access
JP3894135B2 (en) Information processing device
US10042605B2 (en) Processor with efficient arithmetic units
CN113485751A (en) Method for performing Galois field multiplication, arithmetic unit and electronic device
US20090031117A1 (en) Same instruction different operation (sido) computer with short instruction and provision of sending instruction code through data
JP2022074442A (en) Arithmetic device and arithmetic method
US6725360B1 (en) Selectively processing different size data in multiplier and ALU paths in parallel
JP4873546B2 (en) Data processing apparatus and data processing method
JP2008102715A (en) Arithmetic device
KR100732426B1 (en) Computer with high-speed context switching
JP2580371B2 (en) Vector data processing device
JP2000081966A (en) Arithmetic unit
JP4413052B2 (en) Data flow graph processing apparatus and processing apparatus
US20090063808A1 (en) Microprocessor and method of processing data
JP5786719B2 (en) Vector processor
US6792442B1 (en) Signal processor and product-sum operating device for use therein with rounding function

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060106

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060801

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060808

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061003

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20061121

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061204

LAPS Cancellation because of no payment of annual fees