JP2004054647A - Image processing device and method for the same - Google Patents

Image processing device and method for the same Download PDF

Info

Publication number
JP2004054647A
JP2004054647A JP2002211852A JP2002211852A JP2004054647A JP 2004054647 A JP2004054647 A JP 2004054647A JP 2002211852 A JP2002211852 A JP 2002211852A JP 2002211852 A JP2002211852 A JP 2002211852A JP 2004054647 A JP2004054647 A JP 2004054647A
Authority
JP
Japan
Prior art keywords
stage
data
arithmetic
unit
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.)
Granted
Application number
JP2002211852A
Other languages
Japanese (ja)
Other versions
JP4264530B2 (en
Inventor
Hitoshi Sato
佐藤 仁
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 JP2002211852A priority Critical patent/JP4264530B2/en
Publication of JP2004054647A publication Critical patent/JP2004054647A/en
Application granted granted Critical
Publication of JP4264530B2 publication Critical patent/JP4264530B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing device and a method for the same capable of simplifying a processing unit, enhancing the efficiency of two-dimensional processing, reducing the size of a crossbar circuit, and increasing the speed of processing. <P>SOLUTION: A plurality of POPs (pixel operation processors) 0-3 as a function unit for performing highly parallel operation processing are included. Each of the POPs includes computing elements POPEs (pixel operation processing elements) 0-3 arranged in parallel. Each of the computing elements OPEs 0-3 conducts predetermined operation and outputs an operation result to a next stage POPE, followed by an reference image read from two caches RO$, RW$, element data of an object image, and operation parameter by a filter function unit FFU. The next stage POPE adds the operation result in a former stage to the operation result of itself, outputs to a next stage POPE, and sums the operation results of all of the POPEs 0-3 in a final stage POPE 3. Each of the POPs selects only the operation result of the POPE 3 from the operation outputs of the plurality of the POPEs, and outputs to the crossbar circuit 13125. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、複数の処理データを共有して並列処理を行う画像処理装置およびその方法に関するものである。
【0002】
【従来の技術】
昨今のコンピュータシステムにおける演算速度の向上や描画機能の強化とも相俟って、コンピュータ資源を用いて図形や画像の作成や処理を行う「コンピュータ・グラフィクス(CG)」技術が盛んに研究・開発され、さらに実用化されている。
【0003】
たとえば、3次元グラフィクスは、3次元オブジェクトが所定の光源によって照らされたときの光学現象を数学モデルで表現して、このモデルに基づいてオブジェクト表面に陰影や濃淡を付けたり、さらには模様を貼り付けたりして、よりリアルで3次元的な2次元高精細画像を生成するものである。
このようなコンピュータ・グラフィックスは、科学、工学、製造などの開発分野でのCAD/CAM、その他の各種応用分野においてますます盛んに利用されるようになってきている。
【0004】
3次元グラフィックスは、一般には、フロントエンドとして位置づけられる「ジオメトリ・サブシステム」と、バックエンドとして位置づけられる「ラスタ・サブシステム」とにより構成される。
【0005】
ジオメトリ・サブシステムとは、ディスプレイ・スクリーン上に表示する3次元オブジェクトの位置や姿勢などの幾何学的な演算処理を行う過程のことである。
ジオメトリ・サブシステムでは、一般にオブジェクトは多数のポリゴンの集合体として扱われ、ポリゴン単位で、「座標変換」、「クリッピング」、「光源計算」などの幾何学的な演算処理が行われる。
【0006】
一方、ラスタ・サブシステムは、オブジェクトを構成する各ピクセル(pixel)を塗りつぶす過程のことである。
ラスタライズ処理は、たとえばポリゴンの頂点毎に求められた画像パラメータを基にして、ポリゴン内部に含まれるすべてのピクセルの画像パラメータを補間することによって実現される。
ここで言う画像パラメータには、いわゆるRGB形式などで表される色(描画色)データ、奥行き方向の距離を表すz値などがある。
また、最近の高精細な3次元グラフィクス処理では、遠近感を醸し出すためのf(fog:霧)や、物体表面の素材感や模様を表現してリアリティを与えるテクスチャ(texture)なども、画像パラメータの1つとして含まれている。
【0007】
ここで、ポリゴンの頂点情報からポリゴン内部のピクセルを発生する処理では、よくDDA(Digital Differential Analyzer)と呼ばれる線形補間手法を用いて実行される。
DDAプロセスでは、頂点情報からポリゴンの辺方向へのデータの傾きを求め、この傾きを用いて辺上のデータを算出した後、続いてラスタ走査方向(X方向)の傾きを算出し、この傾きから求めたパラメータの変化分を走査の開始点のパラメータ値に加えていくことで、内部のピクセルを発生していく。
【0008】
ところで、グラフィックスLSIの性能を向上させるには、LSIの動作周波数を上げるだけではなく、並列処理の手法を利用することが有効である。並列処理の手法を大別すると以下のようになる。
第1は領域分割による並列処理法であり、第2はプリミティブレベルでの並列処理法であり、第3はピクセルレベルでの並列処理法である。
【0009】
上記分類は並列処理の粒度に基づいており、領域分割並列処理の粒度が最もあらく、ピクセル・レベル並列処理の粒度が最も細かい。それぞれの手法の概要を以下に述べる。
【0010】
領域分割による並列処理
画面を複数の矩形領域に分割し、複数の処理ユニットそれぞれが担当する領域を割り当てながら並列処理する手法である。
【0011】
プリミティブレベルでの並列処理
複数の処理ユニットに別々のプリミティブ(たとえば三角形)を与えて並列動作させる手法である。
【0012】
ピクセルレベルでの並列処理
最も粒度の細かい並列処理の手法である。
図1は、ピクセルレベルでの並列処理の手法に基づくプリミティブレベルでの並列化処理について概念的に示す図である。
図1のように、ピクセルレベルでの並列処理の手法では三角形をラスタライズする際に、2×8のマトリクス状に配列されたピクセルからなるピクセルスタンプ(Pixel Stamp)PSと呼ばれる矩形領域単位にピクセルが生成される。
図1の例では、ピクセルスタンプPS0からからピクセルスタンプPS7までの合計8個のピクセルスタンプが生成されている。これらピクセルスタンプPS0〜PS7に含まれる最大16個のピクセルが同時に処理される。
この手法は、他の手法に比べ粒度が細かい分、並列処理の効率が良い。
【0013】
【発明が解決しようとする課題】
しかしながら、上述した領域分割による並列処理の場合、各処理ユニットを効率良く並列動作させるためには、各領域に描画されるべきオブジェクトをあらかじめ分類する必要があり、シーンデータ解析の負荷が重い。
また、1フレーム分のシーンデータが全て揃った上で描画を開始するのではなく、オブジェクトデータが与えられると即描画を開始するいわゆるイミーディエートモードでの描画を行う際には並列性を引き出すことができない。
【0014】
また、プリミティブレベルでの並列処理の場合、実際には、オブジェクトを構成するプリミティブの大きさにはバラツキがあることから、処理ユニットごとに一つのプリミティブを処理する時間に差が生じる。この差が大きくなった際には、処理ユニットが描画する領域も大きく異なり、データのローカリティが失われるので、メモリモジュールを構成するたとえばDRAMのページミスが頻発し性能が低下する。
また、この手法の場合には、配線コストが高いという問題点もある。一般に、グラフィックス処理を行うハードウェアでは、メモリのバンド幅を広げるために、複数メモリモジュールを用いてメモリインターリーブを行う。
その際、各処理ユニットと各内蔵メモリモジュールを全て結ぶ必要がある。
【0015】
一方、ピクセルレベルでの並列処理の場合、上述したように、粒度が細かい分、並列処理の効率が良いという利点があり、実際のフィルタリングを含む処理としては図2に示すような手順で行われている。
【0016】
すなわち、DDAパラメータ、たとえばラスタライゼーション(Rasterization)に必要な各種データ(Z、テクスチャ座標、カラーなど)の傾き等のDDAパラメータを算出する(ST1)。
次に、メモリからテクスチャデータを読み出し(ST2)、複数の演算器を含む第1の機能ユニットでサブワード再配置処理を行った後(ST3)、クロスバー回路により複数の演算器を含む第2の機能ユニットに集約する(ST4)。
次に、テクスチャフィルタリング(Texture Filtering)を行う(ST5)。この場合、第2の機能ユニットは、読み出されたテクスチャデータと、(u,v)アドレスは算出時に得た小数部を使って4近傍補間などのフィルタリング処理を行う。
次に、ピクセルレベルの処理(Per−Pixel Operation)、具体的には、フィルタリング後のテクスチャデータと、ラスタライズ後の各種データを用いて、ピクセル単位の演算を行う(ST5)。
そして、ピクセルレベルの処理における各種テストをパスしたピクセルデータを、複数のメモリモジュール上のフレームバッファおよびZバッファに描画する(ST6)。
【0017】
ところで、テクスチャリード系のメモリアクセスは、描画系のメモリアクセスとは異なるため、他のモジュールに属すメモリからの読み出しが必要となる。
したがって、テクスチャリード系のメモリアクセスに関しては、上述したようにクロスバー回路のような配線を必要とする。
【0018】
しかしながら、従来の画像処理装置においては、第1の機能ユニットは、複数の演算器によりメモリから読み出されたデータに対して大量の演算処理を行うことから、構成が複雑化する。
また、たとえばテンプレートマッチング等の2次元の処理をするためには、要素データに関して縦方向の加算を複数列に亘って行なった後、さらに横方向の加算を行なう等の処理が必要となることから、高並列演算処理が必要となるが、単に演算器を複数用いただけでは、全ての演算器のデータを配分することが難しくなり、構成が複雑化することはもとより、処理の効率化を図ることが困難である。
さらに、得られたデータを各演算器からクロスバー回路に出力することから、グローバルバスとしてのクロスバー回路が大型化し、配線遅延の観点から処理の高速化の妨げとなるという不利益がある。
【0019】
本発明は、かかる事情に鑑みてなされたものであり、その目的は、機能ユニットの簡単化、処理の効率化を図れ、また、クロスバー回路の小型化を図れ、処理の高速化を図れる画像処理装置およびその方法を提供することにある。
【0020】
【課題を解決するための手段】
上記目的を達成するため、本発明の第1の観点は、参照画像と変化する対象画像を比較してテンプレートマッチング処理を行う画像処理装置であって、上記参照画像が格納され、複数のポートを有する第1のメモリと、上記対象画像が格納され、複数のポートを有する第2のメモリと、上記第1および第2のメモリの複数のポートに対応して設けられ、演算用パラメータおよび上記第1のメモリおよび第2のメモリから読み出された上記参照画像の要素データおよび対象画像の要素データに基づいて並列演算処理を行い、連続するストリームデータを生成する複数の演算器を含む機能ユニットと、を有し、上記機能ユニットの上記各演算器は、初段から最終段に向かって縦続接続され、各演算器はそれぞれ上記第1および第2のメモリの各ポートから読み出された要素データに対して所定の演算処理を行って次段の演算器に出力し、当該次段の演算器は自段の演算結果に前段の演算結果を加算し、当該加算結果を次段の演算器に出力し、最終段の演算器で全演算器の総和を求め、当該最終段の演算結果をストリームデータとして出力する。
【0021】
本発明の第2の観点は、参照画像と変化する対象画像を比較してテンプレートマッチング処理を行う画像処理装置であって、上記参照画像が格納され、複数のポートを有する第1のメモリと、上記対象画像が格納され、複数のポートを有する第2のメモリと、上記第1および第2のメモリの複数のポートに対応して設けられ、演算用パラメータおよび上記第1のメモリおよび第2のメモリから読み出された上記参照画像の要素データおよび対象画像の要素データに基づいて並列演算処理を行い、連続するストリームデータを生成する複数の演算器を含む複数の第1の機能ユニットと、上記各第1の機能ユニットで生成されたストリームデータに対する集約的な演算処理を行う複数の演算器を含む第2の機能ユニットと、上記複数の第1の機能ユニットと上記第2の機能ユニットの複数の演算器とを相互に接続するクロスバー回路と、を有し、上記各第1の機能ユニットの上記各演算器は、初段から最終段に向かって縦続接続され、各演算器はそれぞれ上記第1および第2のメモリの各ポートから読み出された要素データに対して所定の演算処理を行って次段の演算器に出力し、当該次段の演算器は自段の演算結果に前段の演算結果を加算し、当該加算結果を次段の演算器に出力し、最終段の演算器で全演算器の総和を求め、当該最終段の演算結果をストリームデータとして出力する。
【0022】
本発明では、上記第1および第2のメモリから上記機能ユニットの各演算器への参照画像の要素データおよび対象画像の要素データの読み出しが、初段から順にデータが入力され、かつ、前段の演算器の演算結果の入力が、自段の演算が終了し前段の演算器の演算結果を加算できるタイミングとなるようにアドレスを生成して上記第1および第2のメモリに供給するアドレス生成器を有する。
【0023】
本発明では、少なくとも対象画像または参照画像のいずれかを記憶し、複数のポートを有するメモリモジュールを有し、上記第1および第2のメモリは、少なくとも上記メモリモジュールの各ポートから読み出された画像データを記憶し、記憶データをキャッシュアドレスに応じて上記機能ユニットの各演算器に供給する複数の第1および第2のキャッシュを含み、上記第1および第2のキャッシュから上記機能ユニットの各演算器への参照画像の要素データおよび対象画像の要素データの読み出しが、初段から順にデータが入力され、かつ、前段の演算器の演算結果の入力が、自段の演算が終了し前段の演算器の演算結果を加算できるタイミングとなるようにアドレスを生成して上記第1および第2のキャッシュに供給するアドレス生成器をさらに有する。
【0024】
本発明では、好適には、上記第2の機能ユニットは、制御信号に応じて再構成可能であって、上記演算器を上記制御信号に応じた電気的な接続網で接続し、複数の演算器回路の電気的接続を確立して複数の演算器からなる演算回路を構成する。
【0025】
また、本発明では、上記並列処理は、ピクセルレベルでの並列処理である。
【0026】
本発明の第3の観点は、複数のモジュールが処理データを共有して並列処理を行う画像処理装置であって、グローバルモジュールと複数のローカルモジュールとを含み、上記グローバルモジュールは、上記複数のローカルモジュールが並列に接続され、ローカルモジュールからリクエストを受けると、上記リクエストに応じた当該リクエストを出したローカルモジュールに処理データを出力し、
上記複数のローカルモジュールは、参照画像と変化する対象画像を比較してテンプレートマッチング処理を行うモジュールであって、上記参照画像が格納され、複数のポートを有する第1のメモリと、上記対象画像が格納され、複数のポートを有する第2のメモリと、上記第1および第2のメモリの複数のポートに対応して設けられ、演算用パラメータおよび上記第1のメモリおよび第2のメモリから読み出された上記参照画像の要素データおよび対象画像の要素データに基づいて並列演算処理を行い、連続するストリームデータを生成する複数の演算器を含む機能ユニットと、を有し、上記機能ユニットの上記各演算器は、初段から最終段に向かって縦続接続され、各演算器はそれぞれ上記第1および第2のメモリの各ポートから読み出された要素データに対して所定の演算処理を行って次段の演算器に出力し、当該次段の演算器は自段の演算結果に前段の演算結果を加算し、当該加算結果を次段の演算器に出力し、最終段の演算器で全演算器の総和を求め、当該最終段の演算結果をストリームデータとして出力する。
【0027】
本発明の第4の観点は、複数のモジュールが処理データを共有して並列処理を行う画像処理装置であって、グローバルモジュールと複数のローカルモジュールとを含み、上記グローバルモジュールは、上記複数のローカルモジュールが並列に接続され、ローカルモジュールからリクエストを受けると、上記リクエストに応じた当該リクエストを出したローカルモジュールに処理データを出力し、上記複数のローカルモジュールは、参照画像と変化する対象画像を比較してテンプレートマッチング処理を行うモジュールであって、上記参照画像が格納され、複数のポートを有する第1のメモリと、上記対象画像が格納され、複数のポートを有する第2のメモリと、上記第1および第2のメモリの複数のポートに対応して設けられ、演算用パラメータおよび上記第1のメモリおよび第2のメモリから読み出された上記参照画像の要素データおよび対象画像の要素データに基づいて並列演算処理を行い、連続するストリームデータを生成する複数の演算器を含む複数の第1の機能ユニットと、上記各第1の機能ユニットで生成されたストリームデータに対する集約的な演算処理を行う複数の演算器を含む第2の機能ユニットと、上記複数の第1の機能ユニットと上記第2の機能ユニットの複数の演算器とを相互に接続するクロスバー回路と、を有し、上記各第1の機能ユニットの上記各演算器は、初段から最終段に向かって縦続接続され、各演算器はそれぞれ上記第1および第2のメモリの各ポートから読み出された要素データに対して所定の演算処理を行って次段の演算器に出力し、当該次段の演算器は自段の演算結果に前段の演算結果を加算し、当該加算結果を次段の演算器に出力し、最終段の演算器で全演算器の総和を求め、当該最終段の演算結果をストリームデータとして出力する。
【0028】
本発明の第5の観点は、参照画像と変化する対象画像を比較してテンプレートマッチング処理を行う画像処理方法であって、縦続接続された複数の演算ステージにおいて、それぞれ第1および第2のメモリの各ポートから読み出された参照画像および対象画像の要素データに対して所定の演算処理を行い、次段の演算ステージでは、自段の演算結果に前段の演算結果を加算し、最終段の演算ステージで全演算ステージの総和を求め、当該最終段の演算結果をストリームデータとして出力する。
【0029】
本発明の第6の観点は、参照画像と変化する対象画像を比較してテンプレートマッチング処理を行う画像処理方法であって、複数の機能ユニットの縦続接続された複数の演算ステージにおいて、それぞれ第1および第2のメモリの各ポートから読み出された参照画像および対象画像の要素データに対して所定の演算処理を行い、次段の演算ステージでは、自段の演算結果に前段の演算結果を加算し、最終段の演算ステージで全演算ステージの総和を求め、当該最終段の演算結果をストリームデータとしてクロスバー回路に出力し、上記クロスバー回路を転送された複数のストリームデータに対して集約的な演算処理を行う。
【0030】
本発明によれば、たとえば第1および第2のメモリに格納されている参照画像および対象画像の要素データが第1および第2のメモリの各ポートから読み出され各第1の機能ユニットの対応する各演算器に供給される。
各第1の機能ユニットの各演算器では、キャッシュから供給された要素データに対して所定の演算処理(減算、乗算および総加算)が行われる。
このとき、縦続接続された複数の演算器において、それぞれ第1および第2のメモリの各ポートから読み出された要素データに対して所定の演算処理が行われ、次段の演算器では、自段の演算結果に前段の演算結果が加算され、最終段の演算ステージで全演算ステージの総和が求められる。
そして、当該最終段の演算結果がストリームデータとしてクロスバー回路に出力される。
クロスバー回路を転送された各第1の機能ユニットによる複数のストリームデータは、第2の機能ユニットに供給される。
第2の機能ユニットは、制御信号により演算に適した演算回路が再構成されており、この演算回路により、各第1の機能ユニットによる複数のストリームデータ対して集約的な演算処理が行われる。
【0031】
また、本発明によれば、たとえばテクスチャ系の処理に場合には、コントローラにおいて演算用パラメータが生成され、生成されたパラメータはたとえばグローバルモジュールを介してローカルモジュールにブロードキャストされる。
各ローカルモジュールでは、たとえば以下の処理が行われる。
すなわちブロードキャストされたパラメータを受け取ると、その三角形が自分が担当する領域、たとえば4×4ピルセルの矩形領域単位でインターリーブされた領域に属しているか否かが判断される。その結果、属している場合には、各種データ(Z、テクスチャ座標、カラーなど)がラスタライズされる。
次に、LOD(Level of Detail)計算によるミップマップ(MipMap)レベルの算出や、テクスチャアクセスのための(u,v)アドレス計算が行われる。
そして、次に、メモリから第1の機能ユニットへのテクスチャの読み出しが行われる。
次に、ローカルモジュールの第1の機能ユニットでは、読み出されたテクスチャデータと、(u,v)アドレスを算出時に得た小数部を使って4近傍補間などのフィルタリング処理が行われる。
次に、フィルタリング後のテクスチャデータと、ラスタライズ後の各種データを用いて、第2の機能ユニットにおいてピクセル単位の演算が行われる。
そして、ピクセルレベルの処理における各種テストをパスしたピクセルデータは、メモリモジュール、たとえば内蔵DRAMメモリ上のフレームバッファおよびZバッファに書き込まれる。
【0032】
【発明の実施の形態】
図3は、本発明に係る画像処理装置の一実施形態を示すブロック構成図である。
【0033】
本実施形態に係る画像処理装置10は、図3に示すように、ストリームデータコントローラ(SDC)11、グローバルモジュール12、および複数のローカルモジュール13−0〜13−3を有している。
【0034】
本画像処理装置10では、SDC11とグローバルモジュール12とがデータの授受を行い、一つのグローバルモジュール12に対して複数個m、本実施形態では4個のローカルモジュール13−0〜13−3が並列に接続されて、複数のローカルモジュール13−0〜13−3で処理データを共有し並列に処理する。そして、テクスチャリード系に関しては、他のローカルモジュールに対するメモリアクセスを必要とするが、グローバルアクセスバスの形態をとる代わりに、ルータとしての機能を有する一つのグローバルモジュール12を介したアクセスを行う。
また、グローバルモジュール12はグローバルキャッシュを有し、各ローカルモジュール13−0〜13−3はローカルキャッシュをそれぞれ有する。
すなわち、本画像処理装置10は、キャッシュの階層として、たとえば4つのローカルモジュール13−0〜13−3が共有するグローバルキャッシュと、各ローカルモジュールがローカルに持つローカルキャッシュの2階層を有する。
【0035】
以下に各構成要素の構成および機能について、図面に関連付けて順を追って説明する。
【0036】
SDC11は、CPUや外部メモリとのデータの授受、並びにグローバルモジュール12とのデータの授受を司るとともに、頂点データに対する演算、各ローカルモジュール13−0〜13−3の処理ユニットにおけるラスタライゼーション(Rasterization)に必要なパラメータの生成等の処理を行う。
【0037】
SDC11における具体的な処理内容は以下の通りである。また、SDC11の処理手順を図4に示す。
【0038】
SDC11は、まず、データが入力されると(ST1)、Per−Vertexオペレーションを行う(ST2)。
この処理においては、3次元座標、法線ベクトル、テクスチャ座標の各頂点データが入力されると、頂点データに対する演算が行われる。代表的な演算としては、物体の変形やスクリーンへの投影などを行う座標変換の演算処理、ライティング(Lighting)の演算処理、クリッピング(Clipping)の演算処理がある。
ここで行われる処理は、いわゆるVertex Shaderの実行に相当する。
【0039】
次に、DDA(Digital Differential Analyzer)パラメータを計算する(ST3)。
この処理では、ラスタライゼーションに必要な各種データ(Z、テクスチャ座標、カラーなど)の傾き等のDDAパラメータを算出する。
【0040】
次に、算出したDDAパラメータをグローバルモジュール12を介して全ローカルモジュール13−0〜13−3にブロードキャストする(ST4)。
この処理において、ブロードキャストされたパラメータは、キャッシュフィルとは別のチャネルを用いて、グローバルモジュール12を介して各ローカルモジュール13−0〜13−3に渡される。ただし、グローバルキャッシュの内容には影響を与えない。
【0041】
グローバルモジュール12は、ルータ機能および全ローカルモジュールで共用するグローバルキャッシュ121を有する。
グローバルモジュール12は、SDC11によるDDAパラメータを並列に接続された全ローカルモジュール13−0〜13−3にブロードキャストする。
【0042】
また、グローバルモジュール12は、たとえばあるローカルモジュールからローカルキャッシュフィル(Local Cache Fill)LCFのリクエストを受けると、図5に示すように、グローバルキャッシュのエントリーをチェックし(ST11)、エントリーがあった場合には(ST12)、要求されたブロックデータを読み出し(ST13)、読み出したデータをリクエストを送出したローカルモジュールに送出し(ST14)、エントリーがなかった場合には(ST12)、当該ブロックデータを保持するターゲットのローカルモジュールに対してグローバルキャッシュフィル(Global Cache Fill)GCFのリクエストを送り(ST15)、その後送られてきたブロックデータでグローバルキャッシュを更新するとともに(ST16,ST17)、ブロックデータを読み出し(ST13)、読み出したデータをローカルキャッシュフィルLDFのリクエストを送ってきたローカルモジュールに対して送出する(ST14)。
【0043】
ローカルモジュール13−0は、処理ユニット131−0、たとえばDRAMからなるメモリモジュール132−0、モジュール固有のローカルキャッシュ133−0、およびグローバルモジュール12とのインターフェースを司るグローバルインターフェース(Global Access Interface:GAIF))134−0を有している。
【0044】
同様に、ローカルモジュール13−1は、処理ユニット131−1、たとえばDRAMからなるメモリモジュール132−1、モジュール固有のローカルキャッシュ133−1、およびグローバルモジュール12とのインターフェースを司るグローバルインターフェース(GAIF)134−1を有している。
ローカルモジュール13−2は、処理ユニット131−2、たとえばDRAMからなるメモリモジュール132−2、モジュール固有のローカルキャッシュ133−2、およびグローバルモジュール12とのインターフェースを司るグローバルインターフェース(GAIF)134−2を有している。
ローカルモジュール13−3は、処理ユニット131−3、たとえばDRAMからなるメモリモジュール132−3、モジュール固有のローカルキャッシュ133−3、およびグローバルモジュール12とのインターフェースを司るグローバルインターフェース(GAIF)134−3を有している。
【0045】
各ローカルモジュール13−0〜13−3は、メモリモジュール132−0〜132−3が所定の大きさ、たとえば4×4の矩形領域単位にインターリーブされており、メモリモジュール132−0と処理ユニット131−0、メモリモジュール132−1と処理ユニット131−1、メモリモジュール132−2と処理ユニット131−2、およびメモリモジュール132−3と処理ユニット131−3は、担当領域は1対1に対応しており、描画系については他のローカルモジュールに対するメモリアクセスが発生しない。
一方、各ローカルモジュール13−0〜13−3は、テクスチャリード系に関しては、他のローカルモジュールに対するメモリアクセスを必要とするが、この場合、グローバルモジュール12を介したアクセスを行う。
【0046】
各ローカルモジュール13−0〜13−3の処理ユニット131−0〜131−3はそれぞれ、画像処理とグラフィックス処理に特徴的な、いわゆるストリーミングデータ処理を高スループットで実行するストリーミングプロセッサである。
【0047】
各ローカルモジュール13−0〜13−3の処理ユニット131−0〜131−3は、たとえばそれぞれ以下のグラフィックス処理および画像処理を行う。
【0048】
まず、処理ユニット131−0〜131−3のグラフィックス処理の概要を図6および図7のフローチャートに関連付けて説明する。
【0049】
処理ユニット131(−0〜−3)は、ブロードキャストされたパラメータデータが入力されると(ST21)、三角形が自分が担当する領域であるか否かを判断し(ST22)、担当領域である場合には、ラスタライゼーションを行う(ST23)。
すなわち、ブロードキャストされたパラメータを受け取ると、その三角形が自分が担当する領域、たとえば4×4ピクセルの矩形領域単位でインターリーブされた領域に属しているか否かを判断し、属している場合には、各種データ(Z、テクスチャ座標、カラーなど)をラスタライズする。この場合、生成単位は、1ローカルモジュール当たり1サイクルで2×2ピクセルである。
【0050】
次に、テクスチャ座標のパースペクティブコレクション(Perspective Correction)を行う(ST24)。また、この処理ステージにはLOD(Level of Detail)計算によるミップマップ(MipMap)レベルの算出や、テクスチャアクセスのための(u,v)アドレス計算も含まれる。
【0051】
次に、テクスチャの読み出しを行う(ST25)。
この場合、各ローカルモジュール13−0〜13−3の処理ユニット131−0〜131−3は、図7に示すように、テクスチャリードの際に、まずは、ローカルキャッシュ133−0〜133−3のエントリーをチェックし(ST31)、エントリーがあった場合には(ST32)、必要なテクスチャデータを読み出す(ST33)。
必要とするテクスチャ・データがローカルキャッシュ133−0〜133−3内に無い場合には、各処理ユニット131−0〜131−3は、グローバルインターフェース134−0〜134−3を通して、グローバルモジュール12に対してローカルキャッシュフィルのリクエストを送る(ST34)。
そして、グローバルモジュール12は、要求されたブロックをリクエストを送出したローカルモジュールに返すが、なかった場合には上述したように(図5に関連付けて説明)、当該ブロックを保持するローカルモジュールに対してグローバルキャッシュフィルのリクエストを送る。その後ブロックデータをグローバルキャッシュにフィルするとともに、リクエストを送ってきたローカルモジュールに対してデータを送出する。
グローバルモジュール12から要求したブロックデータが送られてくると、該当するローカルモジュールは、ローカルキャッシュを更新し(ST35,ST36)、処理ユニットはブロックデータを読み出す(ST33)。
なお、ここでは、最大4テクスチャの同時処理を想定しており、読み出すテクスチャデータの数は、1ピクセルにつき16テクセルである。
【0052】
次に、テクスチャフィルタリング(Texture Filtering)を行う(ST26)。
この場合、処理ユニット133−0〜133−3は、読み出されたテクスチャデータと、(u,v)アドレスを算出時に得た小数部を使って4近傍補間などのフィルタリング処理を行う。
【0053】
次に、ピクセルレベルの処理(Per−Pixel Operation)を行う(ST27)。
この処理においては、フィルタリング後のテクスチャデータと、ラスタライズ後の各種データを用いて、ピクセル単位の演算が行われる。ここで行われる処理は、ピクセルレベルでのライティング(Per−Pixel Lighting)などいわゆるPixel Shaderに相当する。また、それ以外にも以下の処理が含まれる。
すなわち、アルファテスト、シザリング、Zバッファテスト、ステンシルテスト、アルファブレンディング、ロジカルオペレーション、ディザリングの各処理である。
【0054】
そして、ピクセルレベルの処理における各種テストをパスしたピクセルデータを、メモリモジュール132−0〜132−3、たとえば内蔵DRAMメモリ上のフレームバッファおよびZバッファに書き込まれる(ST28:Memory
Write)。
【0055】
次に、処理ユニット131−0〜131−3の画像処理の概要を図8のフローチャートに関連付けて説明する。
【0056】
画像処理を実行する前に、メモリモジュール132(−0〜−3)に画像データがロードされる。
そして、処理ユニット131(−0〜−3)では、画像処理に必要な読み出し(ソース:Source)アドレスおよび書き込み(デスティネーション:Destination)アドレスの生成に必要なコマンドやデータが入力される(ST41)。
そして、処理ユニット131(−0〜−3)において、ソースアドレスおよびデスティネーションアドレスが生成される(ST42)。
次に、ソース画像がメモリモジュール132(−0〜−3)から読み出され、あるいはグローバルモジュール12から供給され(ST43)、たとえばテンプレートマッチング等の所定の画像処理が行われる(ST44)。
そして、必要に応じて所定の演算処理が行われ(ST45)、その結果がメモリモジュール132(−0〜−3)のデスティネーションアドレスで指定された領域に書き込まれる(ST46)。
【0057】
各ローカルモジュール13−0〜13−3のローカルキャッシュ133−0〜133−3は、処理ユニット131−0〜131−3の処理に必要な描画データやテクスチャデータを格納し、処理ユニット131−0〜131−3とのデータの授受、並びにメモリモジュール132−0〜132−3とのデータの授受(書き込み、読み出し)を行う。
【0058】
図9は、各ローカルモジュール13−0〜13−3のローカルキャッシュ133−0〜133−3の構成例を示すブロック図である。
【0059】
ローカルキャッシュ133は、図9に示すように、リードオンリーキャッシュ(RO$)1331、リードライトキャッシュ(RW$)1332、リオーダバッファ(Reorder Buffer:RB)1333、およびメモリコントローラ(MC)1334を含む。
【0060】
リードオンリーキャッシュ1331は、演算処理のソース画像などを読み出すための読み出し専用キャッシュであって、たとえばテクスチャ系データ等の記憶に用いられる。
リードライトキャッシュ1332は、たとえばグラフィックス処理におけるリードモディファイライト(Read Modify Write )に代表される読み出しと書き込みの両方を必要とするオペレーションを実行するためのキャッシュであって、たとえば描画系データの記憶に用いられる。
【0061】
リオーダバッファ1333は、いわゆる待ち合わせバッファであり、ローカルキャッシュに必要なデータがない場合、ローカルキャッシュフィルのリクエストを出したときに、グローバルモジュール12に送られてくるデータの順番が異なる場合があるので、この順番を遵守し、処理ユニット131−0〜131−3に要求順に戻すようにデータの順番を調整する。
【0062】
また、図10は、メモリコントローラ1334のテクスチャ系の構成例を示すブロック図である。
このメモリコントローラ1334は、図10に示すように、4つのキャッシュCSH0〜CSH3に対応するキャッシュコントローラ13340〜13343と、各キャッシュコントローラ13340〜13343から出力されるローカルキャッシュフィルリクエストを調停しグローバルインターフェース134{−0〜3}に出力するアービタ13344と、グローバルインターフェース134{−0〜3}を介して入力したグローバルキャッシュフィルリクエストを受けて、データ転送の制御を行うメモリインターフェース13345を含む。
【0063】
また、キャッシュコントローラ13340〜13343は、4つのピクセルPX0〜PX3それぞれに対応するデータに対して4近傍補間を行う際に必要な各データの2次元アドレスCOuv00〜COuv03、COuv10〜COuv13、COuv20〜COuv23、COuv30〜COuv33を受けてアドレスの競合をチェックし分配するコンフリクトチェッカCC10と、コンフリクトチェッカCC10で分配されたアドレスをチェックしリードオンリーキャッシュ1331にアドレスで示されたデータが存在するか否かを判断するタグ回路TAG10と、キューレジスタQR10を有している。
タグ回路TAG10内は後述するバンクのインターリーブに関するアドレッシングに対応する4つのタグメモリBX10〜BX13を有し、リードオンリーキャッシュ1331に記憶されている。
ブロックデータのアドレスタグを保持するコンフリクトチェッカCC10で分配されたアドレスと上記アドレスタグを比較し、一致したか否かのフラグと前記アドレスをキューレジスタQR10にセットするとともに、一致しなかった場合には前記アドレスをアービタ13344に送出する。
アービタ13344は、キャッシュコントローラ13340〜13343から送出されるアドレスを受けて調停作業を行い、グローバルインターフェース(GAIF)134を介して同時に送出できるリクエストの数に応じてアドレスを選択し、ローカルキャッシュフィルリクエストとしてグローバルインターフェース(GAIF)134に出力する。
グローバルインターフェース(GAIF)134を介して送出されたローカルキャッシュフィルリクエストに対応してグローバルキャッシュ12からデータが送られてくると、リオーダバッファ1333にセットされる。
キャッシュコントローラ13340〜13343は、キューレジスタQRL0の先頭にあるフラグをチェックし、一致したことを示すフラグがセットされていた場合には、キューレジスタQRL0の先頭にあるアドレスに基づいて、リードオンリーキャッシュ1331のデータを読み出し、処理ユニット131に与える。一方、一致したことを示すフラグがセットされていなかった場合には、対応するデータがリオーダバッファ1333にセットされた時点でリオーダバッファ1333から読み出し、キューレジスタQRL0のアドレスに基づいて当該ブロックデータでリードオンリーキャッシュ1331を更新するとともに、処理ユニット131に出力する。
【0064】
次に、メモリモジュールとしてのDRAMと、ローカルキャッシュと、グローバルキャッシュのメモリ容量について説明する。
メモリ容量の関係は、当然のことながらDRAM>グローバルキャッシュ>ローカルキャッシュであるが、その割合については、アプリケーションに依存する。
キャッシュブロックサイズとしては、キャッシュフィル時に下位階層のメモリから読み出すデータサイズに相当する。
DRAMの特性として、ランダムアクセス時には性能が低下するが、同一行(ROW)に属するデータの連続アクセスは速いという点をあげることができる。
【0065】
グローバルキャッシュは、DRAMからデータを読み出す関係上、前記連続アクセスを行う方が性能上好ましい。
したがって、キャッシュブロックのサイズを大きく設定する。
たとえば、グローバルキャッシュのキャッシュブロックのサイズはDRAMマクロの1行分をブロックサイズにすることができる。
【0066】
一方、ローカルキャッシュの場合には、ブロックサイズを大きくすると、キャッシュに入れても、使われないデータの割合が増えることと、下位階層がグローバルキャッシュでDRAMでなく連続アクセスに必要性がないことから、ブロックサイズは小さく設定する。
ローカルキャッシュのブロックサイズとしては、メモリインターリーブの矩形領域のサイズに近い値が適当で、本実施形態の場合、4×4ピクセル分、すなわち512ビットとする。
【0067】
次に、テクスチャ圧縮について説明する。
1ピクセルの処理を行うのに複数のテクスチャデータを必要とするので、テクスチャ読み出しバンド幅がボトルネックになる場合が多いが、これを軽減するためテクスチャを圧縮する方法がよく採用される。
圧縮方法には、いろいろあるが、4×4ピクセルのように小さな矩形領域単位で圧縮/伸長できる方法の場合には、グローバルキャッシュには圧縮されたままのデータを置き、ローカルキャッシュには、伸長後のデータを置くことが好ましい。
【0068】
次に、ローカルモジュール13−0〜13−3の処理ユニット131−0〜131−3の具体的な構成例について説明する。
【0069】
図11は、本実施形態に係るローカルモジュールの処理ユニットの具体的な構成例を示すブロック図である。
【0070】
ローカルモジュール13(−0〜−3)の処理ユニット131(−0〜−3)は、図11に示すように、ラスタライザ(Rasterizer:RSTR)1311およびコア(Core)1312を有している。
これらの構成要素のうち、本アーキテクチャを実現する演算処理部がコア1312であり、コア1312はラスタライザ1311によりアドレスや座標等のグラフィックス処理および画像処理のための各種データが供給される。
【0071】
ラスタライザ1311は、グラフィックス処理の場合には、グローバルモジュール12からブロードキャストされたパラメータデータを受けて、たとえば三角形が自分が担当する領域であるか否かを判断し、担当領域である場合には、入力した三角形頂点データに基づいてラスタライゼーションを行い、生成したピクセルデータをコア1312に供給する。
ラスタライザ1311において生成されるピクセルデータには、ウィンドウ座標(X,Y,Z)、プライマリカラー(Primary Color:PC)(Rp,Gp,Bp,Ap)、セカンダリカラー(Secondary Color:SC)(Rs,Gs,Bs,As)、Fog係数(f)、テクスチャ座標、法線ベクトル、視線ベクトル、ライトベクトル((V1x,V1y,V1z),(V2x,V2y,V2z))等の各種データが含まれる。
なお、ラスタライザ1311からコア1312へのデータの供給ラインは、たとえばウィンドウ座標(X,Y,Z)の供給ラインと、他のプライマリカラー(Rp,Gp,Bp,Ap)、セカンダリカラー(Rs,Gs,Bs,As)、Fog係数(f)、テクスチャ座標(V1x,V1y,V1z)、および(V2x,V2y,V2z)の供給ラインとは、異なる配線により形成される。
【0072】
ラスタライザ1311は、画像処理の場合には、たとえばグローバルモジュール12を介して図示しない上位装置から出力された、メモリモジュール132(−0〜−3)から画像データを読み出すためのソースアドレスおよび画像処理結果を書き込むためのデスティネーションアドレスの生成に必要なコマンドやデータ、たとえば探索矩形領域の幅、高さデータ(Ws,Hs)、ブロックサイズデータ(Wbk,Hbk)を入力し、入力データに基づいて、ソースアドレス(X1s,Y1s)および/または(X2s,Y2s)を生成するとともに、デスティネーションアドレス(Xd,Yd)を生成し、コア1312に供給する。
画像処理時のラスタライザ1311からコア1312へのデータの供給ラインは、たとえばデスティネーションアドレス(Xd,Yd)に関してはグラフィックス処理時のウィンドウ座標(X,Y,Z)の供給ラインが共用され、ソースアドレス(X1s,Y1s),(X2s,Y2s)に関してはテクスチャ座標(V1x,V1y,V1z)、および(V2x,V2y,V2z)等の供給ラインが共用される。
【0073】
コア1312は、本アーキテクチャを実現する演算処理部であり、コア1312はラスタライザ1311により各種データが供給される。
コア1312は、ストリームデータに対して演算処理を行う以下の機能ユニットを有している。
すなわち、コア1312は、第1の機能ユニットとしてのグラフィックスユニット(Graphics Unit :GRU)13121、第3の機能ユニットとしてのピクセルエンジン(Pixel Engine:PXE)13122、および第2の機能ユニットとしてのピクセル演算プロセッサ(Pixel 0peration Processor :POP)群13123を有している。
コア1312は、たとえばデータフローグラフ(Data Flow Graph : DFG)に応じてこれらの機能ユニット間の接続を切り替えることにより様々なアルゴリズムに対応する。 さらに、コア1312は、レジスタユニット(Register Unit :RGU)13124、およびクロスバー回路(Interconnection X−Bar :IXB)13125を有している。
【0074】
グラフィックスユニット(GRU)13121は、グラフィックス処理を実行する際に、専用ハードウェアを付加することがコストパフォーマンス上明らかに有利なものをハードワイヤードロジックで実装している機能ユニットである。
グラフィックスユニット13121は、グラフィックス処理に関連するものとして、パースペクティブコレクション(Perspective Correction)、MIPMAPレベル算出等の機能を実装している。
【0075】
グラフィックスユニット13121は、クロスバー回路13125、レジスタユニット(RGU)13124を介してラスタライザ1311により供給されたテクスチャ座標(V1x,V1y,V1z)、および/またはラスタライザ1311またはピクセルエンジン(PXE)13122により供給されたテクスチャ座標(V2x,V2y,V2z)データを入力し、入力データに基づいて、パースペクティブコレクション、LOD(LevelofDetail)計算によるミップマップ(MIPMAP)レベルの算出、立方体マップ(Cube Map)の面選択や正規化テクセル座標(s,t)の算出処理を行い、たとえば正規化テクセル座標(s,t)およびLODデータ(lod)を含むグラフィックスデータ(s1,t1,lod1)および/または(s2,t2,lod2)をピクセル演算プロセッサ(POP)群13123に出力する。
なお、グラフィックスユニット13121の出力グラフィックスデータ(s1,t1,lod1),(s2,t2,lod2)は、クロスバー回路13125、レジスタユニット(RGU)13124を通して、あるいは図14中、破線で示すように、別の配線で直接的にピクセル演算プロセッサ(POP)群13123に供給される。
【0076】
第3の機能ユニットとしてのピクセルエンジン(PXE)13122は、ストリームデータ処理を行う機能ユニットであって、内部に複数の演算器を有する。ピクセルエンジン13122は、ピクセル演算プロセッサ(POP)群13123に比べて演算器間の接続自由度が高く、かつ演算器の機能も豊富である。
【0077】
ピクセルエンジン(PXE)13122は、描画対象に関する情報やピクセル演算プロセッサ(POP)群13123における演算結果を、たとえばクロスバー回路13125によりレジスタユニット(RGU)13124の所望のFIFOレジスタに設定された後、クロスバー回路13125を介さず、レジスタユニット(RGU)13124を介して直接的に供給される。
ピクセルエンジン(PXE)13122に入力されるデータとしては、たとえば描画する対象の表面に関する情報(面の方向、色、反射率、模様(テクスチャ)等)、表面にあたる光に関する情報(入射方向、強さなど)、過去の演算結果(演算の中間値)等が一般的である。
【0078】
ピクセルエンジン(PXE)13122は、複数の演算器を有し、たとえば外部からの制御により演算経路を再構成可能な演算ユニットであって、所望の演算を実現するように、内部の演算器間の電気的接続を確立し、レジスタユニット(RGU)13124を介して入力されたデータを、演算器と電気的接続網(インターコネクト)から形成される一連の演算器のデータパスに入力することで演算を行い、演算結果を出力する。
【0079】
すなわち、ピクセルエンジン13122は、再構成可能なデータパスをたとえば複数有し、演算器(加算器、乗算器、乗加算器等)を、電気的な接続網で接続し、複数個の演算器からなる演算回路を構成する。
そして、ピクセルエンジン13122は、このようにして再構成された演算回路に対して、連続してデータを入力し、演算を行うことが可能であり、たとえば二分木状のDFG(データフローグラフ)で表現される演算を、効率よくかつ少ない回路規模で実現できる接続網を使用して演算回路を構成することが可能である。
【0080】
図12は、ピクセルエンジン(PXE)13122の構成例を示すブロック図である。
本ピクセルエンジン(PXE)13122は、図12に示すように、演算器プール200を有する。
演算器プール200は、データバスBSによりストリームレジスタユニット13124とのデータの授受を行う少なくとも一つの(図12の例では4つの)演算部201〜204を有する。
各演算部201〜204は、複数(図12の例では8個)の演算器(加算器、乗算器、乗加算器等)OP1〜OP8と、演算器OP1〜OP8との間に電気的な接続を変更可能な接続回路網CCNを含む。
【0081】
すなわち、ピクセルエンジン(PXE)13122において各演算器OPの間に接続回路網演算器CCNが存在する。
このように、レジスタファイルを独立して持たせることで、回路量を削減できる。
【0082】
なお、図12の例では、各演算部201〜204は、データバスBS、クロスバー回路13125を介して個別にレジスタユニット(RGU)13124とのデータの授受を行うような構成となっているが、たとえば他の信号ラインで各演算部201〜204間を接続して、一の演算部の演算結果を他の演算部で用いて演算を行うように構成する等の態様も可能である。
【0083】
図13は、本発明に係る接続回路網CCNの構成例を示す図である。
接続回路網CCNの構成の特徴は、たとえば2n本の入力バスがある場合、n個の演算器は、レジスタユニット(RGU)13124からの入力一対と、前段(左側)の演算器の出力をセレクタで選択して自段の演算器に入力する。そして、残りの演算器は、レジスタユニット(RGU)13124からの入力すべてと、前段(左側)の出力を選択して演算器に入力する。
【0084】
図13の接続回路網CCNは、4対、8本の入力バスL11,L12、L21,L22、L31,L32、およびL41,L42を有する構成例である。
図13において、入力バスの所定の交差点において示す黒丸がセレクタを表している。図14に各セレクタの構成例を示す。
なお、図中の線は、束線(2本以上の信号線の集まり)を示している。
【0085】
また図13は、7つの演算器OP1〜OP7を有する構成例を示しており、並列に配置された演算器の入力から出力までをステージSTG1〜STG7(最終のステージ7の演算器OP7の出力はストリームレジスタファイルにデータが送られる)として次のような構成となっている。
【0086】
すなわち、第1ステージSTG1では、演算器OP1の入力に対して一対の入力バスL11,L12が接続され、演算器OP1の出力が次段以降(図13の例では第3ステージSTG3の入力側)に接続されている。
第2ステージSTG2では、演算器OP2の入力に対して一対の入力バスL21,L22が接続され、演算器OP2の出力が第3ステージSTG3の入力側に接続されている。
【0087】
第3ステージSTG3では、演算器OP3の入力に対して一対の入力バスL31,L32が接続され、演算器OP3の出力が第3ステージSTG4の入力側に接続されている。そして、入力バスL31,L32に対して第1ステージSTG1の演算器OP1の出力ラインおよび第2ステージSTG2の演算器OP2の出力ラインが交差しており、これら4つの交差点にぞれぞれ図14に示すセレクタSLCが配置されている。
【0088】
第4ステージSTG4では、演算器OP4の入力に対して一対の入力バスL41,L42が接続され、演算器OP4の出力が第5ステージSTG5の入力側に接続されている。そして、入力バスL41,L42に対して第1ステージSTG1の演算器OP1の出力ライン、第2ステージSTG2の演算器OP2の出力ラインおよび第3ステージSTG3の演算器OP3の出力ラインが交差しており、これら6つの交差点にぞれぞれ図13に示すセレクタSLCが配置されている。
【0089】
第5ステージSTG5では、演算器OP5に対してレジスタユニット(RGU)13124からの入力すべてと、第1〜第4ステージSTG1〜STG4の出力を選択して入力されるように、入力バスL42と入力バスL21,L22、L31,L32、L41との8つの交差点、並びに、第1ステージSTG1の演算器OP1の出力ライン、第2ステージSTG2の演算器OP2の出力ライン、第3ステージSTG3の演算器OP3の出力ライン、および第4ステージSTG4の演算器OP4の出力ラインが交差する8つの交差点にぞれぞれ図14に示すセレクタSLCが配置されている。
【0090】
第6ステージSTG6では、演算器OP6に対してレジスタユニット(RGU)13124からの入力すべてと、第1〜第5ステージSTG1〜STG5の出力を選択して入力されるように、入力バスL42と入力バスL21,L22、L31,L32、L41との8つの交差点、並びに、第1ステージSTG1の演算器OP1の出力ライン、第2ステージSTG2の演算器OP2の出力ライン、第3ステージSTG3の演算器OP3の出力ライン、第4ステージSTG4の演算器OP4の出力ライン、および第5ステージSTG5の演算器OP5の出力ラインが交差する10個の交差点にぞれぞれ図14に示すセレクタSLCが配置されている。
【0091】
第7ステージSTG7では、演算器OP7に対してレジスタユニット(RGU)13124からの入力すべてと、第1〜第6ステージSTG1〜STG6の出力を選択して入力されるように、入力バスL42と入力バスL21,L22、L31,L32、L41との8つの交差点、並びに、第1ステージSTG1の演算器OP1の出力ライン、第2ステージSTG2の演算器OP2の出力ライン、第3ステージSTG3の演算器OP3の出力ライン、第4ステージSTG4の演算器OP4の出力ライン、第5ステージSTG5の演算器OP5の出力ライン、および第6ステージSTG6の演算器OP6の出力ラインが交差する12個の交差点にそれぞれ図14に示すセレクタSLCが配置されている。
【0092】
ここで、本発明に係るピクセルエンジン(PXE)13122の演算実行の概略について、図15および図16に関連付けて説明する。
【0093】
たとえばデータA,B,C,Dをレジスタユニット(RGU)13124から読み、次式のYに相当する値をレジスタユニット(RGU)13124に書き込むという演算を複数回行う。
【0094】
【数1】
Y[i]=(A[i]+B[i])×(C[i]+D[i])
【0095】
図15は、式(1)に示す演算のDFG(データフローグラフ)を示す。
【0096】
演算1を実行する機能を有する演算器OP1と、データAに相当する値が出力されるレジスタファイル2011の出力を、枝0に相当する電気的接続経路である接続0で接続する。
同様に、枝1〜3に相当する接続1から3により、レジスタユニット(RGU)13124のデータBに相当する出力を演算器OP1に、データC,Dに相当する出力を演算器OP2に接続する。
演算器OP1の出力を枝4に相当する接続4で、また演算器OP2の出力を枝5に相当する接続5で、それぞれ演算3を実行する機能を有する演算器OP3の入力に接続する。
演算器OP3の出力を、枝6に相当する接続6を経由してレジスタファイル2011に入力し、Yに相当する値を書き込む経路を確立する。
【0097】
このようにして、レジスタファイル、演算器の電気的接続を実現し、レジスタファイルから、A[i],B[i],C[i],D[i]に相当するデータを順次読み出し、演算を実行することで、複数個のA〜Dに対する演算が効率よく実現される。
このようにして実現されるピクセルエンジン(PXE)13122では、演算器間の電気的接続を変更することで、異なる演算に容易に対応できる。
図13の構成の場合、演算器OP1〜OP3が用いられ、接続0および接続1は入力バスL11,L12に相当し、接続2および接続3は入力バスL21,L22に相当する。
図13中に示すセレクタSLC1で演算器OP1の演算結果を演算器OP3に入力させる接続4を形成し、セレクタSLC2で演算器OP2の演算結果を演算器OP3に入力させる接続5を形成する。
そして、演算器OP3の演算結果をそのままレジスタユニット(RGU)13124に出力するための接続6を形成する。
【0098】
以上の演算は、図17に示すようなパイプライン処理で実行される。
なお、図17(A)はクロックを示し、図17(B)のRRはレジスタユニット(RGU)13124からデータA〜Dの読み出し処理を示し、図17(C),(E),(G)のICは接続網CCN経由でのデータ転送処理を示し、図17(D)のAdd1/0は演算器OP1、OP2による演算処理を示し、図17(F)のmulは演算器OP3よる演算処理を示し、図17(H)のWBはレジスタユニット(RGU)13124への演算結果の書き込み処理を示している。
【0099】
本実施形態に係るピクセルエンジン(PXE)13122は、上述したようにデータパスを動的に再構築可能である。
これにより、ピクセルエンジン(PXE)13122は、演算回路を使用して、演算をパイプライン状に実行している際に、演算器間の電気的接続を変更することが可能である。
また、前記のように動的に演算器間の構成を変更することで、遅滞なく異なる演算が行える。
【0100】
また、ピクセルエンジン(PXE)13122は、個々の演算器に対して付加されている制御回路が、次に行うべき演算に関する情報を保持し、一連の演算の終了を検出した際に、自動的に次の演算に向けた制御に切り替える機能を有する。
そして、ピクセルエンジン(PXE)13122では、接続網CCNの個々の接続点に対し付与された制御回路が、次にとるべき接続構成に関する情報を保持し、一連のデータ転送の終了を検出した際に、個々の制御回路が自動的に接続点を制御を切り替える機能を有する。
【0101】
次に、動的再構築の実現方法について説明する。
【0102】
動的再構築の実現方法1
まず、図18および図19に関連付けて動的再構築の第1の実現方法について説明する。
この場合、図18に示すように、各演算器OP、接続網制御回路CCNに対する制御回路301は、現在の制御情報(現制御情報)CIFMと、次に行うべき制御に関する情報(次制御情報)NIFMの2つを保持する。
そして、演算データOPDTは、それが演算に使用する最終データであることが識別可能な制御信号CTLと同期して送られてくる。
制御回路301は、最終データであることが識別された場合、現在実行中の演算の完了と同時に、現制御情報CIFMを次制御情報NIFMで書き換える。
これにより、演算回路の制御を変更することが可能であり、異なる演算を実行することが可能となる。
【0103】
接続回路網CCNに関しても同様であり、図19に示すように、制御信号CTLにより最終データであることが識別された場合、制御回路301は、現在実行中のデータ転送の完了と同時に、現制御情報CIFMを次制御情報NIFMで書き換える。
これにより、接続回路網の制御を変更することが可能であり、異なる電気的接続を実現することが可能となる。
【0104】
次に、図20〜図22に関連付けて動的再構築の第2の実現方法について説明する。
【0105】
動的再構築の実現方法2
前述したようなな、演算回路と接続回路網からなる演算装置を使用して、異なる演算を連続して実行する場合、図20に示すように、演算1と演算2が時間的に重複する区間(演算1と演算2の重複区間)が生じる。
この間、演算回路と接続回路網上には異なる演算に対するデータが同時に存在する。
この区間では、演算1の最終データが、演算回路上に存在する一方で、一部の回路は演算2に対応する制御が行われている。
そのため、演算1の最終データが、演算2を行っている演算器または、演算2に対応する制御となっている接続網制御回路に到達した場合、それらが演算の終了と認識して演算2に対する制御から演算3に対する制御に切り替わり、以後の残りの演算2に対する演算が正常に行われない可能性がある。
これに対処した動的再構築の実現例を以後述べる。
【0106】
この場合、図21に示すように、各演算器OP、接続網制御回路CCNに対する制御回路301は、現在の制御情報(現制御情報)CIFMと現在実行中の演算を識別するための情報(現識別情報)CDSCと、次に行うべき制御に関する情報(次制御情報)NIFMと、次に実行する演算を識別するための情報(次識別情報)NDSCを保持する。
演算データOPDTは、それが、演算に使用する最終データであることが識別可能な情報、およびそのデータが演算1に対するものか、演算2に対するものかを識別可能な情報を示す制御信号CTLと同期して送られてくる。
制御回路301は、送られてきたデータが、最終データであり、かつ現識別情報CDSCで示される演算に対するものであることが識別された場合、現在実行中の演算の完了と同時に、現制御情報CIFM、現識別情報CDSCをそれぞれ次制御情報NIFM、次識別情報NDSCで書き換える。
これにより、継続して入力されてくるストリームデータに対し、異なる演算に適切なタイミングで切り替えることが可能となる。
【0107】
接続回路網CCNに関しても同様であり、図22に示すように、現在実行中のデータ転送の完了と同時に、現制御情報CIFM、現識別情報IDSCをそれぞれ次制御情報NIFM、次識別情報NDSCで書き換える。
これにより、継続して入力されてくるデータに対し、異なる電気的接続に適切なタイミングで切り替えることが可能となる。
【0108】
図23は、ピクセルエンジン(PXE)13122の好適な構成例、およびレジスタユニット(RGU)13124、クロスバー回路13125との接続例を示す図である。
【0109】
このピクセルエンジン(PXE)13122は、図23に示すように、2または3入力MAC(Multiply and Accumulator)を基本とした複数(図23の例では16個)の演算器OP1〜OP8,OP11〜OP18と、1または複数(図23の例では4個)ルックアップテーブルLUT1,LUT2、LUT11,LUT12とを有している。
【0110】
図23に示すように、ピクセルエンジン(PXE)13122内の各演算器OP1〜OP8,OP11〜OP18の2本の入力は、レジスタユニット(RGU)13124のFIFO(First−IN First−Out) レジスタFREGと直結している。
同様に、ルックアップテーブルLUT1,LUT2、LUT11,LUT12の1本の入力はレジスタユニット(RGU)13124のFIFOレジスタFREGと直結している。
そして、各演算器OP1〜OP8,OP11〜OP18およびルックアップテーブルLUT1,LUT2、LUT11,LUT12の出力は、クロスバー回路13125に接続されている。
【0111】
さらに、図23の例では、演算器OP1の出力が演算器OP3,OP4の2入力および3入力演算器OP2の1入力にそれぞれ接続されている。同様に、演算器OP2の出力が演算器OP4の2入力および3入力演算器OP3の1入力にそれぞれ接続されている。また、演算器OP3の出力が3入力演算器OP4の1入力に接続されている。
演算器OP5の出力が演算器OP7,OP8の2入力および3入力演算器OP6の1入力にそれぞれ接続されている。同様に、演算器OP6の出力が演算器OP8の2入力および3入力演算器OP7の1入力にそれぞれ接続されている。また、演算器OP7の出力が3入力演算器OP8の1入力に接続されている。
さらに、演算器OP11の出力が演算器OP13,OP14の2入力および3入力演算器OP12の1入力にそれぞれ接続されている。同様に、演算器OP12の出力が演算器OP14の2入力および3入力演算器OP13の1入力にそれぞれ接続されている。また、演算器OP13の出力が3入力演算器OP14の1入力に接続されている。
演算器OP15の出力が演算器OP17,OP18の2入力および3入力演算器OP16の1入力にそれぞれ接続されている。同様に、演算器OP16の出力が演算器OP18の2入力および3入力演算器OP17の1入力にそれぞれ接続されている。また、演算器OP17の出力が3入力演算器OP18の1入力に接続されている。
【0112】
このように、図23のピクセルエンジン(PXE)13122内においては、演算器OP1の出力がフォワーディングパスにより演算器OP2,OP3、OP4に接続されており、演算器OP2,OP3、OP4は、演算器OP1の出力をソースオペランドとして参照可能である。
演算器OP2の出力がフォワーディングパスにより演算器OP3、OP4に接続されており、演算器OP3、OP4は、演算器OP2の出力をソースオペランドとして参照可能である。
演算器OP3の出力がフォワーディングパスにより演算器OP4に接続されており、演算器OP4は、演算器OP3の出力をソースオペランドとして参照可能である。
演算器OP5の出力がフォワーディングパスにより演算器OP6,OP7、OP8に接続されており、演算器OP6,OP7、OP8、演算器OP5の出力をソースオペランドとして参照可能である。
演算器OP6の出力がフォワーディングパスにより演算器OP7、OP8に接続されており、演算器OP7、OP8は、演算器OP6の出力をソースオペランドとして参照可能である。
演算器OP7の出力がフォワーディングパスにより演算器OP8に接続されており、演算器OP8は、演算器OP7の出力をソースオペランドとして参照可能である。
同様に、演算器OP11の出力がフォワーディングパスにより演算器OP12,OP13、OP14に接続されており、演算器OP12,OP13、OP14は、演算器OP11の出力をソースオペランドとして参照可能である。
演算器OP12の出力がフォワーディングパスにより演算器OP13、OP14に接続されており、演算器OP13、OP14は、演算器OP12の出力をソースオペランドとして参照可能である。
演算器OP13の出力がフォワーディングパスにより演算器OP14に接続されており、演算器OP14は、演算器OP13の出力をソースオペランドとして参照可能である。
演算器OP15の出力がフォワーディングパスにより演算器OP16,OP17、OP18に接続されており、演算器OP16,OP17、OP18、演算器OP15の出力をソースオペランドとして参照可能である。
演算器OP16の出力がフォワーディングパスにより演算器OP17、OP18に接続されており、演算器OP17、OP18は、演算器OP16の出力をソースオペランドとして参照可能である。
演算器OP17の出力がフォワーディングパスにより演算器OP18に接続されており、演算器OP18は、演算器OP17の出力をソースオペランドとして参照可能である。
また、ルックアップテーブルLUT1,LUT2、LUT11,LUT12は、たとえば任意に定義可能なRAM−LUTであり、1コンテキストでは最大L(L:同時参照可能なテーブル数)個まで参照可能である。ルックアップテーブルLUT1,LUT2、LUT11,LUT12には、たとえばsin/cos等の初等関数等が保持される。
【0113】
以上の構成において、ピクセルエンジン(PXE)13122とレジスタユニット(RGU)13124間の接続数に関しては、ピクセルエンジン(PXE)13122からクロスバー回路(IBX)13125への接続数CN1は次のようになる。
【0114】
【数2】
CN1=(演算器数+同時参照可能なLUT数)×1
【0115】
また、レジスタユニット(RGU)13124からピクセルエンジン(PXE)13122への接続数CN2は次のようになる。
【0116】
【数3】
CN2=演算器数×2+同時参照可能なLUT数×1
【0117】
以上の構成を有するピクセルエンジン(PXE)13122は、たとえばグラフィックス処理時に、クロスバー回路13125を介してレジスタユニット(RGU)13124の所望のFIFOレジスタに設定され、FIFOレジスタから直接的に入力されたピクセル演算プロセッサ(POP)群13123における演算結果データ(TR1,TG1,TB1,TA1)および(TR2,TG2,TB2,TA2)、並びに、ラスタライザ1311によりレジスタユニット(RGU)13124の所望のFIFOレジスタに設定され、FIFOレジスタから直接的に入力されたプライマリカラー(PC)、セカンダリカラー(SC)、Fog係数(F)に基づいて、たとえばピクセルシェーダ(Pixel Shader)のような演算を行い、色データ(FR1,FG1,FB1)および混合値(ブレンド値:FA1)を求める。
ピクセルエンジン(PXE)13122は、このデータ(FR1,FG1,FB1,FA1)を、クロスバー回路13125、レジスタユニット(RGU)13124を介して、ピクセル演算プロセッサ(POP)群13123の所定のPOP内あるいは別個に設けられたライトユニットWUに転送する。
【0118】
ピクセル演算プロセッサ(POP)群13123は、メモリバンド幅を活かした高並列の演算処理を行う機能ユニットであるPOPを複数、本実施形態ではたとえば図24に示すように、POP0〜POP3の4個を有する。
各POPは、並列に配列されたPOPE(Pixel Operation Processing Element)と呼ばれる複数の演算器を有している。また、メモリに対するアドレス生成機能も有する。
ピクセル演算プロセッサ(POP)群13123とキャッシュ間は広いバンド幅で接続されており、かつメモリアクセスのためのアドレス生成機能を内蔵しているので、演算器の演算能力を最大限引き出すだけのストリームデータの供給が可能である。
【0119】
ピクセル演算プロセッサ(POP)群13123は、グラフィックス処理時には、たとえば以下の処理を行う。
たとえばグラフィックスユニット(GRU)13121から直接的に供給された(s1,t1,lod1),(s2,t2,lod2)の値に基づいて、テクスチャアクセスのための(u,v)アドレス計算を行い、アドレスデータ(ui,vi,lodi)に基づいて4近傍フィルタリングを行うための4近傍の(u,v)座標、すなわち、(u0,v0),(u1,v1),(u2,v2),(u3,v3)を計算してメモリコントローラMCに供給して、メモリモジュール132から所望のテクセルデータをたとえばリードオンリーキャッシュRO$を通して各POPEに読み出す。
また、ピクセル演算プロセッサ(POP)群13123は、係数生成のためのデータ(uf,vf,lodf)に基づいてテクスチャフィルタ係数Kを計算して各POPEに供給する。
そして、ピクセル演算プロセッサ(POP)群13123の各POPにおいて、色データ(TR,TG,TB)および混合値(ブレンド値:TA)を求め、(TR,TG,TB,TA)をクロスバー回路13125、レジスタユニット(RGU)13124を介してピクセルエンジン(PXE)13122に転送する。
【0120】
一方、ピクセル演算プロセッサ(POP)群13123は、画像処理時には、たとえば以下の処理を行う。
ピクセル演算プロセッサ(POP)群13123は、たとえばラスタライザ1311で生成されてレジスタユニット(RGU)13124に設定され、グラフィックスユニット(GRU)13121を素通りしてクロスバー回路13125を介さずに直接的に供給されたソースアドレス(X1s,Y1s)および(X2s,Y2s)に基づいて、たとえばリードオンリーキャッシュRO$および/またはリードライトキャッシュRW$を介して、メモリモジュール132に記憶されている画像データを読み出し、読み出しデータに対して所定の演算処理を行って、演算結果をクロスバー回路13125、レジスタユニット(RGU)13124を介してライトユニットWUに転送する。
【0121】
なお、上述した機能を有するPOPのさらに具体的な構成については、後で詳述する。
【0122】
レジスタユニット(RGU)13124は、コア1312内の各機能ユニットで処理されるストリームデータを格納するFIFO構造のレジスタファイルである。
また、ハードウェアリソースの関係で、DFGを複数のサブDFG(Sub−DFG)に分割して実行しなければならない場合に、サブDFG間の中間値格納バッファとしても機能する。
図23に示すように、レジスタユニット(RGU)13124内のFIFOレジスタFREGの出力と機能ユニットであるピクセルエンジン(PXE)13122、ピクセル演算プロセッサ(POP)群13123の各演算器の入力ポートとは、1対1に対応する。
【0123】
クロスバー回路13125は、コア1312が、DFGに応じて機能ユニット間の接続を替えることにより様々なアルゴリズムに対応可能なように、この接続切り替えを実現する。
上述したように、レジスタユニット(RGU)13124内のFIFOレジスタFREGの出力と機能ユニットの入力ポートは固定で1対1に対応するが、機能ユニットの出力ポートとレジスタユニット(RGU)13124内のFIFOレジスタFREGの入力をクロスバー回路13125で切り替える。
【0124】
図25は、POP(ピクセル演算プロセッサ)とメモリ間の接続形態およびPOPの構成例を示す図である。
なお、図25の例は、各POP(0〜3)は、並列に配列された4個の演算器POPE0〜POPE3を有する場合である。
【0125】
また、本実施形態においては、ローカルモジュール13(−0〜−3)のメモリモジュール132(−0〜−3)には画像データが記憶されるが、ローカルモジュール13(−0〜−3)は、POP(0〜3)とメモリモジュール132間にそれぞれ分割ローカルキャッシュD133(−0〜−3)を有している。
このような構成において、POP0〜3でピクセルレベルの並列演算処理を行う場合、画像データのアクセスには、次の2通りの方法がある。
第1は、メモリモジュール132に格納されている画像データを直接読み出して演算を行う方法である。
第2は、メモリモジュール132に格納されている画像データのうち、演算に必要とされる一部のデータをローカルキャッシュ133に格納し、ローカルキャッシュ133のデータを読み出して演算を行う方法である。
【0126】
本実施形態においては、上述した第2の方法を採用している。
ローカルキャッシュ133は、POP(0〜3)の各POPE0〜POPE3に対応してそれぞれリードオンリーキャッシュRO$0〜RO$3、並びに、リードライトキャッシュRW$0〜RW$3が配置されている。
【0127】
また、ローカルキャッシュ133は、図25に示すように、セレクタSEL1〜SEL12を有する。
セレクタSEL1〜SEL4は、メモリモジュール132の対応するリードラインポートp(0)〜p(3)からの32ビット幅の読み出しデータまたは他のポートからの読み出しデータのいずれかを選択して、リードライトキャッシュRW$0〜RW$3およびセレクタSEL9〜SEL12に出力する。
セレクタSEL5は、POPのPOPE0の演算結果またはライトユニットWUの処理結果のいずれかを選択してリードライトキャッシュRW$0に供給する。
セレクタSEL6は、POPのPOPE1の演算結果またはライトユニットWUの処理結果のいずれかを選択してリードライトキャッシュRW$1に供給する。
セレクタSEL7は、POPのPOPE2の演算結果またはライトユニットWUの処理結果のいずれかを選択してリードライトキャッシュRW$2に供給する。
セレクタSEL8は、POPのPOPE3の演算結果またはライトユニットWUの処理結果のいずれかを選択してリードライトキャッシュRW$3に供給する。
セレクタSEL9は、セレクタSEL1によるデータまたはグローバルモジュール12により転送されたデータのいずれかを選択してリードオンリーキャッシュRO$0に供給する。
セレクタSEL10は、セレクタSEL2によるデータまたはグローバルモジュール12により転送されたデータのいずれかを選択してリードオンリーキャッシュRO$1に供給する。
セレクタSEL11は、セレクタSEL3によるデータまたはグローバルモジュール12により転送されたデータのいずれかを選択してリードオンリーキャッシュRO$2に供給する。
セレクタSEL12は、セレクタSEL4によるデータまたはグローバルモジュール12により転送されたデータのいずれかを選択してリードオンリーキャッシュRO$3に供給する。
【0128】
各POP(0〜3)は、並列に配列された4個の演算器POPE0〜POPE3に加えて第4の機能ユニットとしてのライトユニットWU、フィルタ機能ユニットFFU、出力選択回路OSLC、およびアドレス生成器AGを有している。
【0129】
ライトユニットWUは、グラフィックス処理の場合には、レジスタユニット(RGU)13124からのソースデータ、具体的には色データ(RGB)および混合値データ(A)、並びに奥行きデータ(Z)と、リードライトキャッシュRW$からのデスティネーション色データ(RGB)および混合値データ(A)、並びに奥行きデータ(Z)に基づいて、αブレンディング、各種テスト、ロジカルオペレーションといったグラフィックス処理のピクセル書き込みに必要な演算を行い、演算結果をリードライトキャッシュRW$に書き戻す。
また、ライトユニットWUは、画像処理の場合には、ピクセル演算プロセッサ(POP)群13123による演算結果のデータを、たとえばレジスタユニット(RGU)13124の特定のFIFOレジスタから直接的に入力したデスティネーションアドレス(Xd,Yd)に、リードライトキャッシュRW$を介してメモリモジュール132に格納する。
【0130】
なお、図25の例では、ライトユニットWUを各POPに設けている例を示しているが、一つのPOPのみに設けて複数の分割ローカルキャッシュD133に供給する、あるいは2個のPOPに対して一つを設けて対応する分割ローカルキャッシュD133に供給する、あるいはPOPとは別個に設ける等、種々の態様で構成可能である。
【0131】
フィルタ機能ユニットFFUは、各POPE0〜POPE3にレジスタユニットレジスタ(RGU)13124のFIFOレジスタにセットされる演算用パラメータ、具体的には、レジスタユニット(RGU)13124を介して、あるいはグラフィックスユニット(GRU)13121から直接的に供給された(s,t,lod)の値に基づいて、(u,v)アドレス計算を行い、アドレスデータ(si,ti,lodi)をアドレス生成器AGに出力し、係数生成のためのデータ(sf,tf,lodf)に基づいてテクスチャフィルタ係数Kを算出し、算出したフィルタ係数を対応する各POPE0〜POPE3に供給する。
【0132】
アドレス生成器AGは、フィルタ機能ユニットFFUにより供給されたアドレスデータ(si,ti,lodi)に基づいて4近傍フィルタリングを行うための4近傍の(u,v)座標、すなわち、(u0,v0),(u1,v1),(u2,v2),(u3,v3)を計算し、メモリコントローラMCに供給する。
【0133】
なお、メモリコントローラMCは、リードオンリーキャッシュRO$をグローバルバスから送られるデータのローカルキャッシュとして用いる場合には、(u,v)座標を基に物理アドレスを計算し、キャッシュヒット、グローバルバスへのリクエスト送出、リードオンリーキャッシュRO$フィルなどを行い、リードオンリーキャッシュRO$から対応するPOPにデータを送出させる。
メモリコントローラMCは、リードライトキャッシュRW$をメモリモジュール132への書き込みキャッシュとして用いる場合には、デスティネーションアドレス(Xd,Yd)を基に物理アドレスを計算し、キャッシュ、メモリモジュール132への書き戻し制御を行う。
【0134】
POPE0は、リードオンリーキャッシュRO$0またはリードライトキャッシュRW$0から読み出された32ビット幅のデータおよびフィルタ機能ユニットFFUによる演算パラメータ(たとえばフィルタ係数)を受けて所定の演算(たとえば加算)を行って、演算結果を次段のPOPE1に出力する。また、POPE0は、この所定の演算結果を出力選択回路OSLCに出力する8ビット×4の出力ラインOTL0を有する。
また、POPE0は、クロスバー回路13125を転送され、レジスタユニット(RGU)13124に設定されたデータを受けて所定の演算を行い、この演算結果を分割ローカルキャッシュD133(0)のセレクタSEL5を介してリードライトキャッシュRW$0に出力する。
【0135】
POPE1は、リードオンリーキャッシュRO$1またはリードライトキャッシュRW$1から読み出された32ビット幅のデータおよびフィルタ機能ユニットFFUによる演算パラメータを受けて所定の演算(たとえば加算)を行い、この演算結果とPOPE0により演算結果を加算して次段のPOPE2に出力する。また、POPE1は、この所定の演算結果を出力選択回路OSLCに出力する8ビット×4の出力ラインOTL1を有する。
また、POPE1は、クロスバー回路13125を転送され、レジスタユニット(RGU)13124に設定されたデータを受けて所定の演算を行い、この演算結果を分割ローカルキャッシュD133(0)のセレクタSEL6を介してリードライトキャッシュRW$1に出力する。
【0136】
POPE2は、リードオンリーキャッシュRO$2またはリードライトキャッシュRW$2から読み出された32ビット幅のデータおよびフィルタ機能ユニットFFUによる演算パラメータを受けて所定の演算(たとえば加算)を行い、この演算結果とPOPE1により演算結果を加算して次段のPOPE3に出力する。また、POPE2は、この所定の演算結果を出力選択回路OSLCに出力する8ビット×4の出力ラインOTL2を有する。
また、POPE2は、クロスバー回路13125を転送され、レジスタユニット(RGU)13124に設定されたデータを受けて所定の演算を行い、この演算結果を分割ローカルキャッシュD133(0)のセレクタSEL7を介してリードライトキャッシュRW$2に出力する。
【0137】
POPE3は、リードオンリーキャッシュRO$3またはリードライトキャッシュRW$3から読み出された32ビット幅のデータおよびフィルタ機能ユニットFFUによる演算パラメータを受けて所定の演算(たとえば加算)を行い、この演算結果とPOPE2により演算結果を加算して、この演算結果(一つのPOP内の総計)を8ビット×4の出力ラインOTL3により出力選択回路OSLCに出力する。
また、POPE3は、クロスバー回路13125を転送され、レジスタユニット(RGU)13124に設定されたデータを受けて所定の演算を行い、この演算結果を分割ローカルキャッシュD133(0)のセレクタSEL8を介してリードライトキャッシュRW$3に出力する。
【0138】
図26は、本実施形態に係るPOPE(0〜3)の具体的な構成例を示す回路図である。
本POPEは、図26に示すように、マルチプレクサ(MUX)401〜405、加減算器(addsub)406、乗算器(mul)407、加減算器(addsub)408、および積算レジスタ409を有している。
【0139】
マルチプレクサ401は、レジスタユニット(RGU)13124によるデータ、フィルタ機能ユニットFFUによる演算パラメータ、リードオンリーキャッシュRO$(0〜3)、またはリードライトキャッシュRW$(0〜3)から読み出されたデータのうちの一つを選択して、加減算器406に供給する。
【0140】
マルチプレクサ402は、レジスタユニット(RGU)13124によるデータ、リードオンリーキャッシュRO$(0〜3)、またはリードライトキャッシュRW$(0〜3)から読み出されたデータのうちの一つを選択して、加減算器406に供給する。
【0141】
マルチプレクサ403は、レジスタユニット(RGU)13124によるデータ、フィルタ機能ユニットFFUによる演算パラメータ、リードオンリーキャッシュRO$(0〜3)、またはリードライトキャッシュRW$(0〜3)から読み出されたデータのうちの一つを選択して、乗算器407に供給する。
【0142】
マルチプレクサ404は、前段のPOPE(0〜2)の演算結果または積算レジスタ409の出力データのうちのいずれかを選択して加減算器408に供給する。
【0143】
マルチプレクサ405は、レジスタユニット(RGU)13124によるデータ、フィルタ機能ユニットFFUによる演算パラメータ、リードオンリーキャッシュRO$(0〜3)、またはリードライトキャッシュRW$(0〜3)から読み出されたデータのうちの一つを選択して、加減算器408に供給する。
【0144】
加減算器406は、マルチプレクサ401の選択データとマルチプレクサ402の選択データを加算(減算)して、乗算器407に出力する。
乗算器407は、加減算器406の出力データとマルチプレクサ403の選択データを乗算器して、加減算器408に出力する。
加減算器408は、乗算器407と出力データ、マルチプレクサ404の選択データ、マルチプレクサ405の選択データを加算(減算)して積算レジスタ409に出力する。
そして、積算レジスタ409の保持されたデータが、各POPEの演算結果ととして、出力選択回路OSLCおよび次段のPOPE(1〜3)に出力される。
【0145】
出力選択回路OSLCは、各POPE0〜P0PE3の出力ラインOTL0〜OTL3を転送された演算データのうちのいずれかの演算データを選択して、クロスバー回路13125に出力する機能を有する。
本実施形態では、出力選択回路OSLCは、一つのPOP内の総計を出力するPOPE3の出力ラインOTL3を転送された演算データを選択し、クロスバー回路13125に出力するように構成されている。
クロスバー回路13125に出力された演算データは、レジスタユニット13124に設定され、この設定データがクロスバー回路13125を介さずに直接的にピクセルエンジン13122の所定の演算器に供給される。
【0146】
アドレス生成器AGは、図27に示すように、メモリモジュール132からのデータ転送は、1列(4つのPOP分)同時に行われ、各分割ローカルキャッシュD133(0)〜D133(3)の各リードオンリーキャッシュRO$0〜RO$3またはリードライトキャッシュRW$0〜RW$3へのアクセスは、独立して行われることから、各リードオンリーキャッシュRO$0〜RO$3またはリードライトキャッシュRW$0〜RW$3に、メモリモジュール132のポートp(0)〜p(3)から並列的に読み出されている要素データを、対応するPOPE0〜POPE3に読み出すためのキャッシュアドレスCADR0〜CADR3をそれぞれ生成し、供給する。
アドレス生成器AGは、たとえばPOPE0の演算結果OPR0が、POPE1の演算が終了するタイミングでPOPE1に供給され、POPE1の演算結果(POPE0の演算結果OPR0を加算した結果)OPR1が、POPE2の演算が終了するタイミングでPOPE2に供給され、POPE2の演算結果(POPE1の演算結果OPR1を加算した結果)OPR2が、POPE3の演算が終了するタイミングでPOPE3に供給されるように、各リードオンリーキャッシュRO$0〜RO$3またはリードライトキャッシュRW$0〜RW$3に所定タイミングをずらしてキャッシュアドレスCADR0〜CADR3を供給する。たとえば各POPE0〜POPE3に供給される要素データ数が同じであり、各POPE0〜POPE3で要素データを順に加算して行く場合には、アドレス供給タイミングを1アドレスずつ順にずらしてアドレス供給が行われる。
これにより、ミスのない演算を効率的に行える。すなわち、本実施形態に係るコア1312では、演算効率の向上が図られている。
【0147】
次に、上記構成を有するピクセル演算プロセッサ群13123、およびローカルキャッシュ133を用いた2次元画像処理の一つであるテンプレートマッチングの処理について説明する。
【0148】
図28は、テンプレートマッチングについて説明するための図である。
図28(A)に示す画像は対象画像OBIMで、図中MPで示す枠が前フレームマッチ位置であり、SRCで示す枠がサーチ範囲である。この対象画像OBIMは、マッチング処理の際、サーチ範囲SRC内でマッチするまで変化する。対象画像OBIMは、たとえばメモリモジュール132に格納される。
図28(B)に示す画像は参照画像RFIMで、マッチングの際には変化せず、たとえばメモリモジュール132に格納され、あるいはグローバルバスを介してグローバルモジュール12からリードオンリーキャッシュRO$に供給される。本実施形態においては、参照画像RFIMのサイズは16ピクセル×16ピクセルである。
また、図28(C)はマスクを示している。
【0149】
テンプレートマッチングを行う場合、参照画像RFIMと対象画像OBIMとの絶対値差分を1つの演算器POPEで得る必要があることから、1つのPOPEにつき2つのキャッシュ、すなわち、図26に示すように、各POPE0〜POPE3に対応して設けられた、リードオンリーキャッシュRO$(0〜3)とリードライトキャッシュRW$(0〜3)の2つのキャッシュを利用する。
たとえば図29に示すように、変化せずリフィルが不要な16×16ピクセルの参照画像RFIMをリードオンリーキャッシュRO$(0〜3)に格納する。一方、変化し、必要に応じてリフィルが必要な対象画像OBIM(たとえばeDRAMに格納されている)をリードライトキャッシュRW$(0〜3)に格納する。
【0150】
このテンプレートマッチングの場合、図26に示すPOPEにおいては、たとえばマルチプレクサ401でリードライトキャッシュRW$(0〜3)から読み出された対象画像OBIMを選択し、マルチプレクサ402でリードオンリーキャッシュRO$(0〜3)から読み出された参照画像RFIMを選択し、加減算器406で両画像の差分を求める。
また、マルチプレクサ403でフィルタ機能ユニットFFUによる演算パラメータ(係数)を選択し、乗算器407で加減算器406の演算結果に係数を乗算する。
そして、加減算器408でマルチプレクサ404で選択された自段の演算結果を積和していき、初段のPOPE0から自段の総和結果を次段のPOPE1に出力する。
またに、初段のPOPE0を除くPOPE1〜POPE3では、自段の総和結果に、マルチプレクサ404で選択された前段のPOPE0〜2の総和結果を加算して、次段のPOPE2〜POPE3に出力する。
【0151】
次に、メモリのデータに基づいてピクセル演算プロセッサ群13123で演算処理を行い、さらにピクセルエンジン13122で演算を行うテンプレートマッチングの動作について、図30〜図34に関連付けて説明する。
【0152】
ステップST51
まず、ステップST51において、参照画像OBIMがメモリモジュール(eDRAM)からローカルキャッシュ133のリードライトキャッシュRW$0〜RO$3へ1列(4つのPOP分)同時に転送される。また、参照画像RFIMがグローバルバスを介して各リードオンリーキャッシュRO$0〜RO$3に転送される。
次に、図32(A),(C),(E),(G)に示すように、アドレス生成器AGにより各キャッシュに独立に、かつ、1POP内のPOPE0〜POPE3に1アドレスずつ順にずらしてキャッシュアドレスCADR0〜CADR3の供給が行われる。
これにより、各POP0〜POP3の各POPE0〜POPE3に参照画像RFIMおよび対象画像OBIMの16個の要素データがそれぞれ順に読み出される。
【0153】
たとえば分割ローカルキャッシュ133(0)のリードオンリーキャッシュRO$0およびリードライトキャッシュRW$0にキャッシュアドレスCADR00〜CADR0Fが順に与えられ、これに応じてPOP0のPOPE0に1列分のデータ00〜0Fがそれぞれ読み出される。
同様に、分割ローカルキャッシュ133(0)のリードオンリーキャッシュRO$1およびリードライトキャッシュRW$1にキャッシュアドレスCADR10〜CADR1Fが順に与えられ、これに応じてPOP0のPOPE1に1列分のデータ10〜1Fがそれぞれ読み出される。
分割ローカルキャッシュ133(0)のリードオンリーキャッシュRO$2およびリードライトキャッシュRW$2にキャッシュアドレスCADR20〜CADR2Fが順に与えられ、これに応じてPOP0のPOPE2に1列分のデータ20〜2Fがそれぞれ読み出される。
分割ローカルキャッシュ133(0)のリードオンリーキャッシュRO$3およびリードライトキャッシュRW$3にキャッシュアドレスCADR30〜CADR3Fが順に与えられ、これに応じてPOP0のPOPE3に1列分のデータ30〜3Fがそれぞれ読み出される。
【0154】
分割ローカルキャッシュ133(1)のリードオンリーキャッシュRO$0およびリードライトキャッシュRW$0にキャッシュアドレスCADR40〜CADR4Fが順に与えられ、これに応じてPOP1のPOPE0に1列分のデータ40〜4Fがそれぞれ読み出される。
同様に、分割ローカルキャッシュ133(1)のリードオンリーキャッシュRO$1およびリードライトキャッシュRW$1にキャッシュアドレスCADR50〜CADR5Fが順に与えられ、これに応じてPOP1のPOPE1に1列分のデータ50〜5Fがそれぞれ読み出される。
分割ローカルキャッシュ133(1)のリードオンリーキャッシュRO$2およびリードライトキャッシュRW$2にキャッシュアドレスCADR60〜CADR6Fが順に与えられ、これに応じてPOP1のPOPE2に1列分のデータ60〜6Fがそれぞれ読み出される。
分割ローカルキャッシュ133(1)のリードオンリーキャッシュRO$3およびリードライトキャッシュRW$3にキャッシュアドレスCADR70〜CADR7Fが順に与えられ、これに応じてPOP1のPOPE3に1列分のデータ70〜7Fがそれぞれ読み出される。
【0155】
分割ローカルキャッシュ133(2)のリードオンリーキャッシュRO$0およびリードライトキャッシュRW$0にキャッシュアドレスCADR80〜CADR8Fが順に与えられ、これに応じてPOP2のPOPE0に1列分のデータ80〜8Fがそれぞれ読み出される。
同様に、分割ローカルキャッシュ133(2)のリードオンリーキャッシュRO$1およびリードライトキャッシュRW$1にキャッシュアドレスCADR90〜CADR9Fが順に与えられ、これに応じてPOP2のPOPE1に1列分のデータ90〜9Fがそれぞれ読み出される。
分割ローカルキャッシュ133(2)のリードオンリーキャッシュRO$2およびリードライトキャッシュRW$2にキャッシュアドレスCADRA0〜CADRAFが順に与えられ、これに応じてPOP2のPOPE2に1列分のデータA0〜AFがそれぞれ読み出される。
分割ローカルキャッシュ133(2)のリードオンリーキャッシュRO$3およびリードライトキャッシュRW$3にキャッシュアドレスCADRB0〜CADRBFが順に与えられ、これに応じてPOP2のPOPE3に1列分のデータB0〜BFがそれぞれ読み出される。
【0156】
分割ローカルキャッシュ133(3)のリードオンリーキャッシュRO$0およびリードライトキャッシュRW$0にキャッシュアドレスCADRC0〜CADRCFが順に与えられ、これに応じてPOP3のPOPE0に1列分のデータC0〜CFがそれぞれ読み出される。
同様に、分割ローカルキャッシュ133(3)のリードオンリーキャッシュRO$1およびリードライトキャッシュRW$1にキャッシュアドレスCADRD0〜CADRDFが順に与えられ、これに応じてPOP3のPOPE1に1列分のデータD0〜DFがそれぞれ読み出される。
分割ローカルキャッシュ133(3)のリードオンリーキャッシュRO$2およびリードライトキャッシュRW$2にキャッシュアドレスCADRE0〜CADREFが順に与えられ、これに応じてPOP3のPOPE2に1列分のデータE0〜EFがそれぞれ読み出される。
分割ローカルキャッシュ133(3)のリードオンリーキャッシュRO$3およびリードライトキャッシュRW$3にキャッシュアドレスCADRF0〜CADRFFが順に与えられ、これに応じてPOP3のPOPE3に1列分のデータF0〜FFがそれぞれ読み出される。
【0157】
ステップST52
ステップST52において、上述したように、各POP(0〜3)の各POPE0〜POPE3で、参照画像RFIMと対象画像OBIMの差分に係数を乗算したデータが1要素の1列分(16個)加算される。
具体的には、POP0のPOPE0では、図32(B)に示すように、データ00〜0Fが順次に加算され、演算結果OPR0がPOPE1に出力される。
POP0のPOPE1では、図32(D)に示すように、データ10〜1Fが順次に加算される。
POP0のPOPE2では、図32(F)に示すように、データ20〜2Fが順次に加算される。
POP0のPOPE3では、図32(H)に示すように、データ30〜3Fが順次に加算される。
他のPOP1〜POP3においても同様に行われる。
【0158】
ステップST53
ステップST53においては、各POP(0〜3)の各POPE0〜POPE3演算結果を加算い、16×4要素の加算結果を得る。
具体的には、図32(B),(D)および図36に示すように、POP0のPOPE0の演算結果OPR0がPOPE1に出力される。
POP0のPOPE1では、図32(D),(F)および図34に示すように、自身の演算結果に、POP0のPOPE0の演算結果OPR0が加算され、その演算結果OPR1がPOPE2に出力される。
POP0のPOPE2では、図32(F),(H)および図34に示すように、自身の演算結果に、POP0のPOPE1の演算結果OPR1が加算され、その演算結果OPR2がPOPE3に出力される。
そして、POP0のPOPE3では、図32(H)に示すように、自身の演算結果に、POP0のPOPE2の演算結果OPR2が加算され、その演算結果OPR3が出力選択回路OSLCに出力される。
他のPOP1〜POP3においても同様に行われる。
【0159】
ステップST54
ステップST54においては、各POP0〜POP3の出力選択回路OSLCから総演算結果OPR3がクロスバー回路13125を介してレジスタユニット(RGU)13124に転送される。
たとえば図33に示すように、POP0のPOPE3の総演算結果OPR3は、クロスバー回路13125を経由してレジスタユニット(RGU)13124のFIFOレジスタFREG1に格納される。
POP1のPOPE3の総演算結果OPR3は、クロスバー回路13125を経由してレジスタユニット(RGU)13124のFIFOレジスタFREG2に格納される。
POP2のPOPE3の総演算結果OPR3は、クロスバー回路13125を経由してレジスタユニット(RGU)13124のFIFOレジスタFREG3に格納される。
POP3のPOPE3の総演算結果OPR3は、クロスバー回路13125を経由してレジスタユニット(RGU)13124のFIFOレジスタFREG4に格納される。
【0160】
ステップST55
ステップST55においては、レジスタユニット(RGU)13124のFIFOレジスタFREG1およびFREG2にセットされたPOP0とPOP1の総演算結果が、ピクセルエンジン(PXE)13122の第1の加算器ADD1で加算され、この演算結果がクロスバー回路13125を介してレジスタユニット(RGU)13124のFIFOレジスタFREG5に格納される。
また、レジスタユニット(RGU)13124のFIFOレジスタFREG3およびFREG4にセットされたPOP2とPOP3の総演算結果が、ピクセルエンジン(PXE)13122の第2の加算器ADD2で加算され、この演算結果がクロスバー回路13125を介してレジスタユニット(RGU)13124のFIFOレジスタFREG6に格納される。
そして、レジスタユニット(RGU)13124のFIFOレジスタFREG5およびFREG6にセットされた第1および第2の加算器ADD1,ADD2の演算結果が、ストリーム処理エンジン(SPE)13143の第3の加算器ADD3で加算される。
【0161】
ステップST56
ステップST56では、図32(P)に示すように、ピクセルエンジン(PXE)13122の第3の加算器ADD3の加算結果が一連の演算結果として出力される。
【0162】
図35は、本実施形態に係る処理ユニットにおけるコアのピクセルエンジン(PXE)13122、ピクセル演算プロセッサ(POP)群13123、レジスタユニット(RGU)13124、並びにメモリ部分を含む動作概要を示す図である。
【0163】
図35において、破線はアドレス系データの流れを、一点鎖線はリードデータの流れを、実線はライトデータの流れをそれぞれ示している。
また、レジスタユニット(RGU)13124において、FREGA1,FREGA2はアドレス系に用いられるFIFOレジスタを、FREGRはリードデータに用いられるFIFOレジスタを、FREGWはライトデータに用いられるFIFOレジスタをそれぞれ示している。
【0164】
図35の例では、ラスタライザ1311によって生成されるたとえばソース(読み出し用)アドレスデータが、クロスバー回路13125を介してレジスタユニット(RGU)13124のFIFOレジスタFREGA1,FREGA2にセットされる。
そして、FIFOレジスタFREGA1にセットされたアドレスデータは、たとえばクロスバー回路13125を介さずに直接的にピクセル演算プロセッサ(POP)13123のアドレス生成器AG1に供給される。アドレス生成器AG1において読み出すべきデータのアドレスが生成され、これに基づきメモリモジュール132からリードオンリーキャッシュ1331に読み出された所望のデータがピクセル演算プロセッサ(POP)13123の各演算器(POPE)に供給される。
【0165】
ピクセル演算プロセッサ(POP)13123の各演算器(POPE)の演算結果がクロスバー回路13125を介してレジスタユニット(RGU)13124のFIFOレジスタFREGRにセットされる。
FIFOレジスタFREGRにセットされたデータは、クロスバー回路13125を介さずに直接的にピクセルエンジン(PXE)13122の各演算器OPに供給される。
そして、ピクセルエンジン(PXE)13122の各演算器OPの演算結果がクロスバー回路13125を介してレジスタユニット(RGU)13124のFIFOレジスタFREGWにセットされる。
FIFOレジスタFREGWにセットされたデータは、ピクセル演算プロセッサ(POP)13123の各演算器(POPE)に供給される。
【0166】
また、ラスタライザ1311によって生成されるデスティネーション(書き込み用)アドレスデータが、クロスバー回路13125を介してレジスタユニット(RGU)13124のFIFOレジスタFREGA2にセットされる。
そして、FIFOレジスタFREGA2にセットされたアドレスデータは、クロスバー回路13125を介さず直接的にピクセル演算プロセッサ(POP)13123のアドレス生成器AG2に供給される。アドレス生成器AG2において書き込むべきデータのアドレスが生成され、これに基づきピクセル演算プロセッサ(POP)13123の各演算器(POPE)の演算結果がリードライトキャッシュ1332に書き込まれ、さらにメモリモジュール132に書き込まれる。
【0167】
なお、図35の例では、リードライトキャッシュ1332は書き込みだけを行うように記述しているが、上述したリードオンリーキャッシュ1331の場合と同様な動作で読み出しも行う。
【0168】
次に、以上の構成を有する処理ユニット131(−0〜−3)におけるグラフィックス処理および画像処理の場合の動作例を図面に関連付けて説明する。
【0169】
まず、依存テクスチャ無しの場合のグラフィックス処理を図36および図37に関連付けて説明する。
【0170】
この場合、ラスタライザ1311において、グローバルモジュール12からブロードキャストされたパラメータデータを受けて、たとえば三角形が自分が担当する領域であるか否かが判断され、担当領域である場合には、入力した三角形頂点データに基づいて、各ピクセルデータが生成されてコア1312に供給される。
具体的には、ラスタライザ1311において、ウィンドウ座標(X,Y,Z)、プライマリカラー(PC;Rp,Gp,Bp,Ap)、セカンダリカラー(SC;Rs,Gs,Bs,As)、Fog係数(f)、テクスチャ座標や各種ベクトル(V1x,V1y,V1z),(V2x,V2y,V2z)の各種ピクセルデータが生成される。
【0171】
そして、生成されたウィンドウ座標(X,Y,Z)は、レジスタユニット(RGU)13124の特定のFIFOレジスタを通して、直接的にピクセル演算プロセッサ(POP)群13123内に、あるいは別個に設けられたライトユニットWUに供給される。
また、生成された2組のテクスチャ座標データや各種ベクトル(V1x,V1y,V1z),(V2x,V2y,V2z)が、クロスバー回路13125、レジスタユニット(RGU)13124のFIFOレジスタを通してグラフィックスユニット(GRU)12121に供給される。
さらに、生成されたプライマリカラー(PC)、セカンダリカラー(SC)、Fog係数(F)が、クロスバー回路13125、レジスタユニット(RGU)13124のFIFOレジスタを通してピクセルエンジン(PXE)13122に供給される。
【0172】
グラフィックスユニット(GRU)13121では、供給されたテクスチャ座標データや各種ベクトル(V1x,V1y,V1z)、および(V2x,V2y,V2z)に基づいて、パースペクティブコレクション、LOD(Level
of Detail)計算によるミップマップ(MIPMAP)レベルの算出、立方体マップ(CubeMap)の面選択や正規化テクセル座標(s,t)の算出処理が行われる。
そして、グラフィックスユニット(GRU)13121で生成された、たとえば正規化テクセル座標(s,t)およびLODデータ(lod)を含む2組のデータ(s1,t1,lod1),(s2,t2,lod2)が、たとえばクロスバー回路13125を通さず個別の配線を介して直接的にピクセル演算プロセッサ(POP)群13123に供給される。
【0173】
ピクセル演算プロセッサ(POP)群13123では、図37に示すように、フィルタ機能ユニットFFUにおいてグラフィックスユニット(GRU)13121から直接的に供給された(s1,t1,lod1),(s2,t2,lod2)の値に基づいて、テクスチャアクセスのための(u,v)アドレス計算が行われ、アドレスデータ(ui,vi,lodi)がアドレス生成器AGに供給され、係数計算のためにデータ(uf,vf,lodf)が係数生成部COFに供給される。
【0174】
アドレス生成器AGにおいては、アドレスデータ(ui,vi,lodi)を受けて、4近傍フィルタリングを行うための4近傍の(u,v)座標、すなわち、(u0,v0),(u1,v1),(u2,v2),(u3,v3)が計算され、メモリコントローラMCに供給される。
これにより、メモリモジュール132から所望のテクセルデータがたとえばリードオンリーキャッシュRO$を通して、ピクセル演算プロセッサ(POP)群13123の各POPEに読み出される。
また、係数生成器COFでは、データ(uf,vf,lodf)を受けて、テクスチャフィルタ係数K(0〜3)が計算され、ピクセル演算プロセッサ(POP)群13123の対応する各POPEに供給される。
そして、ピクセル演算プロセッサ(POP)群13123の各POPにおいて、色データ(TR,TG,TB)および混合値(ブレンド値:TA)が求められ、2組のデータ(TR1,TG1,TB1,TA1)および(TR2,TG2,TB2,TA2)が、クロスバー回路13125を転送されてレジスタユニット(RGU)13124の所定のFIFOレジスタに設定され、この設定データがクロスバー回路13125を介さずに直接的にピクセルエンジン(PXE)13122に供給される。
【0175】
ピクセルエンジン(PXE)13122では、ピクセル演算プロセッサ(POP)群13123によるデータ(TR1,TG1,TB1,TA1)および(TR2,TG2,TB2,TA2)、並びに、ラスタライザ1311によるプライマリカラー(PC)、セカンダリカラー(SC)、Fog係数(F)に基づいて、たとえばPixel Shaderの演算が行われ、色データ(FR1,FG1,FB1)および混合値(ブレンド値:FA1)が求められ、このデータ(FR1,FG1,FB1,FA1)が、クロスバー回路13125を転送されてレジスタユニット(RGU)13124の所定のFIFOレジスタに設定され、この設定データがクロスバー回路13125を介さずに直接的にピクセル演算プロセッサ(POP)群13123の所定のPOP内あるいは別個に設けられたライトユニットWUに供給される。
【0176】
ライトユニットWUでは、ラスタライザ1311によるウィンドウ座標(X,Y,Z)に基づき、たとえばリードライトキャッシュRW$を通してメモリモジュール132からデスティネーション色データ(RGB)および混合値データ(A)、並びに奥行きデータ(Z)が読み出される。
そして、ライトユニットWUでは、ピクセルエンジン(PXE)13122によるデータ(FR1,FG1,FB1,FA1)、およびリードライトキャッシュRW$を通してメモリモジュール132から読み出したデスティネーション色データ(RGB)および混合値データ(A)、並びに奥行きデータ(Z)に基づいて、αブレンディング、各種テスト、ロジカルオペレーションといったグラフィックス処理のピクセル書き込みに必要な演算が行われ、演算結果がリードライトキャッシュRW$に書き戻される。
【0177】
次に、依存テクスチャ有りの場合のグラフィックス処理を図38および図37に関連付けて説明する。
【0178】
この場合、ラスタライザ1311において、ウィンドウ座標(X,Y,Z)、プライマリカラー(PC;Rp,Gp,Bp,Ap)、セカンダリカラー(SC;Rs,Gs,Bs,As)、Fog係数(f)、テクスチャ座標(V1x,V1y,V1z)の各種ピクセルデータが生成される。
【0179】
そして、生成されたウィンドウ座標(X,Y,Z)は、レジスタユニット(RGU)13124の特定のFIFOレジスタを通して、直接的にピクセル演算プロセッサ(POP)群13124に供給される。
また、生成されたテクスチャ座標(V1x,V1y,V1z)が、クロスバー回路13125、レジスタユニット(RGU)13124のFIFOレジスタを通してグラフィックスユニット(GRU)12121に供給される。
さらに、生成されたプライマリカラー(PC)、セカンダリカラー(SC)、Fog係数(F)が、クロスバー回路13125、レジスタユニット(RGU)13124のFIFOレジスタを通してピクセルエンジン(PXE)13122に供給される。
【0180】
グラフィックスユニット(GRU)13121では、供給されたテクスチャ座標(V1x,V1y,V1z)データに基づいて、パースペクティブコレクション、LOD計算によるミップマップ(MIPMAP)レベルの算出、立方体マップ(CubeMap)の面選択や正規化テクセル座標(s,t)の算出処理が行われる。
そして、グラフィックスユニット(GRU)13121で生成された、たとえば正規化テクセル座標(s,t)およびLODデータ(lod)を含む1組のデータ(s1,t1,lod1)が、たとえばクロスバー回路13125を通さず直接的にピクセル演算プロセッサ(POP)群13123に供給される。
【0181】
ピクセル演算プロセッサ(POP)群13123では、図37に示すように、フィルタ機能ユニットFFUにおいてグラフィックスユニット(GRU)13121から直接的に供給された(s1,t1,lod1)の値に基づいて、テクスチャアクセスのための(u,v)アドレス計算が行われ、アドレスデータ(ui,vi,lodi)がアドレス生成器AGに供給され、係数計算のためにデータ(uf,vf,lodf)が係数生成部COFに供給される。
【0182】
アドレス生成器AGにおいては、アドレスデータ(ui,vi,lodi)を受けて、4近傍フィルタリングを行うための4近傍の(u,v)座標、すなわち、(u0,v0),(u1,v1),(u2,v2),(u3,v3)が計算され、メモリコントローラMCに供給される。
これにより、メモリモジュール132から所望のテクセルデータがたとえばリードオンリーキャッシュRO$を通して、ピクセル演算プロセッサ(POP)群13123の各POPEに読み出される。
また、係数生成器COFでは、データ(uf,vf,lodf)を受けて、テクスチャフィルタ係数K(0〜3)が計算され、ピクセル演算プロセッサ(POP)群13123の各POPEに供給される。
そして、ピクセル演算プロセッサ(POP)群13123の各POPにおいて、色データ(TR,TG,TB)および混合値(ブレンド値:TA)が求められ、データ(TR1,TG1,TB1,TA1)が、クロスバー回路13125を転送されてレジスタユニット(RGU)13124の所定のFIFOレジスタに設定され、この設定データがクロスバー回路13125を介さずに直接的にピクセルエンジン(PXE)13122に供給される。
【0183】
ピクセルエンジン(PXE)13122では、ピクセル演算プロセッサ(POP)群13123によるデータ(TR1,TG1,TB1,TA1)、並びに、ラスタライザ1311によるプライマリカラー(PC)、セカンダリカラー(SC)、Fog係数(F)に基づいて、たとえばPixel Shaderの演算が行われ、テクスチャ座標(V2x,V2y,V2z)が生成され、クロスバー回路13125、レジスタユニット(RGU)13124を介してグラフィックスユニット(GRU)13121に供給される。
【0184】
グラフィックスユニット(GRU)13121では、供給されたテクスチャ座標(V2x,V2y,V2z)データに基づいて、パースペクティブコレクション、LOD計算によるミップマップ(MIPMAP)レベルの算出、立方体マップ(CubeMap)の面選択や正規化テクセル座標(s,t)の算出処理が行われる。
そして、グラフィックスユニット(GRU)13121で生成された、たとえば正規化テクセル座標(s,t)およびLODデータ(lod)を含むデータ(s2,t2,lod2)が、たとえばクロスバー回路13125を通さず直接的にピクセル演算プロセッサ(POP)群13123に供給される。
【0185】
ピクセル演算プロセッサ(POP)群13123では、図37に示すように、フィルタ機能ユニットFFUにおいてグラフィックスユニット(GRU)13121から直接的に供給された(s2,t2,lod2)の値に基づいて、テクスチャアクセスのための(u,v)アドレス計算が行われ、アドレスデータ(ui,vi,lodi)がアドレス生成器AGに供給され、係数計算のためにデータ(uf,vf,lodf)が係数生成部COFに供給される。
【0186】
アドレス生成器AGにおいては、アドレスデータ(ui,vi,lodi)を受けて、4近傍フィルタリングを行うための4近傍の(u,v)座標、すなわち、(u0,v0),(u1,v1),(u2,v2),(u3,v3)が計算され、メモリコントローラMCに供給される。
これにより、メモリモジュール132から所望のテクセルデータがたとえばリードオンリーキャッシュRO$を通して、ピクセル演算プロセッサ(POP)群13123の各POPEに読み出される。
また、係数生成器COFでは、データ(uf,vf,lodf)を受けて、テクスチャフィルタ係数K(0〜3)が計算され、ピクセル演算プロセッサ(POP)群13123の各POPEに供給される。
そして、ピクセル演算プロセッサ(POP)群13123の各POPにおいて、色データ(TR,TG,TB)および混合値(ブレンド値:TA)が求められ、データ(TR2,TG2,TB2,TA2)が、クロスバー回路13125を転送されてレジスタユニット(RGU)13124の所定のFIFOレジスタに設定され、この設定データがクロスバー回路13125を介さずに直接的にピクセルエンジン(PXE)13122に供給される。
【0187】
ピクセルエンジン(PXE)13122では、ピクセル演算プロセッサ(POP)群13123によるデータ(TR2,TG2,TB2,TA2)、並びに、ラスタライザ1311によるプライマリカラー(PC)、セカンダリカラー(SC)、Fog係数(F)に基づいて、4近傍補間等の所定のフィルタリング演算処理が行われ、色データ(FR1,FG1,FB1)および混合値(ブレンド値:FA1)が求められ、このデータ(FR1,FG1,FB1,FA1)が、クロスバー回路13125を転送されてレジスタユニット(RGU)13124の所定のFIFOレジスタに設定され、この設定データがクロスバー回路13125を介さずに直接的にピクセル演算プロセッサ(POP)群13123の所定のPOP内あるいは別個に設けられてライトユニットWUに供給される。
【0188】
ライトユニットWUでは、ラスタライザ1311によるウィンドウ座標(X,Y,Z)に基づき、たとえばリードライトキャッシュRW$を通してメモリモジュール132からデスティネーション色データ(RGB)および混合値データ(A)、並びに奥行きデータ(Z)が読み出される。
そして、ライトユニットWUでは、ピクセルエンジン(PXE)13122によるデータ(FR1,FG1,FB1,FA1)、およびリードライトキャッシュRW$を通してメモリモジュール132から読み出しデスティネーション色データ(RGB)および混合値データ(A)、並びに奥行きデータ(Z)に基づいて、αブレンディング、各種テスト、ロジカルオペレーションといったグラフィックス処理のピクセル書き込みに必要な演算が行われ、演算結果がリードライトキャッシュRW$に書き戻される。
【0189】
次に、画像処理について説明する。
【0190】
まず、図39に示すようなSAD(Summed Absolute Difference)処理を行う場合の動作について、図40に関連付けて説明する。
【0191】
SAD処理では、図39(A)に示すような元画像ORIMの1ブロック(X1s,Y1s)に対して、図39(B)に示すような参照画像RFIMの探索矩形領域SRGN内を1ピクセルずつずらしながら、対応ブロックBLK内のSAD(絶対値差)を求めていく。
その中で、SADが最小となるブロックの位置(X2s,y2s)とSAD値を図39(C)に示すように、(Xd,Yd)に格納する。
(X1s,Y1s)はコンテキストとして図示しない上位位置からPOP内のレジスタに設定される。
【0192】
この場合、ラスタライザ1311に対して、たとえばグローバルモジュール12を介して図示しない上位装置から出力された、メモリモジュール132(−0〜−3)から参照画像データを読み出すためのソースアドレスおよび画像処理結果を書き込むためのデスティネーションアドレスの生成に必要なコマンドやデータ、たとえば探索矩形領域SRGNの幅、高さ(Ws,Hs)データ、ブロックサイズ(Wbk,Hbk)データが入力される。
ラスタライザ1311では、入力データに基づいて、メモリモジュール132に格納されている参照画像RFIMのソースアドレス(X2s,Y2s)が生成されるとともに、処理結果をメモリモジュール132に格納するためのデスティネーションアドレス(Xd,Yd)が生成される。
【0193】
生成されたデスティネーションアドレス(Xd,Yd)は、グラフィックス処理時のウィンドウ座標(X,Y,Z)の供給ラインが共用され、レジスタユニット(RGU)13124の特定のFIFOレジスタを通して、直接的にピクセル演算プロセッサ(POP)群13124のライトユニットWUに供給される。
また、生成された参照画像RFIMのソースアドレス(X2s,Y2s)が、クロスバー回路13125、レジスタユニット(RGU)13124のFIFOレジスタを通してグラフィックスユニット(GRU)12121に供給される。ソースアドレス(X2s,Y2s)は、グラフィックスユニット(GRU)12121は素通りして、たとえばクロスバー回路13125を通さず直接的にピクセル演算プロセッサ(POP)群13123に供給される。
【0194】
ピクセル演算プロセッサ(POP)群13123では、供給されたソースアドレス(X1s,Y1s)および(X2s,Y2s)に基づいて、たとえばリードオンリーキャッシュRO$、リードライトキャッシュRW$を介して、メモリモジュール132に格納されている元画像ORIMおよび参照画像RFIMの各データが読み出される。
ここで、元画像ORIMの座標はコンテキストとしてレジスタに設定される。参照画像RFIMの座標は、たとえば4つのPOPそれぞれが担当するサブブロックの座標が与えられる。
そして、ピクセル演算プロセッサ(POP)群13123では、元画像ORIMの1ブロック(X1s,Y1s)に対して、参照画像RFIMの探索矩形領域SRGN内を1ピクセルずつずらしながら、対応サブブロックBLK内のSAD(絶対値差)が随時求められる。
そして、各サブブロックの位置位置(X2s,y2s)と各SAD値が、クロスバー回路13125を転送されてレジスタユニット(RGU)13124の所定のFIFOレジスタに設定され、この設定データがクロスバー回路13125を介さずに直接的にピクセルエンジン(PXE)13122に転送される。
【0195】
ピクセルエンジン(PXE)3122では、ブロック全体のSADが集計され、ブロックの位置(X2s,y2s)とSAD値が、クロスバー回路13125を転送されてレジスタユニット(RGU)13124の所定のFIFOレジスタに設定され、この設定データがクロスバー回路13125を介さずに直接的にライトユニットWUに転送される。
【0196】
ライトユニットWUでは、ピクセルエンジン(PXE)13122によるブロックの位置(X2s,y2s)とSAD値の、ラスタライザ1311によるデスティネーションアドレス(Xd,Yd)への格納処理が行われる。
この場合、たとえば隠面除去(Hidden Surface Removal)を行う機能(Z比較)を用いて、たとえばメモリモジュール132からリードライトキャッシュRW$に読み出されたSAD値とピクセルエンジン(PXE)13122によるSAD値が比較される。
そして、比較の結果、格納されている値よりピクセルエンジン(PXE)13122によるSAD値が小さい場合に、ピクセルエンジン(PXE)13122によるブロックの位置(X2s,y2s)とSAD値がデスティネーションアドレス(Xd,Yd)にリードライトキャッシュRW$を介して書き込まれる(更新される)。
【0197】
次に、図41に示すようなコンボリューションフィルタ(Convolution Filter)処理を行う場合の動作について、図42に関連付けて説明する。
【0198】
コンボリューションフィルタ処理では、図41(A)に示すような対象画像OBIMの各ピクセル(X1s,Y1s)に対して、フィルタカーネルサイズの周辺ピクセルを読み出し、フィルタ係数を乗算したものを足し合わせ、その結果を図41(B)に示すようにデスティネーションアドレス(Xd,Yd)に格納する。
なお、フィルタカーネル係数の格納アドレスは、コンテキストとしてPOP内のレジスタに設定する。
【0199】
この場合、ラスタライザ1311に対して、たとえばグローバルモジュール12を介して図示しない上位装置から出力された、メモリモジュール132(−0〜−3)から画像データ(ピクセルデータ)を読み出すためのソースアドレスおよび画像処理結果を書き込むためのデスティネーションアドレスの生成に必要なコマンドやデータ、たとえばフィルタカーネルサイズデータ(Wk,Hk)が入力される。
ラスタライザ1311では、入力データに基づいて、メモリモジュール132に格納されている対象画像OBIMのソースアドレス(X1s,Y1s)が生成されるとともに、処理結果をメモリモジュール132に格納するためのデスティネーションアドレス(Xd,Yd)が生成される。
【0200】
生成されたデスティネーションアドレス(Xd,Yd)は、グラフィックス処理時のウィンドウ座標(X,Y,Z)の供給ラインが共用され、レジスタユニット(RGU)13124の特定のFIFOレジスタを通して、直接的にピクセル演算プロセッサ(POP)群13124のライトユニットWUに供給される。
また、生成された対象画像OBIMのソースアドレス(X1s,Y1s)が、クロスバー回路13125、レジスタユニット(RGU)13124のFIFOレジスタを通してグラフィックスユニット(GRU)12121に供給される。ソースアドレス(X1s,Y1s)は、グラフィックスユニット(GRU)12121は素通りして、たとえばクロスバー回路13125を通さず直接的にピクセル演算プロセッサ(POP)群13123に供給される。
【0201】
ピクセル演算プロセッサ(POP)群13123では、供給されたソースアドレス(X1s,Y1s)に基づいて、たとえばリードオンリーキャッシュRO$を介して、メモリモジュール132に可能されているカーネルサイズの周辺ピクセルが読み出される。
そして、ピクセル演算プロセッサ(POP)群13123では、所定のフィルタ係数が読み出したデータに掛け合わされ、さらにこれらが足し合わされて、その結果である色データ(R,G,B)および混合値データ(A)を含むデータ(R,G,B,A)がクロスバー回路13125、レジスタユニット(RGU)13124を介してライトユニットWUに転送される。
【0202】
ライトユニットWUでは、ピクセル演算プロセッサ(POP)群13123によるデータが、リードライトキャッシュRW$を介してデスティネーションアドレス(Xd,Yd)に格納される。
【0203】
最後に、図3のシステム構成による動作を説明する。
ここでは、テクスチャ系の処理について説明する。
【0204】
まず、SDC11において、3次元座標、法線ベクトル、テクスチャ座標の各頂点データが入力されると、頂点データに対する演算が行われる。
次に、ラスタライゼーション(Rasterization)に必要な各種パラメータが算出される。
そして、SDC11においては、算出したパラメータが、グローバルモジュール12を介して全ローカルモジュール13−0〜13−3にブロードキャストされる。
この処理において、ブロードキャストされたパラメータは、後述するキャッシュフィルとは別のチャネルを用いて、グローバルモジュール12を介して各ローカルモジュール13−0〜13−3に渡される。ただし、グローバルキャッシュの内容には影響を与えない。
【0205】
各ローカルモジュール13−0〜13−3では、処理ユニット131−0〜131−3において、以下の処理が行われる。
すなわち、処理ユニット131(−0〜3)においては、ブロードキャストされたパラメータを受け取ると、その三角形が自分が担当する領域、たとえば4×4ピクセルの矩形領域単位でインターリーブされた領域に属しているか否かが判断される。その結果、属している場合には、各種データ(Z、テクスチャ座標、カラーなど)がラスタライズされる。
次に、LOD(Level of Detail)計算によるミップマップ(MIPMAP)レベルの算出や、テクスチャアクセスのための(u,v)アドレス計算が行われる。
【0206】
そして、次に、テクスチャの読み出しが行われる。
この場合、各ローカルモジュール13−0〜13−3の処理ユニット131−0〜131−3では、テクスチャリードの際に、まず、ローカルキャッシュ133−0〜133−3のエントリーがチェックされる。
その結果、エントリーがあった場合には、必要なテクスチャデータが読み出される。
必要とするテクスチャデータがローカルキャッシュ133−0〜133−3内に無い場合には、各処理ユニット131−0〜131−3では、グローバルインターフェース134−0〜134−3を通して、グローバルモジュール12に対してローカルキャッシュフィルのリクエストが送出される。
【0207】
グローバルモジュール12においては、要求されたブロックデータがグローバルキャッシュ121−0〜121−3のいずれかにあると判断されると、対応するグローバルキャッシュ121−0〜121−3のいずれかから読み出されて所定のチャネルを通してリクエストを送出したローカルモジュールに送り返される。
【0208】
一方、要求されたブロックデータがグローバルキャッシュ121−0〜121−3のいずれかにもないと判断されると、所望のチャネルのいずれかから当該ブロックを保持するローカルモジュールに対してグローバルキャッシュフィルのリクエストが送られる。
グローバルキャッシュフィルのリクエストを受けたローカルモジュールにおいては、メモリから該当するブロックデータが読み出され、グローバルインターフェースを通してグローバルモジュール12に送出される。
その後、グローバルモジュール12では、ブロックデータが所望のグローバルキャッシュにフィルされるとともに、リクエストを送ってきたローカルモジュールに対して所望のチャネルからデータが送出される。
【0209】
グローバルモジュール12から要求したブロックデータが送られてくると、該当するローカルモジュールでは、ローカルキャッシュが更新され、処理ユニットによりブロックデータが読み出される。
【0210】
次に、ローカルモジュール13−0〜13−3では、読み出されたテクスチャデータと、(u,v)アドレスは算出時に得た小数部を使って4近傍補間などのフィルタリング処理が行われる。
次に、フィルタリング後のテクスチャデータと、ラスタライズ後の各種データを用いて、ピクセル単位の演算が行われる。
そして、ピクセルレベルの処理における各種テストをパスしたピクセルデータが、メモリモジュール132−0〜132−3、たとえば内蔵DRAMメモリ上のフレームバッファおよびZバッファに書き込まれる。
【0211】
以上説明したように、本実施形態によれば、メモリバンド幅を活かした高並列の演算処理を行う機能ユニットである複数のPOP0〜POP3を有し、各POPは、並列に配列された演算器POPE0〜POPE3を有し、各POPE0〜POPE3は、2つのキャッシュから読み出された参照画像RFIMおよび対象画像OBIMのデータおよびフィルタ機能ユニットFFUによる演算パラメータを受けて所定の演算(たとえば減算、乗算および総加算)を行って演算結果を次段のPOPEに出力し、次段のPOPEは自身の演算結果に前段の演算結果を加算し、その演算結果を次段のPOPEに出力し、最終段のPOPE3において、全POPE0〜POPE3の演算結果の総和を求め、各POPは、複数のPOPEの演算出力から一つのPOPE3の演算結果のみを選択してクロスバー回路13146に出力するピクセル演算プロセッサ(POP)群13124を設けたことから、テンプレートマッチング処理を簡単な構成で、高効率に実行することができる。
また、クロスバー回路の小型化を図れ、処理の高速化を図ることができる。
【0212】
また、本実施形態では、ピクセル演算プロセッサ(POP)群13123とキャッシュ間は広いバンド幅で接続されており、かつメモリアクセスのためのアドレス生成機能を内蔵しているので、演算器の演算能力を最大限引き出すだけのストリームデータの供給が可能である。
【0213】
また、本実施形態では、メモリの近傍に出力データ幅を合わせた形で演算器を高密度に配置し、処理データの規則性を利用していることから、大量の演算を最低限の演算器でしかも簡単な構成で実現することができ、ひいてはコスト低減を図れる利点がある。
【0214】
また、本実施形態によれば、グラフィックス処理時には、グローバルモジュール12からブロードキャストされたパラメータデータを受けて、ウィンドウ座標、プライマリカラー(PC)、セカンダリカラー(SC)、Fog係数(f)、テクスチャ座標等の各種ピクセルデータを生成し、画像処理時には、入力データに基づいて、ソースアドレスを生成するとともに、デスティネーションアドレスを生成するラスタライザ1311と、複数のFIFOレジスタを有するレジスタユニット13124と、上記レジスタユニット13124のFIFOレジスタに設定されたテクスチャ座標に基づいてテクセル座標(s,t)およびLODデータを含むグラフィックスデータ(s,t,l)を生成し、ソースアドレスを素通りさせて出力するグラフィックスユニット13121と、グラフィックス処理時には、グラフィックスデータ(s,t,l)に基づいて所定の演算処理を行い、演算データをクロスバー回路13125を転送させてレジスタユニット13124の所定のレジスタに設定させ、画像処理時には、ソースアドレスに応じた画像データを読み出して所定の画像処理演算を行い、この演算データをクロスバー回路13125を転送させてレジスタユニット13124の所定のレジスタに設定させるピクセル演算プロセッサ13123と、色データに基づいてレジスタに設定されたピクセル演算プロセッサ13123の演算データに対して所定の演算処理を行い、この演算データをクロスバー回路13125を転送させてレジスタユニット13124の所定のレジスタに設定させるピクセルエンジン13122と、グラフィックス処理時には、レジスタに設定されたウィンドウ座標およびピクセルエンジン13122の演算データに基づいてピクセル書き込みに必要な処理を行って、必要に応じて処理結果をメモリに書き込み、画像処理時には、レジスタに設定されたピクセル演算プロセッサ13123の演算データをメモリのデスティネーションアドレスに書き込むライトユニットWUとを設けたので、以下の効果を得ることができる。
【0215】
すなわち、本実施形態によれば、大量の演算器を効率よく利用することが可能で、アルゴリズムの自由度が高く、柔軟性が高く、しかも回路規模の増大、コスト増を招くことなく、複雑な処理を高スループットで処理することができる。
【0216】
また、処理ユニット131(−0〜−3)は、分岐のないデータフローグラフ(Data Flow Graph :DFG)で表現されるアルゴリズムを実行し、DFGのノートとエッジは、演算器や演算ユニットとその接続関係と見ることができる。したがって、処理ユニット131(−0〜−3)は、実行するDFGに応じて、演算リソース間の接続を動的に切り替える、いわゆる動的再構成可能なハードウェアであり、演算器で実行する機能やそれらの接続関係が処理ユニットのマイクロプログラムに相当し、ストリームデータの各要素に適用されるDFGは同じであるので、命令発行のバンド幅を低くおさえることができる。
【0217】
また、処理ユニット131(−0〜−3)は、演算機能の指定や演算器間接続の切り替え制御は、データドリブンであり、分散自立型制御といえる。
このような動的スケジューリングを採用することにより、DFGが切り替わる際に、エピローグ/ プロローグのオーバーラップが可能であり、DFGの切り替えのオーバーヘッドを低減することができる。
【0218】
また、DFGの規模が大きくなるとアルゴリズムを内部演算リソースに一度にマッピングすることができなくなる。このような場合には、複数のサブDFG(sub−DFG )に分割する必要がある。
複数のサブDFGに分けて実行する方法として、サブDFG間の中間値をメモリに格納するマルチパス手法があげられる。この方法では、パス数が増大するとメモリバンド幅を消費し性能低下を招く。
処理ユニット131(−0〜−3)は、前述するように演算器や演算ユニット間のストリームデータの受け渡しをFIFO型のレジスタユニット(RGU)を介して行うことから、DFG分割実行時に、このレジスタファイルを介して中間値を渡すことが可能で、マルチパスの回数を低減することができる。
DFGの分割そのものは、コンパイラにより静的に行われるが、分割されたDFGの実行制御はハードウエアが行うのでソフトウエアへの負担が軽いという利点がある。
【0219】
さらに、本実施形態では、クロスバー回路13125を転送してレジスタユニット13124のFIFOレジスタに設定したストリームデータをクロスバー回路を通さずに直接的に、グラフィックスユニット(GRU)13121、ピクセルエンジン(PXE)13122、ピクセル演算プロセッサ(POP)群13123、およびライトユニットWUに供給し、また、グラフィックスユニット13121により得られたグラフィックス演算データをクロスバー回路を通さずに特定の配線を介して直接的にピクセル演算プロセッサ(POP)群13123に供給することから、さらにクロスバー回路の簡単化、小型化を図ることができ、また、マルチパス回数を低減でき、ひいては処理のさらなる高速化を図ることができる。
【0220】
また、本実施形態においては、本アーキテクチャを実現する演算処理部としてのコア1312を一つだけ設けた構成を例に説明したが、たとえば図43に示すように、一つのラスタライザ1311に対して複数個のコア1312−1〜1312−nを並列に設ける構成を採用することも可能である。
この場合でも、各コアで実行されるDFGは同一である。
また、複数のコアを設ける構成の並列化の単位としては、たとえばグラフィックス処理の場合には小矩形領域(スタンプ)単位、画像処理の場合にはブロック単位である。この場合、細かい粒度での並列処理を実現できる利点がある。
【0221】
また、本実施形態によれば、SDC11とグローバルモジュール12とがデータの授受を行い、一つのグローバルモジュール12に対して複数個(本実施形態では4個)のローカルモジュール13−0〜13−3が並列に接続されて、複数のローカルモジュール13−0〜13−3で処理データを共有し並列に処理し、グローバルモジュール12はグローバルキャッシュを有し、各ローカルモジュール13−0〜13−3はローカルキャッシュをそれぞれ有し、キャッシュの階層として、4つのローカルモジュール13−0〜13−3が共有するグローバルキャッシュと、各ローカルモジュールがローカルに持つローカルキャッシュの2階層を有することから、複数の処理装置が処理データを共有して並列処理する際に、重複アクセスを低減でき、配線本数の多いクロスバーが不要となる。その結果、設計が容易で、配線コスト、配線遅延を低減できる画像処理装置を実現できる利点がある。
【0222】
また、本実施形態によれば、グローバルモジュール12と各ローカルモジュール13−0〜13−3との配置関係としては、図3に示すように、グローバルモジュール12を中心として各ローカルモジュール13−0〜13−3をその周辺近傍に配置することから、各対応するチャネルブロックとローカルモジュールまでの距離を均一に保つことができ、配線領域を整然と並べることができ、平均配線長を短くできる。したがって、配線遅延や配線コストを低減でき、処理速度の向上を図ることができる利点がある。
【0223】
なお、本実施形態においては、テクスチャデータが内蔵DRAM上にあるケースを例に述べているが、他のケースとして、内蔵DRAMには、カラーデータおよびzデータのみが置かれ、テクスチャデータは外部メモリに置かれることも可能である。この場合には、グローバルキャッシュでミスが発生すると、外部DRAMに対してキャッシュフィル要求が出されることになる。
【0224】
また、上述の説明では、図3の構成、すなわち、一つのグローバルモジュール12に対して複数個(本実施形態では4個)のローカルモジュール13−0〜13−3が並列に接続した画像処理装置10を例に並列処理を行う場合に特化した形態となっているが、図3の構成を一つのクラスタCLSTとして、たとえば図44に示すように、4つのクラスタCLST0〜CLST3をマトリクス状に配置して、各クラスタCLST0〜CLST3のグローバルモジュール12−0〜12−3間でデータの授受を行うように構成することも可能である。
図44の例では、クラスタCLST0のグローバルモジュール12−0とクラスタCLST1のグローバルモジュール12−1とを接続し、クラスタCLST1のグローバルモジュール12−1とクラスタCLST3のグローバルモジュール12−3とを接続し、クラスタCLST3のグローバルモジュール12−3とクラスタCLST2のグローバルモジュール12−2とを接続し、クラスタCLST2のグローバルモジュール12−2とクラスタCLST0のグローバルモジュール12−0とを接続している。
すなわち、複数のクラスタCLST0〜CLST3のグローバルモジュール12−0〜12−3をリング状に接続している。
なお、図44の構成の場合には、一つのSDCからパラメータがCLST0〜CLST3のグローバルモジュール12−0〜12−3にブロードキャストされるように構成することが可能である。
【0225】
このような構成を採用することにより、より精度の高い画像処理を実現でき、また、各クラスタ間の配線も単純に双方向として一系統で接続するので、各クラスタ間の負荷を均一に保つことができ、配線領域を整然と並べることができ、平均配線長を短くできる。したがって、配線遅延や配線コストを低減でき、処理速度の向上を図ることが可能となる。
【0226】
【発明の効果】
以上説明したように、本発明によれば、テンプレートマッチング処理を簡単な構成で、高効率に実行することができる。
また、複数の処理装置が処理データを共有して並列処理する際に、重複アクセスを低減でき、配線本数の多いクロスバー回路を小型化できる。その結果、設計が容易で、配線コスト、配線遅延を低減でき、画像処理の高速化を実現できる利点がある。
【図面の簡単な説明】
【図1】ピクセルレベルでの並列処理の手法に基づくプリミティブ・レベルでの並列化処理について概念的に示す図である。
【図2】一般的な画像処理装置におけるテクスチャフィルタリングを含む処理手順を説明するための図である。
【図3】本発明に係る画像処理装置の一実施形態を示すブロック構成図である。
【図4】本実施形態に係るストリームデータコントローラ(SDC)の主な処理を説明するためのフローチャートである。
【図5】本実施形態に係るグローバルモジュールの機能を説明するためのフローチャートである。
【図6】本実施形態に係るローカルモジュールにおける処理ユニットのグラフィックス処理を説明するための図である。
【図7】本実施形態に係るテクスチャリード時のローカルモジュールの動作を説明するためのフローチャートである。
【図8】本実施形態に係るローカルモジュールにおける処理ユニットの画像処理を説明するための図である。
【図9】本実施形態に係るローカルモジュールにおけるローカルキャッシュの構成例を示すブロック図である。
【図10】本実施形態に係るローカルキャッシュのメモリコントローラの構成例を示すブロック図である。
【図11】本実施形態に係るローカルモジュールの処理ユニットの具体的な構成例を示すブロック図である。
【図12】本実施形態に係るピクセルエンジンの構成例を示すブロック図である。
【図13】本実施形態に係る接続回路網CCNの構成例を示す図である。
【図14】本実施形態に係るセレクタの構成例を示す図である。
【図15】本実施形態に係るピクセルエンジンの演算実行の概略についての説明図であって、演算のデータフローグラフを示す図である。
【図16】本実施形態に係るピクセルエンジンの演算実行の概略についての説明図である。
【図17】本実施形態に係るピクセルエンジンのパイプライン処理の説明図である。
【図18】本実施形態に係るピクセルエンジンの動的再構築の第1の実現方法について説明するための図である。
【図19】本実施形態に係るピクセルエンジンの動的再構築の第1の実現方法について説明するための図である。
【図20】本実施形態に係るピクセルエンジンの動的再構築の第2の実現方法について説明するための図である。
【図21】本実施形態に係るピクセルエンジンの動的再構築の第2の実現方法について説明するための図である。
【図22】本実施形態に係るピクセルエンジンの動的再構築の第2の実現方法について説明するための図である。
【図23】本実施形態に係るピクセルエンジンの構成例、およびレジスタユニット(RGU)、クロスバー回路との接続例を示す図である。
【図24】本実施形態に係るピクセル演算プロセッサ(POP)群の構成例を示す図である。
【図25】本実施形態に係るPOP(ピクセル演算プロセッサ)とメモリ間の接続形態およびPOPの構成例を示す図である。
【図26】本実施形態に係るPOPEの具体的な構成例を示す回路図である。
【図27】本実施形態に係るメモリからキャッシュへのデータの読み出し形態およびキャッシュから各POPEへのデータを読み出し形態を示す図である。
【図28】本実施形態に係るテンプレートマッチングを説明するための図である。
【図29】本実施形態に係るテンプレートマッチングを説明するための図である。
【図30】本実施形態に係るメモリのデータに基づいてピクセル演算プロセッサ群で演算処理を行い、さらにピクセルエンジンで演算を行う場合の動作を説明するためのフローチャートである。
【図31】本実施形態に係るメモリのデータに基づいてピクセル演算プロセッサ群で演算処理を行い、さらにピクセルエンジンで演算を行う場合の動作を説明するための図である。
【図32】本実施形態に係るメモリのデータに基づいてピクセル演算プロセッサ群で演算処理を行い、さらにピクセルエンジンで演算を行う場合の動作を説明するためのタイミングチャートである。
【図33】本実施形態に係るメモリのデータに基づいてピクセル演算プロセッサ群で演算処理を行い、さらにピクセルエンジンで演算を行う場合の動作を説明するためのブロック図である。
【図34】本実施形態に係るメモリのデータに基づいてピクセル演算プロセッサ群で演算処理を行い、さらにピクセルエンジンで演算を行う場合の動作を説明するための図である。
【図35】本実施形態に係る処理ユニットにおけるコアのピクセルエンジン(PXE)、ピクセル演算プロセッサ(POP)、レジスタユニット(RGU)、並びにメモリ部分を含む動作概要を示す図である。
【図36】本実施形態に係る処理ユニットにおける依存テクスチャ無しの場合のグラフィックス処理を説明するための図である。
【図37】本実施形態に係る処理ユニットにおけるグラフィックス処理のピクセル演算プロセッサ(POP)群の具体的な動作を説明するための図である。
【図38】本実施形態に係る処理ユニットにおける依存テクスチャ有りの場合のグラフィックス処理を説明するための図である。
【図39】SAD(Summed Absolute Difference)処理を説明するための図である。
【図40】本実施形態に係る処理ユニットにおけるSAD処理を説明するための図である。
【図41】コンボリューションフィルタ(Convolution Filter)処理を説明するための図である。
【図42】本実施形態に係る処理ユニットにおけるコンボリューションフィルタ処理を説明するための図である。
【図43】本実施形態に係る処理ユニットにおける他の構成例(コアを複数設けた例)を示す図である。
【図44】本発明に係る画像処理装置の他の実施形態を示すブロック構成図である。
【符号の説明】
10,10A…画像処理装置、11…ストリームデータコントローラ(SDC)、12−0〜12−3…グローバルモジュール、121−0〜121−3…グローバルキャッシュ、13−0〜13−3…ローカルモジュール、131−0〜131−3…処理ユニット、132−0〜132−3…メモリモジュール、133−0〜133−3…ローカルキャッシュ、134−0〜134−3…グローバルインターフェース(GAIF)、CLST0〜CLST…クラスタ、1311…ラスタライザ、1312,1312−1〜1312−n…コア、13121…グラフィックスユニット(GRU)、13122…ピクセルエンジン(PXE)、13123…ピクセル演算プロセッサ(POP)群、13124…レジスタユニット(RGU)、13125…クロスバー回路(IXB)、POPE0〜3…演算器、OSLC…出力選択回路。
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image processing apparatus and a method for performing parallel processing by sharing a plurality of processing data.
[0002]
[Prior art]
In conjunction with the recent increase in computational speed and the enhancement of drawing functions in computer systems, "computer graphics (CG)" technology for creating and processing figures and images using computer resources has been actively researched and developed. , Has been put to practical use.
[0003]
For example, in three-dimensional graphics, an optical phenomenon when a three-dimensional object is illuminated by a predetermined light source is expressed by a mathematical model, and based on this model, the surface of the object is shaded, shaded, or a pattern is pasted. For example, a more realistic three-dimensional two-dimensional high-definition image is generated.
Such computer graphics have been increasingly used in CAD / CAM and other various application fields in development fields such as science, engineering, and manufacturing.
[0004]
The three-dimensional graphics generally includes a “geometry subsystem” positioned as a front end and a “raster subsystem” positioned as a back end.
[0005]
The geometry subsystem is a process of performing a geometric operation such as a position and a posture of a three-dimensional object displayed on a display screen.
In the geometry subsystem, an object is generally treated as an aggregate of a large number of polygons, and geometric calculation processing such as “coordinate conversion”, “clipping”, and “light source calculation” is performed in units of polygons.
[0006]
On the other hand, the raster subsystem is a process of painting each pixel constituting an object.
The rasterizing process is realized by, for example, interpolating the image parameters of all the pixels included in the polygon based on the image parameters obtained for each vertex of the polygon.
The image parameters referred to here include color (rendering color) data expressed in a so-called RGB format and the like, z values indicating a distance in the depth direction, and the like.
In recent high-definition three-dimensional graphics processing, image parameters such as f (fog: fog) for creating a sense of perspective and texture (texture) that expresses a material feeling or a pattern on the surface of an object to provide reality by expressing the image parameter. Is included as one.
[0007]
Here, the process of generating pixels inside the polygon from the vertex information of the polygon is often performed using a linear interpolation method called DDA (Digital @ Differential @ Analyzer).
In the DDA process, the inclination of data in the direction of the side of the polygon is obtained from the vertex information, the data on the side is calculated using this inclination, and then the inclination in the raster scanning direction (X direction) is calculated. The internal pixel is generated by adding the parameter change obtained from the above to the parameter value of the scanning start point.
[0008]
Incidentally, in order to improve the performance of the graphics LSI, it is effective not only to increase the operating frequency of the LSI but also to use a parallel processing method. The method of parallel processing is roughly classified as follows.
The first is a parallel processing method based on region division, the second is a parallel processing method at a primitive level, and the third is a parallel processing method at a pixel level.
[0009]
The above classification is based on the granularity of the parallel processing. The granularity of the region division parallel processing is the highest, and the granularity of the pixel level parallel processing is the finest. The outline of each method is described below.
[0010]
Parallel processing by region division
This is a method in which a screen is divided into a plurality of rectangular areas and parallel processing is performed while allocating areas in charge of each of the plurality of processing units.
[0011]
Parallel processing at the primitive level
This is a method in which different primitives (for example, triangles) are given to a plurality of processing units to operate in parallel.
[0012]
Pixel-level parallel processing
This is the most granular parallel processing method.
FIG. 1 is a diagram conceptually illustrating a parallel processing at a primitive level based on a technique of a parallel processing at a pixel level.
As shown in FIG. 1, in the parallel processing method at the pixel level, when rasterizing a triangle, pixels are formed in a rectangular area unit called a pixel stamp (Pixel @ Stamp) PS composed of pixels arranged in a 2 × 8 matrix. Generated.
In the example of FIG. 1, a total of eight pixel stamps from the pixel stamp PS0 to the pixel stamp PS7 are generated. Up to 16 pixels included in these pixel stamps PS0 to PS7 are processed simultaneously.
This method is more efficient in parallel processing because the granularity is smaller than other methods.
[0013]
[Problems to be solved by the invention]
However, in the case of the above-described parallel processing by region division, in order to efficiently operate the processing units in parallel, it is necessary to classify objects to be drawn in each region in advance, and the load of scene data analysis is heavy.
In addition, drawing is not started after all scene data for one frame is completed, but drawing is performed in a so-called immediate mode in which drawing is started immediately when object data is provided. I can't.
[0014]
Further, in the case of parallel processing at the primitive level, there is a difference in the time for processing one primitive for each processing unit because the size of the primitives constituting the object varies. When the difference is large, the area where the processing unit draws is also greatly different, and the locality of data is lost. Therefore, for example, page misses of the DRAM constituting the memory module frequently occur, and the performance is reduced.
Further, in the case of this method, there is a problem that the wiring cost is high. Generally, in hardware that performs graphics processing, memory interleaving is performed using a plurality of memory modules in order to increase the memory bandwidth.
At that time, it is necessary to connect all the processing units and each built-in memory module.
[0015]
On the other hand, in the case of the parallel processing at the pixel level, as described above, there is an advantage that the efficiency of the parallel processing is high due to the finer granularity, and the processing including the actual filtering is performed according to the procedure shown in FIG. ing.
[0016]
That is, DDA parameters, for example, DDA parameters such as inclination of various data (Z, texture coordinates, color, etc.) necessary for rasterization are calculated (ST1).
Next, the texture data is read from the memory (ST2), the sub-word rearrangement processing is performed by the first functional unit including the plurality of arithmetic units (ST3), and the second bar including the plurality of arithmetic units is operated by the crossbar circuit. It is integrated into functional units (ST4).
Next, texture filtering (Texture Filtering) is performed (ST5). In this case, the second functional unit performs filtering processing such as 4-neighbor interpolation using the read texture data and the decimal part obtained when the (u, v) address is calculated.
Next, pixel-level processing (Per-Pixel @ Operation), specifically, a pixel-by-pixel operation is performed using filtered texture data and various types of rasterized data (ST5).
Then, the pixel data that has passed various tests in the pixel level processing is drawn on the frame buffers and the Z buffers on the plurality of memory modules (ST6).
[0017]
By the way, the memory access of the texture read system is different from the memory access of the drawing system, so that it is necessary to read from the memory belonging to another module.
Therefore, as for the memory access of the texture read system, wiring such as a crossbar circuit is required as described above.
[0018]
However, in a conventional image processing apparatus, the first functional unit performs a large amount of arithmetic processing on data read from a memory by a plurality of arithmetic units, so that the configuration is complicated.
Further, for example, in order to perform two-dimensional processing such as template matching, it is necessary to perform vertical addition on element data over a plurality of columns and then perform horizontal addition. However, high-parallel arithmetic processing is required, but simply using multiple arithmetic units makes it difficult to distribute the data of all the arithmetic units. Is difficult.
Further, since the obtained data is output from each arithmetic unit to the crossbar circuit, there is a disadvantage that the crossbar circuit as a global bus becomes large, which hinders high-speed processing from the viewpoint of wiring delay.
[0019]
SUMMARY OF THE INVENTION The present invention has been made in view of the above circumstances, and has as its object to simplify a functional unit, improve the efficiency of processing, reduce the size of a crossbar circuit, and increase the processing speed. An object of the present invention is to provide a processing apparatus and a method thereof.
[0020]
[Means for Solving the Problems]
In order to achieve the above object, a first aspect of the present invention is an image processing apparatus that performs a template matching process by comparing a reference image and a changing target image, wherein the reference image is stored, and a plurality of ports are connected. A first memory, a second memory storing the target image and having a plurality of ports, and a plurality of ports of the first and second memories. A functional unit including a plurality of arithmetic units for performing parallel arithmetic processing based on the element data of the reference image and the element data of the target image read from the first memory and the second memory to generate continuous stream data; The operation units of the functional unit are cascade-connected from the first stage to the last stage, and each operation unit is connected to each port of the first and second memories, respectively. A predetermined operation is performed on the element data read from the element, and the result is output to the next-stage operation unit. The next-stage operation unit adds the operation result of the previous stage to the operation result of its own stage, and The result is output to the next-stage operation unit, the sum of all the operation units is obtained by the last-stage operation unit, and the operation result of the last stage is output as stream data.
[0021]
A second aspect of the present invention is an image processing apparatus that performs template matching processing by comparing a reference image and a changing target image, wherein the first memory stores the reference image and has a plurality of ports; A second memory that stores the target image and has a plurality of ports, and is provided corresponding to the plurality of ports of the first and second memories, and includes calculation parameters, the first memory and the second memory; A plurality of first functional units including a plurality of arithmetic units for performing parallel arithmetic processing based on the element data of the reference image and the element data of the target image read from the memory to generate continuous stream data; A second functional unit including a plurality of arithmetic units for performing intensive arithmetic processing on stream data generated by each of the first functional units; and the plurality of first functions. And a crossbar circuit for interconnecting the plurality of arithmetic units of the second functional unit with each other. The arithmetic units of each first functional unit are cascaded from a first stage to a last stage. Connected to each other, performs predetermined arithmetic processing on the element data read from each port of the first and second memories, and outputs the result to the next-stage arithmetic unit. The arithmetic unit adds the operation result of the previous stage to the operation result of its own stage, outputs the addition result to the next-stage arithmetic unit, calculates the sum of all the arithmetic units in the final-stage arithmetic unit, and calculates the final-stage operation result. Output as stream data.
[0022]
In the present invention, the reading of the element data of the reference image and the element data of the target image from the first and second memories to the respective arithmetic units of the functional unit is performed by sequentially inputting the data from the first stage, An address generator that generates an address so that the input of the operation result of the unit becomes a timing at which the operation of the stage is completed and the operation result of the previous stage can be added, and supplies the address to the first and second memories. Have.
[0023]
In the present invention, a memory module that stores at least one of the target image and the reference image and has a plurality of ports is provided, and the first and second memories are read from at least each port of the memory module. A plurality of first and second caches for storing image data and supplying the stored data to each of the operation units of the functional unit according to a cache address; When the element data of the reference image and the element data of the target image are read out to the arithmetic unit, the data is sequentially input from the first stage, and the input of the operation result of the previous stage arithmetic unit is completed when the operation of the own stage is completed and the operation of the previous stage is completed. Address generator for generating an address so as to be able to add the operation results of the units and supplying the address to the first and second caches Further comprising.
[0024]
In the present invention, preferably, the second functional unit is reconfigurable according to a control signal, and connects the arithmetic unit with an electrical connection network according to the control signal, and The electrical connection of the circuit is established to form an arithmetic circuit including a plurality of arithmetic units.
[0025]
In the present invention, the parallel processing is parallel processing at a pixel level.
[0026]
According to a third aspect of the present invention, there is provided an image processing apparatus in which a plurality of modules share processing data and perform parallel processing, the image processing apparatus including a global module and a plurality of local modules, wherein the global module includes the plurality of local modules. When the modules are connected in parallel and receive a request from the local module, processing data is output to the local module that issued the request in accordance with the request,
The plurality of local modules are modules for performing a template matching process by comparing a reference image and a changing target image, wherein the first memory storing the reference image and having a plurality of ports includes: A second memory that is stored and has a plurality of ports, and is provided corresponding to the plurality of ports of the first and second memories, and is read from the first memory and the second memory for operation parameters. And a functional unit including a plurality of arithmetic units for performing parallel arithmetic processing based on the element data of the reference image and the element data of the target image, and generating continuous stream data. The arithmetic units are cascaded from the first stage to the last stage, and each arithmetic unit is read from each port of the first and second memories. The specified element data is subjected to predetermined arithmetic processing and output to the next-stage arithmetic unit, and the next-stage arithmetic unit adds the previous-stage arithmetic result to the own-stage arithmetic result, and adds the addition result to the next-stage arithmetic unit. The output is output to the arithmetic unit, the sum of all the arithmetic units is obtained by the final stage arithmetic unit, and the operation result of the final stage is output as stream data.
[0027]
A fourth aspect of the present invention is an image processing apparatus in which a plurality of modules share processing data and perform parallel processing, the image processing apparatus including a global module and a plurality of local modules, wherein the global module includes the plurality of local modules. When the modules are connected in parallel and receive a request from the local module, the processing data is output to the local module that issued the request according to the request, and the plurality of local modules compare the reference image with the changing target image. A module that stores the reference image and has a plurality of ports; a second memory that stores the target image and has a plurality of ports; Provided in correspondence with the plurality of ports of the first and second memories; And a plurality of arithmetic units that perform parallel arithmetic processing based on the element data of the reference image and the element data of the target image read from the first memory and the second memory and generate continuous stream data. A plurality of first functional units, a second functional unit including a plurality of arithmetic units that perform intensive arithmetic processing on stream data generated by each of the first functional units, and a plurality of first functional units. A crossbar circuit interconnecting the functional units and the plurality of arithmetic units of the second functional unit, wherein the arithmetic units of the first functional units are arranged from the first stage to the last stage The arithmetic units are connected in cascade, perform predetermined arithmetic processing on the element data read from each port of the first and second memories, and output the data to the next arithmetic unit. The next-stage operation unit adds the operation result of the previous stage to the operation result of its own stage, outputs the addition result to the next-stage operation unit, calculates the sum of all the operation units in the last-stage operation unit, Is output as stream data.
[0028]
A fifth aspect of the present invention is an image processing method for performing a template matching process by comparing a reference image and a changing target image, wherein the first and second memories are respectively provided in a plurality of cascaded operation stages. A predetermined calculation process is performed on the element data of the reference image and the target image read from each port, and the next calculation stage adds the calculation result of the previous stage to the calculation result of its own stage, and The arithmetic stage calculates the sum of all the arithmetic stages, and outputs the arithmetic result of the final stage as stream data.
[0029]
A sixth aspect of the present invention is an image processing method for performing a template matching process by comparing a reference image and a changing target image, wherein each of the plurality of operation stages connected in cascade of a plurality of functional units has a first And performs predetermined arithmetic processing on the element data of the reference image and the target image read from each port of the second memory, and adds the arithmetic result of the preceding stage to the arithmetic result of its own stage in the next arithmetic stage The final operation stage calculates the sum of all the operation stages, outputs the operation result of the final stage to the crossbar circuit as stream data, and collects the crossbar circuit for a plurality of transferred stream data. Perform various arithmetic processing.
[0030]
According to the present invention, for example, the element data of the reference image and the target image stored in the first and second memories are read out from each port of the first and second memories, and the correspondence of each of the first functional units is determined. Is supplied to each computing unit.
In each computing unit of each first functional unit, predetermined computation processing (subtraction, multiplication, and total addition) is performed on the element data supplied from the cache.
At this time, in a plurality of cascade-connected arithmetic units, a predetermined arithmetic process is performed on the element data read from each port of the first and second memories, respectively. The operation result of the previous stage is added to the operation result of the stage, and the sum of all the operation stages is obtained in the final operation stage.
Then, the operation result of the final stage is output to the crossbar circuit as stream data.
The plurality of stream data by each first functional unit transferred to the crossbar circuit is supplied to the second functional unit.
In the second functional unit, an arithmetic circuit suitable for arithmetic operation is reconfigured by a control signal, and the arithmetic circuit performs intensive arithmetic processing on a plurality of stream data by each first functional unit.
[0031]
Further, according to the present invention, for example, in the case of texture-based processing, calculation parameters are generated in the controller, and the generated parameters are broadcast to the local module via, for example, a global module.
In each local module, for example, the following processing is performed.
That is, upon receiving the broadcasted parameter, it is determined whether or not the triangle belongs to an area in which it is responsible, for example, an area interleaved in units of a rectangular area of 4 × 4 pill cells. As a result, if they belong, various data (Z, texture coordinates, colors, etc.) are rasterized.
Next, a mipmap (MipMap) level is calculated by LOD (Level @ Detail) calculation, and a (u, v) address calculation for texture access is performed.
Then, the texture is read from the memory to the first functional unit.
Next, in the first functional unit of the local module, filtering processing such as 4-neighbor interpolation is performed using the read texture data and the decimal part obtained when the (u, v) address is calculated.
Next, pixel processing is performed in the second functional unit using the texture data after filtering and various data after rasterization.
Then, the pixel data that has passed various tests in the pixel-level processing is written to a memory module, for example, a frame buffer and a Z buffer on a built-in DRAM memory.
[0032]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 3 is a block diagram showing an embodiment of the image processing apparatus according to the present invention.
[0033]
As shown in FIG. 3, the image processing device 10 according to the present embodiment includes a stream data controller (SDC) 11, a global module 12, and a plurality of local modules 13-0 to 13-3.
[0034]
In the present image processing apparatus 10, the SDC 11 and the global module 12 exchange data, and a plurality m of one global module 12, in this embodiment, four local modules 13-0 to 13-3 are connected in parallel. The processing data is shared by the plurality of local modules 13-0 to 13-3 and processed in parallel. For the texture read system, memory access to another local module is required. Instead of taking the form of a global access bus, access is performed through one global module 12 having a function as a router.
The global module 12 has a global cache, and each of the local modules 13-0 to 13-3 has a local cache.
That is, the image processing apparatus 10 has two levels of cache, for example, a global cache shared by four local modules 13-0 to 13-3 and a local cache locally owned by each local module.
[0035]
The configuration and function of each component will be described below in order with reference to the drawings.
[0036]
The SDC 11 is responsible for sending and receiving data to and from the CPU and the external memory, and sending and receiving data to and from the global module 12, performs operations on vertex data, and performs rasterization in the processing units of the local modules 13-0 to 13-3. , Such as generation of parameters required for.
[0037]
The specific processing contents in the SDC 11 are as follows. FIG. 4 shows the processing procedure of the SDC 11.
[0038]
First, when data is input (ST1), the SDC 11 performs a Per-Vertex operation (ST2).
In this process, when the respective vertex data of the three-dimensional coordinates, the normal vector, and the texture coordinates are input, an operation is performed on the vertex data. As typical calculations, there are calculation processing of coordinate transformation for performing deformation of an object and projection on a screen, calculation processing of Lighting, and calculation processing of Clipping.
The processing performed here corresponds to the execution of so-called Vertex @ Shader.
[0039]
Next, a DDA (Digital @ Differential @ Analyzer) parameter is calculated (ST3).
In this process, DDA parameters such as the inclination of various data (Z, texture coordinates, color, etc.) necessary for rasterization are calculated.
[0040]
Next, the calculated DDA parameters are broadcast to all the local modules 13-0 to 13-3 via the global module 12 (ST4).
In this process, the broadcasted parameters are passed to the local modules 13-0 to 13-3 via the global module 12 using a channel different from the cache fill. However, it does not affect the contents of the global cache.
[0041]
The global module 12 has a router function and a global cache 121 shared by all local modules.
The global module 12 broadcasts the DDA parameters by the SDC 11 to all the local modules 13-0 to 13-3 connected in parallel.
[0042]
Further, upon receiving a request for a local cache fill (Local \ Cache \ Fill) LCF from a certain local module, for example, as shown in FIG. 5, the global module 12 checks an entry of the global cache (ST11). (ST12), reads the requested block data (ST13), sends the read data to the local module that sent the request (ST14), and if there is no entry (ST12), holds the block data. A request for a global cache fill (Global Cache Fill) GCF is sent to the target local module to be executed (ST15), and the global cache is sent using the block data sent thereafter. New to together (ST16, ST17), reads out the block data (ST13), the read data is sent to the local module that sent the request for the local cache fill LDF the (ST14).
[0043]
The local module 13-0 is a processing unit 131-0, for example, a memory module 132-0 including a DRAM, a local cache 133-0 unique to the module, and a global interface (Global Access Interface: GAIF) for controlling an interface with the global module 12. ) 134-0.
[0044]
Similarly, the local module 13-1 includes a processing unit 131-1, for example, a memory module 132-1 including a DRAM, a module-specific local cache 133-1, and a global interface (GAIF) 134 that manages an interface with the global module 12. -1.
The local module 13-2 includes a processing unit 131-2, for example, a memory module 132-2 including a DRAM, a module-specific local cache 133-2, and a global interface (GAIF) 134-2 for controlling an interface with the global module 12. Have.
The local module 13-3 includes a processing unit 131-3, for example, a memory module 132-3 composed of a DRAM, a module-specific local cache 133-3, and a global interface (GAIF) 134-3 for controlling an interface with the global module 12. Have.
[0045]
In each of the local modules 13-0 to 13-3, the memory modules 132-0 to 132-3 are interleaved in units of a predetermined size, for example, a rectangular area of 4 × 4. 0, the memory module 132-1 and the processing unit 131-1, the memory module 132-2 and the processing unit 131-2, and the memory module 132-3 and the processing unit 131-3 have one-to-one correspondence. In the drawing system, no memory access to other local modules occurs.
On the other hand, each of the local modules 13-0 to 13-3 requires memory access to other local modules for the texture read system. In this case, the local modules 13-0 to 13-3 access via the global module 12.
[0046]
Each of the processing units 131-0 to 131-3 of each of the local modules 13-0 to 13-3 is a streaming processor that executes so-called streaming data processing with high throughput, which is characteristic of image processing and graphics processing.
[0047]
The processing units 131-0 to 131-3 of the local modules 13-0 to 13-3 respectively perform, for example, the following graphics processing and image processing.
[0048]
First, the outline of the graphics processing of the processing units 131-0 to 131-3 will be described with reference to the flowcharts of FIGS.
[0049]
When the broadcasted parameter data is input (ST21), the processing unit 131 (-0 to -3) determines whether or not the triangle is an area in which the processing unit is in charge (ST22). , Rasterization is performed (ST23).
That is, upon receiving the broadcasted parameters, it is determined whether or not the triangle belongs to its own area, for example, an area interleaved in units of a rectangular area of 4 × 4 pixels. Various data (Z, texture coordinates, colors, etc.) are rasterized. In this case, the generation unit is 2 × 2 pixels in one cycle per local module.
[0050]
Next, a perspective collection of texture coordinates (Perspective @ Correction) is performed (ST24). In addition, this processing stage includes calculation of a mipmap (MipMap) level by LOD (Level @ of @ Detail) calculation, and calculation of (u, v) address for texture access.
[0051]
Next, the texture is read (ST25).
In this case, as shown in FIG. 7, the processing units 131-0 to 131-3 of each of the local modules 13-0 to 13-3 first execute the local cache 133-0 to 133-3 at the time of texture reading. The entry is checked (ST31). If there is an entry (ST32), necessary texture data is read (ST33).
When the required texture data is not in the local caches 133-0 to 133-3, the processing units 131-0 to 131-3 send the processing data to the global module 12 through the global interfaces 134-0 to 134-3. A request for a local cache fill is sent to it (ST34).
Then, the global module 12 returns the requested block to the local module that sent the request. If there is no requested block, as described above (described with reference to FIG. 5), the global module 12 sends the requested block to the local module that holds the block. Send a global cache fill request. After that, the block data is filled into the global cache, and the data is sent to the local module that sent the request.
When the requested block data is sent from the global module 12, the corresponding local module updates the local cache (ST35, ST36), and the processing unit reads the block data (ST33).
Here, it is assumed that a maximum of four textures are simultaneously processed, and the number of texture data to be read is 16 texels per pixel.
[0052]
Next, texture filtering (Texture Filtering) is performed (ST26).
In this case, the processing units 133-0 to 133-3 perform filtering processing such as 4-neighbor interpolation using the read texture data and the decimal part obtained at the time of calculating the (u, v) address.
[0053]
Next, pixel-level processing (Per-Pixel @ Operation) is performed (ST27).
In this process, a pixel-by-pixel operation is performed using the texture data after filtering and various data after rasterization. The processing performed here corresponds to so-called Pixel @ Shader such as pixel-level lighting (Per-Pixel @ Lighting). In addition, the following processing is included.
That is, the processing includes alpha test, scissoring, Z buffer test, stencil test, alpha blending, logical operation, and dithering.
[0054]
Then, the pixel data that has passed various tests in the pixel level processing is written to the memory modules 132-0 to 132-3, for example, the frame buffer and the Z buffer on the built-in DRAM memory (ST28: Memory).
Write).
[0055]
Next, an outline of the image processing of the processing units 131-0 to 131-3 will be described with reference to the flowchart of FIG.
[0056]
Before executing the image processing, the image data is loaded into the memory module 132 (-0 to -3).
Then, in the processing unit 131 (-0 to -3), commands and data necessary for generating a read (source) address and a write (destination) address required for image processing are input (ST41). .
Then, in the processing unit 131 (-0 to -3), a source address and a destination address are generated (ST42).
Next, the source image is read from the memory module 132 (-0 to -3) or supplied from the global module 12 (ST43), and predetermined image processing such as template matching is performed (ST44).
Then, predetermined arithmetic processing is performed as necessary (ST45), and the result is written to the area specified by the destination address of the memory module 132 (-0 to -3) (ST46).
[0057]
The local caches 133-0 to 133-3 of the local modules 13-0 to 13-3 store drawing data and texture data necessary for the processing of the processing units 131-0 to 131-3, respectively. To send and receive data (write and read) to and from the memory modules 132-0 to 132-3.
[0058]
FIG. 9 is a block diagram illustrating a configuration example of the local caches 133-0 to 133-3 of the local modules 13-0 to 13-3.
[0059]
As shown in FIG. 9, the local cache 133 includes a read-only cache (RO #) 1331, a read / write cache (RW #) 1332, a reorder buffer (Reorder \ Buffer: RB) 1333, and a memory controller (MC) 1334.
[0060]
The read-only cache 1331 is a read-only cache for reading a source image or the like of an arithmetic process, and is used for storing, for example, texture data.
The read / write cache 1332 is a cache for executing an operation that requires both reading and writing typified by, for example, read-modify-write (Read-Modify-Write) in graphics processing. Used.
[0061]
The reorder buffer 1333 is a so-called queuing buffer. If there is no necessary data in the local cache, the order of data sent to the global module 12 may be different when a local cache fill request is issued. The order of the data is adjusted so as to comply with this order and return to the processing units 131-0 to 131-3 in the order of request.
[0062]
FIG. 10 is a block diagram showing a configuration example of a texture system of the memory controller 1334.
As shown in FIG. 10, the memory controller 1334 arbitrates the cache controllers 13340 to 13343 corresponding to the four caches CSH0 to CSH3 and the local cache fill requests output from each of the cache controllers 13340 to 13343, and performs global arbitration. An arbiter 13344 for outputting data to -0 to 3 # and a memory interface 13345 for controlling data transfer in response to a global cache fill request input via the global interface 134 # -0 to 3 #.
[0063]
In addition, the cache controllers 13340 to 13343 provide the two-dimensional addresses COuv00 to COuv03, COuv10 to COuv13, COuv20 to COuv23 of each data necessary when performing the 4-neighbor interpolation on the data corresponding to the four pixels PX0 to PX3, respectively. The conflict checker CC10 that checks and distributes address conflicts in response to COuv30 to COuv33 and checks the address distributed by the conflict checker CC10 to determine whether or not the data indicated by the address exists in the read-only cache 1331. It has a tag circuit TAG10 and a queue register QR10.
The tag circuit TAG10 has four tag memories BX10 to BX13 corresponding to addressing related to interleaving of banks, which will be described later, and is stored in the read-only cache 1331.
The address distributed by the conflict checker CC10 holding the address tag of the block data is compared with the address tag, and a flag indicating whether or not the address is matched and the address are set in the queue register QR10. The address is sent to the arbiter 13344.
The arbiter 13344 performs an arbitration operation in response to the address transmitted from the cache controllers 13340 to 13343, selects an address according to the number of requests that can be transmitted simultaneously via the global interface (GAIF) 134, and sets the address as a local cache fill request. Output to the global interface (GAIF) 134.
When data is sent from the global cache 12 in response to the local cache fill request sent via the global interface (GAIF) 134, the data is set in the reorder buffer 1333.
The cache controllers 13340 to 13343 check the flag at the head of the queue register QRL0, and if a flag indicating that they match is set, based on the address at the head of the queue register QRL0, the read-only cache 1331 Is read and given to the processing unit 131. On the other hand, if the flag indicating the match has not been set, the corresponding data is read from the reorder buffer 1333 when the corresponding data is set in the reorder buffer 1333, and read with the block data based on the address of the queue register QRL0. It updates the only cache 1331 and outputs it to the processing unit 131.
[0064]
Next, the memory capacity of the DRAM as a memory module, the local cache, and the global cache will be described.
The relationship between the memory capacities is naturally DRAM> global cache> local cache, but the ratio depends on the application.
The cache block size corresponds to the data size read from the lower-level memory when the cache is filled.
A characteristic of the DRAM is that the performance is reduced at the time of random access, but the continuous access of data belonging to the same row (ROW) is fast.
[0065]
The performance of the global cache is preferably higher in terms of performance in terms of reading data from the DRAM.
Therefore, the size of the cache block is set large.
For example, the size of the cache block of the global cache can be set to a block size of one row of the DRAM macro.
[0066]
On the other hand, in the case of the local cache, if the block size is increased, the ratio of unused data increases even if it is cached, and the lower layer is a global cache, which is not DRAM and does not need continuous access. , The block size is set small.
As the block size of the local cache, a value close to the size of the rectangular area of the memory interleave is appropriate. In the present embodiment, the block size is 4 × 4 pixels, that is, 512 bits.
[0067]
Next, texture compression will be described.
Since a plurality of pieces of texture data are required to process one pixel, the texture readout bandwidth often becomes a bottleneck, but a method of compressing the texture is often adopted to reduce this.
There are various compression methods. In the case of a method capable of compressing / decompressing data in units of a small rectangular area such as 4 × 4 pixels, the compressed data is stored in the global cache, and the decompressed data is stored in the local cache. It is preferable to put later data.
[0068]
Next, a specific configuration example of the processing units 131-0 to 131-3 of the local modules 13-0 to 13-3 will be described.
[0069]
FIG. 11 is a block diagram illustrating a specific configuration example of the processing unit of the local module according to the present embodiment.
[0070]
As shown in FIG. 11, the processing units 131 (-0 to -3) of the local module 13 (-0 to -3) have a rasterizer (RSTR) 1311 and a core (Core) 1312.
Among these components, an arithmetic processing unit that implements the present architecture is a core 1312, and the core 1312 is supplied with various data for graphics processing such as addresses and coordinates and image processing by a rasterizer 1311.
[0071]
In the case of graphics processing, the rasterizer 1311 receives the parameter data broadcast from the global module 12 and determines, for example, whether or not the triangle is in its own area. Rasterization is performed based on the input triangle vertex data, and the generated pixel data is supplied to the core 1312.
The pixel data generated by the rasterizer 1311 includes window coordinates (X, Y, Z), primary colors (Primary @ Color: PC) (Rp, Gp, Bp, Ap), and secondary colors (Secondary @ Color: SC) (Rs, Gs, Bs, As), Fog coefficient (f), texture coordinates, normal vector, line-of-sight vector, light vector ((V1x, V1y, V1z), (V2x, V2y, V2z)).
The data supply line from the rasterizer 1311 to the core 1312 includes, for example, a supply line for window coordinates (X, Y, Z), another primary color (Rp, Gp, Bp, Ap), and a secondary color (Rs, Gs). , Bs, As), the Fog coefficient (f), the texture coordinates (V1x, V1y, V1z), and the supply line of (V2x, V2y, V2z) are formed by different wirings.
[0072]
In the case of image processing, the rasterizer 1311 includes, for example, a source address for reading image data from the memory module 132 (−0 to −3) and an image processing result output from a higher-level device (not illustrated) via the global module 12. Command and data necessary for generating a destination address for writing the data, such as the width and height data (Ws, Hs) and block size data (Wbk, Hbk) of the search rectangular area, and based on the input data, The source address (X1s, Y1s) and / or (X2s, Y2s) are generated, and the destination address (Xd, Yd) is generated and supplied to the core 1312.
As a supply line of data from the rasterizer 1311 to the core 1312 at the time of image processing, for example, a supply line of window coordinates (X, Y, Z) at the time of graphics processing is shared with respect to a destination address (Xd, Yd). For the addresses (X1s, Y1s) and (X2s, Y2s), supply lines such as the texture coordinates (V1x, V1y, V1z) and (V2x, V2y, V2z) are shared.
[0073]
The core 1312 is an arithmetic processing unit for realizing the present architecture, and the core 1312 is supplied with various data by a rasterizer 1311.
The core 1312 has the following functional units that perform arithmetic processing on stream data.
That is, the core 1312 includes a graphics unit (Graphics {Unit}: GRU) 13121 as a first functional unit, a pixel engine (Pixel Engineer: PXE) 13122 as a third functional unit, and a pixel as a second functional unit. An arithmetic processor (Pixel 0 operation Processor: POP) group 13123 is provided.
The core 1312 supports various algorithms by switching the connection between these functional units according to, for example, a data flow graph (Data {Flow} Graph: $ DFG). {Furthermore, the core 1312 includes a register unit (Register Unit: RGU) 13124 and a crossbar circuit (Interconnection X-Bar}: IXB) 13125.
[0074]
The graphics unit (GRU) 13121 is a functional unit in which the addition of dedicated hardware, which is clearly advantageous in terms of cost performance when executing graphics processing, is implemented by hard-wired logic.
The graphics unit 13121 implements functions such as perspective collection (Perspective @ Correction) and MIPMAP level calculation, which are related to graphics processing.
[0075]
The graphics unit 13121 is supplied with the texture coordinates (V1x, V1y, V1z) supplied by the rasterizer 1311 via the crossbar circuit 13125 and the register unit (RGU) 13124, and / or supplied by the rasterizer 1311 or the pixel engine (PXE) 13122. Based on the input data, input the texture coordinate (V2x, V2y, V2z) data, perform perspective correction, calculate a mipmap (MIPMAP) level by LOD (LevelofDetail) calculation, select a surface of a cubic map (Cube @ Map), A calculation process of the normalized texel coordinates (s, t) is performed, and for example, graphics data (s1, t1, l) including the normalized texel coordinates (s, t) and LOD data (lod) d1) and / or (s2, t2, lod2) is output to the pixel operation processor (POP) group 13123.
The output graphics data (s1, t1, lod1) and (s2, t2, lod2) of the graphics unit 13121 are passed through the crossbar circuit 13125 and the register unit (RGU) 13124, or as indicated by broken lines in FIG. Is supplied directly to a pixel operation processor (POP) group 13123 via another wiring.
[0076]
A pixel engine (PXE) 13122 as a third functional unit is a functional unit that performs stream data processing, and has a plurality of arithmetic units inside. The pixel engine 13122 has a higher degree of freedom in connection between arithmetic units as compared to the pixel operation processor (POP) group 13123, and has a rich function of the arithmetic units.
[0077]
The pixel engine (PXE) 13122 sets the information on the drawing target and the operation result in the pixel operation processor (POP) group 13123 in a desired FIFO register of the register unit (RGU) 13124 by the crossbar circuit 13125, for example, The signal is directly supplied via a register unit (RGU) 13124 without passing through the bar circuit 13125.
The data input to the pixel engine (PXE) 13122 include, for example, information on the surface to be drawn (surface direction, color, reflectance, pattern (texture), etc.), and information on the light hitting the surface (incident direction, intensity). And the like, and past calculation results (intermediate values of the calculations).
[0078]
The pixel engine (PXE) 13122 has a plurality of arithmetic units, and is, for example, an arithmetic unit capable of reconfiguring an arithmetic path by external control, and is provided between internal arithmetic units so as to realize a desired arithmetic operation. An electrical connection is established, and the data input through the register unit (RGU) 13124 is input to a data path of a series of arithmetic units formed from the arithmetic unit and an electrical connection network (interconnect), thereby performing an arithmetic operation. And outputs the operation result.
[0079]
That is, the pixel engine 13122 has, for example, a plurality of reconfigurable data paths, and connects arithmetic units (adders, multipliers, multiply-adders, and the like) by an electrical connection network. An arithmetic circuit is constructed.
Then, the pixel engine 13122 can continuously input data and perform an operation to the operation circuit reconfigured in this way. For example, the pixel engine 13122 is a binary tree-shaped DFG (data flow graph). The arithmetic circuit can be configured using a connection network that can efficiently realize the expressed arithmetic with a small circuit scale.
[0080]
FIG. 12 is a block diagram illustrating a configuration example of the pixel engine (PXE) 13122.
The present pixel engine (PXE) 13122 has a computing unit pool 200 as shown in FIG.
The computing unit pool 200 includes at least one (four in the example of FIG. 12) computing units 201 to 204 that exchange data with the stream register unit 13124 via the data bus BS.
Each of the arithmetic units 201 to 204 includes an electrical connection between a plurality of (eight in the example of FIG. 12) arithmetic units (adders, multipliers, multipliers, etc.) OP1 to OP8 and the arithmetic units OP1 to OP8. Includes a connection network CCN whose connection can be changed.
[0081]
That is, in the pixel engine (PXE) 13122, the connection network operation unit CCN exists between the operation units OP.
As described above, by independently providing the register file, the circuit amount can be reduced.
[0082]
In the example of FIG. 12, each of the arithmetic units 201 to 204 is configured to individually transmit and receive data to and from the register unit (RGU) 13124 via the data bus BS and the crossbar circuit 13125. For example, a mode is also possible in which each of the arithmetic units 201 to 204 is connected by another signal line, and an arithmetic operation is performed using the arithmetic result of one arithmetic unit in another arithmetic unit.
[0083]
FIG. 13 is a diagram showing a configuration example of the connection network CCN according to the present invention.
A feature of the configuration of the connection network CCN is that, for example, when there are 2n input buses, n arithmetic units select a pair of inputs from a register unit (RGU) 13124 and an output of a preceding (left) arithmetic unit. And input it to the arithmetic unit at its own stage. The remaining arithmetic units select all inputs from the register unit (RGU) 13124 and the output of the preceding stage (left side) and input them to the arithmetic units.
[0084]
The connection network CCN of FIG. 13 is a configuration example having four pairs of eight input buses L11, L12, L21, L22, L31, L32, and L41, L42.
In FIG. 13, a black circle shown at a predetermined intersection of the input bus indicates a selector. FIG. 14 shows a configuration example of each selector.
Note that the lines in the drawing indicate bundled wires (a group of two or more signal lines).
[0085]
FIG. 13 shows an example of a configuration having seven operation units OP1 to OP7. The stages from the input to the output of the operation units arranged in parallel to the stages STG1 to STG7 (the output of the operation unit OP7 of the final stage 7 is The data is sent to the stream register file) as follows.
[0086]
That is, in the first stage STG1, a pair of input buses L11 and L12 are connected to the input of the arithmetic unit OP1, and the output of the arithmetic unit OP1 is output from the next stage and thereafter (in the example of FIG. 13, the input side of the third stage STG3). It is connected to the.
In the second stage STG2, a pair of input buses L21 and L22 are connected to the input of the operation unit OP2, and the output of the operation unit OP2 is connected to the input side of the third stage STG3.
[0087]
In the third stage STG3, a pair of input buses L31 and L32 are connected to the input of the operation unit OP3, and the output of the operation unit OP3 is connected to the input side of the third stage STG4. The output lines of the operation unit OP1 of the first stage STG1 and the output line of the operation unit OP2 of the second stage STG2 intersect with the input buses L31 and L32, respectively. The selector SLC shown in FIG.
[0088]
In the fourth stage STG4, a pair of input buses L41 and L42 are connected to the input of the operation unit OP4, and the output of the operation unit OP4 is connected to the input side of the fifth stage STG5. The output lines of the operation unit OP1 of the first stage STG1, the output line of the operation unit OP2 of the second stage STG2, and the output line of the operation unit OP3 of the third stage STG3 cross the input buses L41 and L42. The selector SLC shown in FIG. 13 is arranged at each of these six intersections.
[0089]
In the fifth stage STG5, the input bus L42 and the input bus L42 are selected so that all the inputs from the register unit (RGU) 13124 and the outputs of the first to fourth stages STG1 to STG4 are selectively input to the arithmetic unit OP5. Eight intersections with the buses L21, L22, L31, L32, L41, the output line of the operation unit OP1 of the first stage STG1, the output line of the operation unit OP2 of the second stage STG2, and the operation unit OP3 of the third stage STG3 The selector SLC shown in FIG. 14 is disposed at each of the eight intersections where the output line of the fourth stage STG4 intersects with the output line of the operator OP4.
[0090]
In the sixth stage STG6, the input bus L42 and the input bus L42 are input to the operation unit OP6 such that all the inputs from the register unit (RGU) 13124 and the outputs of the first to fifth stages STG1 to STG5 are selected and input. Eight intersections with the buses L21, L22, L31, L32, L41, the output line of the operation unit OP1 of the first stage STG1, the output line of the operation unit OP2 of the second stage STG2, and the operation unit OP3 of the third stage STG3 The selector SLC shown in FIG. 14 is arranged at each of ten intersections where the output line of the fourth stage STG4, the output line of the operation unit OP4 of the fourth stage STG4, and the output line of the operation unit OP5 of the fifth stage STG5 intersect. I have.
[0091]
In the seventh stage STG7, the input bus L42 and the input bus L42 are input to the operation unit OP7 such that all the inputs from the register unit (RGU) 13124 and the outputs of the first to sixth stages STG1 to STG6 are selected and input. Eight intersections with the buses L21, L22, L31, L32, L41, the output line of the operation unit OP1 of the first stage STG1, the output line of the operation unit OP2 of the second stage STG2, and the operation unit OP3 of the third stage STG3 , The output line of the operator OP4 of the fourth stage STG4, the output line of the operator OP5 of the fifth stage STG5, and the twelve intersections where the output lines of the operator OP6 of the sixth stage STG6 intersect. The selector SLC shown in FIG.
[0092]
Here, the outline of the calculation execution of the pixel engine (PXE) 13122 according to the present invention will be described with reference to FIGS.
[0093]
For example, an operation of reading data A, B, C, and D from the register unit (RGU) 13124 and writing a value corresponding to Y in the following equation to the register unit (RGU) 13124 is performed a plurality of times.
[0094]
(Equation 1)
Y [i] = (A [i] + B [i]) × (C [i] + D [i])
[0095]
FIG. 15 shows a DFG (data flow graph) of the operation shown in Expression (1).
[0096]
The operation unit OP1 having the function of executing the operation 1 is connected to the output of the register file 2011 to which the value corresponding to the data A is output by the connection 0 which is an electrical connection path corresponding to the branch 0.
Similarly, through connections 1 to 3 corresponding to branches 1 to 3, the output corresponding to data B of the register unit (RGU) 13124 is connected to the operating unit OP1 and the outputs corresponding to data C and D are connected to the operating unit OP2. .
The output of the operation unit OP1 is connected to a connection 4 corresponding to the branch 4 and the output of the operation unit OP2 is connected to an input of a calculation unit OP3 having a function of executing the operation 3 through a connection 5 corresponding to the branch 5.
The output of the arithmetic unit OP3 is input to the register file 2011 via the connection 6 corresponding to the branch 6, and a path for writing a value corresponding to Y is established.
[0097]
In this way, the electrical connection between the register file and the arithmetic unit is realized, and data corresponding to A [i], B [i], C [i], and D [i] are sequentially read from the register file, and the arithmetic operation is performed. , The operations for the plurality of A to D are efficiently realized.
The pixel engine (PXE) 13122 realized in this manner can easily cope with different calculations by changing the electrical connection between the calculators.
In the case of the configuration of FIG. 13, arithmetic units OP1 to OP3 are used, and connection 0 and connection 1 correspond to input buses L11 and L12, and connection 2 and connection 3 correspond to input buses L21 and L22.
The selector 4 shown in FIG. 13 forms a connection 4 for inputting the operation result of the operation unit OP1 to the operation unit OP3, and the selector SLC2 forms a connection 5 for inputting the operation result of the operation unit OP2 to the operation unit OP3.
Then, a connection 6 for outputting the operation result of the operation unit OP3 to the register unit (RGU) 13124 as it is is formed.
[0098]
The above operation is executed by pipeline processing as shown in FIG.
17A shows a clock, RR in FIG. 17B shows a process of reading data A to D from the register unit (RGU) 13124, and FIGS. 17C, 17E, and 17G. IC indicates data transfer processing via the connection network CCN, Add1 / 0 in FIG. 17D indicates arithmetic processing by the operating units OP1 and OP2, and mul in FIG. 17F indicates arithmetic processing by the operating unit OP3. WB in FIG. 17H indicates a process of writing the operation result to the register unit (RGU) 13124.
[0099]
The pixel engine (PXE) 13122 according to the present embodiment can dynamically reconstruct the data path as described above.
Accordingly, the pixel engine (PXE) 13122 can change the electrical connection between the operation units when executing the operation in a pipeline using the operation circuit.
Also, by dynamically changing the configuration between the computing units as described above, different computations can be performed without delay.
[0100]
In addition, the pixel engine (PXE) 13122 automatically stores information on the next operation to be performed by the control circuit added to each of the arithmetic units, and detects the end of a series of operations. It has a function to switch to control for the next calculation.
Then, in the pixel engine (PXE) 13122, when the control circuit assigned to each connection point of the connection network CCN holds information on the next connection configuration to be taken and detects the end of a series of data transfer. Each of the control circuits has a function of automatically switching the control of the connection point.
[0101]
Next, a method for implementing dynamic reconfiguration will be described.
[0102]
Realization method 1 of dynamic restructuring
First, a first method of realizing dynamic reconfiguration will be described with reference to FIGS.
In this case, as shown in FIG. 18, the control circuit 301 for each operation unit OP and the connection network control circuit CCN includes current control information (current control information) CIFM and information on control to be performed next (next control information). Keep two NIFMs.
Then, the operation data OPDT is transmitted in synchronization with the control signal CTL that can identify that it is the final data used for the operation.
When it is determined that the data is the last data, the control circuit 301 rewrites the current control information CIFM with the next control information NIFM simultaneously with the completion of the currently executed operation.
Thus, the control of the arithmetic circuit can be changed, and different arithmetic can be performed.
[0103]
The same applies to the connection network CCN. As shown in FIG. 19, when the control signal CTL identifies that the data is the last data, the control circuit 301 simultaneously completes the data transfer currently being executed with the current control signal. The information CIFM is rewritten with the next control information NIFM.
As a result, the control of the connection network can be changed, and different electrical connections can be realized.
[0104]
Next, a second method of realizing dynamic reconfiguration will be described with reference to FIGS.
[0105]
Realization method 2 of dynamic restructuring
As described above, when different arithmetic operations are continuously performed using an arithmetic device including an arithmetic circuit and a connection network, as shown in FIG. (Overlap section of operation 1 and operation 2) occurs.
During this time, data for different operations exist simultaneously on the operation circuit and the connection network.
In this section, control corresponding to operation 2 is performed on some circuits while the final data of operation 1 exists on the operation circuit.
Therefore, when the final data of the operation 1 arrives at the operation unit performing the operation 2 or the connection network control circuit under the control corresponding to the operation 2, they are recognized as the end of the operation, and There is a possibility that the control is switched from the control to the control for the calculation 3, and the calculation for the remaining calculation 2 is not normally performed.
An example of realizing dynamic reconfiguration corresponding to this will be described below.
[0106]
In this case, as shown in FIG. 21, the control circuit 301 for each operation unit OP and the connection network control circuit CCN transmits the current control information (current control information) CIFM and the information (current Identification information) CDSC, information on next control to be performed (next control information) NIFM, and information (next identification information) NDSC for identifying an operation to be executed next.
The operation data OPDT is synchronized with the control signal CTL indicating information that can be identified as the final data used for the operation and information that can identify whether the data is for the operation 1 or the operation 2. Will be sent.
When the control circuit 301 determines that the transmitted data is the final data and is for the operation indicated by the current identification information CDSC, the control circuit 301 simultaneously executes the completion of the operation currently being executed and the current control information. The CIFM and the current identification information CDSC are rewritten with the next control information NIFM and the next identification information NDSC, respectively.
As a result, it is possible to switch to a different operation at an appropriate timing with respect to stream data continuously input.
[0107]
The same applies to the connection network CCN. As shown in FIG. 22, the current control information CIFM and the current identification information IDSC are rewritten with the next control information NIFM and the next identification information NDSC, respectively, at the same time as the completion of the currently executed data transfer. .
This makes it possible to switch to a different electrical connection at appropriate timing for data that is continuously input.
[0108]
FIG. 23 is a diagram illustrating a preferred configuration example of the pixel engine (PXE) 13122 and a connection example with the register unit (RGU) 13124 and the crossbar circuit 13125.
[0109]
As shown in FIG. 23, the pixel engine (PXE) 13122 has a plurality of (16 in the example of FIG. 23) arithmetic units OP1 to OP8 and OP11 to OP18 based on a two- or three-input MAC (Multiply and Accumulator). And one or more (four in the example of FIG. 23) look-up tables LUT1, LUT2, LUT11, and LUT12.
[0110]
As shown in FIG. 23, the two inputs of each of the arithmetic units OP1 to OP8 and OP11 to OP18 in the pixel engine (PXE) 13122 are connected to the FIFO (First-IN {First-Out)} register FREG of the register unit (RGU) 13124. Is directly connected to.
Similarly, one input of the look-up tables LUT1, LUT2, LUT11, and LUT12 is directly connected to the FIFO register FREG of the register unit (RGU) 13124.
The outputs of the operation units OP1 to OP8, OP11 to OP18 and the lookup tables LUT1, LUT2, LUT11, LUT12 are connected to a crossbar circuit 13125.
[0111]
Further, in the example of FIG. 23, the output of the operation unit OP1 is connected to two inputs of the operation units OP3 and OP4 and one input of the three-input operation unit OP2, respectively. Similarly, the output of the operation unit OP2 is connected to two inputs of the operation unit OP4 and one input of the three-input operation unit OP3, respectively. The output of the operation unit OP3 is connected to one input of a three-input operation unit OP4.
The output of the operation unit OP5 is connected to two inputs of the operation units OP7 and OP8 and one input of the three-input operation unit OP6, respectively. Similarly, the output of the operation unit OP6 is connected to the two inputs of the operation unit OP8 and the one input of the three-input operation unit OP7, respectively. The output of the operation unit OP7 is connected to one input of the three-input operation unit OP8.
Further, the output of the operation unit OP11 is connected to two inputs of the operation units OP13 and OP14 and one input of the three-input operation unit OP12, respectively. Similarly, the output of the operation unit OP12 is connected to two inputs of the operation unit OP14 and one input of the three-input operation unit OP13, respectively. The output of the operation unit OP13 is connected to one input of the three-input operation unit OP14.
The output of the operation unit OP15 is connected to two inputs of the operation units OP17 and OP18 and one input of the three-input operation unit OP16, respectively. Similarly, the output of the operation unit OP16 is connected to two inputs of the operation unit OP18 and one input of the three-input operation unit OP17, respectively. The output of the operation unit OP17 is connected to one input of a three-input operation unit OP18.
[0112]
As described above, in the pixel engine (PXE) 13122 of FIG. 23, the output of the arithmetic unit OP1 is connected to the arithmetic units OP2, OP3, and OP4 via the forwarding path, and the arithmetic units OP2, OP3, and OP4 The output of OP1 can be referred to as a source operand.
The output of the operation unit OP2 is connected to the operation units OP3 and OP4 via a forwarding path, and the operation units OP3 and OP4 can refer to the output of the operation unit OP2 as a source operand.
The output of the operation unit OP3 is connected to the operation unit OP4 via a forwarding path, and the operation unit OP4 can refer to the output of the operation unit OP3 as a source operand.
The output of the computing element OP5 is connected to the computing elements OP6, OP7, OP8 via a forwarding path, and the outputs of the computing elements OP6, OP7, OP8 and OP5 can be referred to as source operands.
The output of the operation unit OP6 is connected to the operation units OP7 and OP8 via a forwarding path, and the operation units OP7 and OP8 can refer to the output of the operation unit OP6 as a source operand.
The output of the operation unit OP7 is connected to the operation unit OP8 via a forwarding path, and the operation unit OP8 can refer to the output of the operation unit OP7 as a source operand.
Similarly, the output of the operation unit OP11 is connected to the operation units OP12, OP13, and OP14 via a forwarding path, and the operation units OP12, OP13, and OP14 can refer to the output of the operation unit OP11 as a source operand.
The output of the operation unit OP12 is connected to the operation units OP13 and OP14 via a forwarding path, and the operation units OP13 and OP14 can refer to the output of the operation unit OP12 as a source operand.
The output of the operation unit OP13 is connected to the operation unit OP14 via a forwarding path, and the operation unit OP14 can refer to the output of the operation unit OP13 as a source operand.
The output of the operation unit OP15 is connected to the operation units OP16, OP17, and OP18 via a forwarding path, and the outputs of the operation units OP16, OP17, OP18, and the operation unit OP15 can be referred to as source operands.
The output of the operation unit OP16 is connected to the operation units OP17 and OP18 via a forwarding path, and the operation units OP17 and OP18 can refer to the output of the operation unit OP16 as a source operand.
The output of the operation unit OP17 is connected to the operation unit OP18 via a forwarding path, and the operation unit OP18 can refer to the output of the operation unit OP17 as a source operand.
The look-up tables LUT1, LUT2, LUT11, and LUT12 are, for example, arbitrarily definable RAM-LUTs, and can refer to a maximum of L (L: the number of tables that can be referred to simultaneously) in one context. The lookup tables LUT1, LUT2, LUT11, and LUT12 hold elementary functions such as sin / cos, for example.
[0113]
In the above configuration, as for the number of connections between the pixel engine (PXE) 13122 and the register unit (RGU) 13124, the number CN1 of connections from the pixel engine (PXE) 13122 to the crossbar circuit (IBX) 13125 is as follows. .
[0114]
(Equation 2)
CN1 = (the number of arithmetic units + the number of LUTs that can be referenced simultaneously) × 1
[0115]
The number of connections CN2 from the register unit (RGU) 13124 to the pixel engine (PXE) 13122 is as follows.
[0116]
(Equation 3)
CN2 = number of arithmetic units × 2 + number of LUTs that can be referred to simultaneously × 1
[0117]
The pixel engine (PXE) 13122 having the above configuration is set to a desired FIFO register of the register unit (RGU) 13124 via the crossbar circuit 13125 during, for example, graphics processing, and is directly input from the FIFO register. Operation result data (TR1, TG1, TB1, TA1) and (TR2, TG2, TB2, TA2) in the pixel operation processor (POP) group 13123, and set to a desired FIFO register of the register unit (RGU) 13124 by the rasterizer 1311 Then, based on the primary color (PC), secondary color (SC), and Fog coefficient (F) directly input from the FIFO register, an operation such as a pixel shader (Pixel @ Shader) is performed. , Color data (FR1, FG1, FB1) and mixing value (a blend value: FA1) Request.
The pixel engine (PXE) 13122 converts the data (FR1, FG1, FB1, FA1) into a predetermined POP of the pixel operation processor (POP) group 13123 or through a crossbar circuit 13125 and a register unit (RGU) 13124. The data is transferred to a separately provided light unit WU.
[0118]
The pixel operation processor (POP) group 13123 includes a plurality of POPs, which are functional units that perform highly parallel arithmetic processing utilizing the memory bandwidth, and in this embodiment, for example, as shown in FIG. 24, four POPs POP0 to POP3. Have.
Each POP includes a plurality of arithmetic units called POPE (Pixel \ Operation \ Processing \ Element) arranged in parallel. It also has an address generation function for the memory.
Since the pixel operation processor (POP) group 13123 and the cache are connected with a wide bandwidth and have a built-in address generation function for memory access, stream data that maximizes the operation capability of the operation unit Can be supplied.
[0119]
The pixel operation processor (POP) group 13123 performs, for example, the following processing during graphics processing.
For example, based on the values of (s1, t1, lod1) and (s2, t2, lod2) directly supplied from the graphics unit (GRU) 13121, the (u, v) address calculation for texture access is performed. , (U, v) coordinates of four neighbors for performing four neighbor filtering based on address data (ui, vi, lodi), that is, (u0, v0), (u1, v1), (u2, v2), (U3, v3) is calculated and supplied to the memory controller MC to read desired texel data from the memory module 132 to each POPE through, for example, a read-only cache RO #.
Further, the pixel operation processor (POP) group 13123 calculates a texture filter coefficient K based on data (uf, vf, lodf) for coefficient generation and supplies it to each POP.
Then, in each POP of the pixel operation processor (POP) group 13123, color data (TR, TG, TB) and a mixture value (blend value: TA) are obtained, and (TR, TG, TB, TA) is converted to a crossbar circuit 13125. , Via a register unit (RGU) 13124 to a pixel engine (PXE) 13122.
[0120]
On the other hand, the pixel operation processor (POP) group 13123 performs, for example, the following processing during image processing.
The pixel operation processor (POP) group 13123 is generated by, for example, the rasterizer 1311 and set in the register unit (RGU) 13124, and is directly supplied to the graphics unit (GRU) 13121 without passing through the crossbar circuit 13125. Based on the obtained source addresses (X1s, Y1s) and (X2s, Y2s), image data stored in the memory module 132 is read out, for example, via a read-only cache RO # and / or a read-write cache RW #, A predetermined calculation process is performed on the read data, and the calculation result is transferred to the write unit WU via the crossbar circuit 13125 and the register unit (RGU) 13124.
[0121]
A more specific configuration of the POP having the above-described functions will be described later in detail.
[0122]
The register unit (RGU) 13124 is a register file having a FIFO structure for storing stream data processed by each functional unit in the core 1312.
In addition, when a DFG must be divided into a plurality of sub-DFGs (Sub-DFGs) and executed due to hardware resources, it also functions as an intermediate value storage buffer between the sub-DFGs.
As shown in FIG. 23, the output of the FIFO register FREG in the register unit (RGU) 13124 and the input ports of the arithmetic units of the pixel engine (PXE) 13122 and the pixel operation processor (POP) group 13123 which are functional units are as follows. Corresponds one-to-one.
[0123]
The crossbar circuit 13125 realizes this connection switching so that the core 1312 can support various algorithms by changing the connection between the functional units according to the DFG.
As described above, the output of the FIFO register FREG in the register unit (RGU) 13124 and the input port of the functional unit are fixed and correspond one-to-one, but the output port of the functional unit and the FIFO in the register unit (RGU) 13124 The input of the register FREG is switched by the crossbar circuit 13125.
[0124]
FIG. 25 is a diagram illustrating a connection form between a POP (pixel operation processor) and a memory and a configuration example of the POP.
In the example of FIG. 25, each POP (0 to 3) has four arithmetic units POPE0 to POP3 arranged in parallel.
[0125]
In the present embodiment, the image data is stored in the memory module 132 (-0 to -3) of the local module 13 (-0 to -3). , POP (0 to 3) and the memory module 132, respectively.
In such a configuration, when performing pixel-level parallel operation processing in POP0 to POP3, there are the following two methods for accessing image data.
The first is a method of directly reading out image data stored in the memory module 132 and performing an operation.
A second method is to store a part of the image data stored in the memory module 132 required for the operation in the local cache 133 and read the data in the local cache 133 to perform the operation.
[0126]
In the present embodiment, the above-described second method is adopted.
In the local cache 133, read-only caches RO # 0 to RO # 3 and read / write caches RW # 0 to RW # 3 are arranged corresponding to POP0 to POP3 of POP (0 to 3), respectively.
[0127]
Further, the local cache 133 has selectors SEL1 to SEL12 as shown in FIG.
The selectors SEL1 to SEL4 select either read data of a 32-bit width from the corresponding read line port p (0) to p (3) of the memory module 132 or read data from another port to perform read / write. Output to caches RW # 0-RW # 3 and selectors SEL9-SEL12.
The selector SEL5 selects either the operation result of POP0 of POP or the processing result of the write unit WU and supplies it to the read / write cache RW # 0.
The selector SEL6 selects either the operation result of POP1 of POP or the processing result of the write unit WU and supplies it to the read / write cache RW # 1.
The selector SEL7 selects either the operation result of POP2 of POP or the processing result of the write unit WU and supplies it to the read / write cache RW # 2.
The selector SEL8 selects either the operation result of POP3 of POP or the processing result of the write unit WU and supplies it to the read / write cache RW # 3.
The selector SEL9 selects either the data from the selector SEL1 or the data transferred from the global module 12, and supplies the selected data to the read-only cache RO # 0.
The selector SEL10 selects either the data from the selector SEL2 or the data transferred from the global module 12, and supplies the selected data to the read-only cache RO # 1.
The selector SEL11 selects either the data from the selector SEL3 or the data transferred from the global module 12, and supplies the selected data to the read-only cache RO # 2.
The selector SEL12 selects either the data from the selector SEL4 or the data transferred from the global module 12, and supplies the selected data to the read-only cache RO # 3.
[0128]
Each of the POPs (0 to 3) includes a write unit WU as a fourth functional unit, a filter functional unit FFU, an output selection circuit OSLC, and an address generator in addition to the four arithmetic units POPE0 to POPE3 arranged in parallel. Has AG.
[0129]
In the case of graphics processing, the write unit WU reads source data from the register unit (RGU) 13124, specifically, color data (RGB) and mixed value data (A), depth data (Z), and read data. Calculations required for pixel writing of graphics processing such as α blending, various tests, and logical operations based on destination color data (RGB), mixed value data (A), and depth data (Z) from write cache RW # And the operation result is written back to the read / write cache RW #.
Further, in the case of image processing, the write unit WU receives the data of the operation result by the pixel operation processor (POP) group 13123, for example, the destination address directly input from a specific FIFO register of the register unit (RGU) 13124. (Xd, Yd) is stored in the memory module 132 via the read / write cache RW #.
[0130]
Although the example of FIG. 25 shows an example in which the write unit WU is provided in each POP, it is provided in only one POP and supplied to a plurality of divided local caches D133, or for two POPs. It can be configured in various modes, such as providing one and supplying it to the corresponding divided local cache D133, or providing it separately from the POP.
[0131]
The filter function unit FFU is provided in each of the POPE0 to POPE3 with an operation parameter set in the FIFO register of the register unit register (RGU) 13124, specifically, via the register unit (RGU) 13124 or the graphics unit (GRU). ) Based on the value of (s, t, lod) directly supplied from 13121, calculate (u, v) address and output address data (si, ti, lodi) to address generator AG, A texture filter coefficient K is calculated based on data (sf, tf, lodf) for coefficient generation, and the calculated filter coefficient is supplied to each of the corresponding POPE0 to POPE3.
[0132]
The address generator AG is a (u, v) coordinate of four neighbors for performing four neighbor filtering based on the address data (si, ti, lodi) supplied by the filter function unit FFU, that is, (u0, v0). , (U1, v1), (u2, v2), (u3, v3) and supply them to the memory controller MC.
[0133]
When using the read-only cache RO # as a local cache for data sent from the global bus, the memory controller MC calculates a physical address based on the (u, v) coordinates, and performs a cache hit and a transfer to the global bus. A request is sent, a read-only cache RO # is filled, and data is sent from the read-only cache RO # to a corresponding POP.
When using the read / write cache RW # as a write cache to the memory module 132, the memory controller MC calculates a physical address based on the destination address (Xd, Yd), and writes back to the cache and the memory module 132. Perform control.
[0134]
POPE0 receives a 32-bit width data read from read-only cache RO # 0 or read / write cache RW # 0 and an operation parameter (eg, filter coefficient) by filter function unit FFU and performs a predetermined operation (eg, addition). Then, the operation result is output to the next-stage POPE1. Further, POPE0 has an 8-bit × 4 output line OTL0 for outputting the predetermined operation result to the output selection circuit OSLC.
Further, the POPE0 is transferred to the crossbar circuit 13125, receives data set in the register unit (RGU) 13124, performs a predetermined operation, and divides the operation result via the selector SEL5 of the divided local cache D133 (0). Output to read / write cache RW # 0.
[0135]
POPE1 receives a 32-bit width data read from read-only cache RO # 1 or read / write cache RW # 1 and a calculation parameter by filter function unit FFU, and performs a predetermined calculation (for example, addition). And POPE0 to add the operation result and output it to the next-stage POPE2. Further, POPE1 has an 8-bit × 4 output line OTL1 for outputting the predetermined operation result to the output selection circuit OSLC.
Further, the POPE 1 receives the data set in the register unit (RGU) 13124, is transferred to the crossbar circuit 13125, performs a predetermined operation, and divides the operation result via the selector SEL6 of the divided local cache D133 (0). Output to read / write cache RW # 1.
[0136]
POPE2 receives a 32-bit width data read from read-only cache RO # 2 or read / write cache RW # 2 and a calculation parameter by filter function unit FFU, and performs a predetermined calculation (for example, addition). And POPE1 to add the operation result and output it to the next-stage POPE3. Further, POPE2 has an 8-bit × 4 output line OTL2 for outputting the predetermined operation result to the output selection circuit OSLC.
Further, the POPE 2 receives the data set in the register unit (RGU) 13124, is transferred to the crossbar circuit 13125, performs a predetermined operation, and divides the operation result via the selector SEL7 of the divided local cache D133 (0). Output to read / write cache RW # 2.
[0137]
POPE3 receives a 32-bit width data read from read-only cache RO # 3 or read / write cache RW # 3 and a calculation parameter by filter function unit FFU, and performs a predetermined calculation (for example, addition). And the operation result is added by POP2, and the operation result (total in one POP) is output to the output selection circuit OSLC through the 8-bit × 4 output line OTL3.
Further, the POPE 3 receives the data set in the register unit (RGU) 13124 which is transferred to the crossbar circuit 13125, performs a predetermined operation, and divides the operation result via the selector SEL8 of the divided local cache D133 (0). Output to read / write cache RW # 3.
[0138]
FIG. 26 is a circuit diagram illustrating a specific configuration example of POPE (0 to 3) according to the present embodiment.
As shown in FIG. 26, the present POPE includes multiplexers (MUX) 401 to 405, an adder / subtractor (addsub) 406, a multiplier (mul) 407, an adder / subtractor (addsub) 408, and an accumulation register 409.
[0139]
The multiplexer 401 stores the data from the register unit (RGU) 13124, the operation parameters from the filter function unit FFU, the data read from the read-only cache RO # (0-3), or the data read from the read / write cache RW # (0-3). One of them is selected and supplied to the adder / subtractor 406.
[0140]
The multiplexer 402 selects one of data read by the register unit (RGU) 13124, read-only cache RO # (0-3), or read-write cache RW # (0-3). , And to the adder / subtractor 406.
[0141]
The multiplexer 403 stores the data read by the register unit (RGU) 13124, the operation parameters by the filter function unit FFU, the data read from the read-only cache RO # (0-3), or the data read from the read / write cache RW # (0-3). One of them is selected and supplied to the multiplier 407.
[0142]
The multiplexer 404 selects one of the operation result of the preceding POPE (0 to 2) or the output data of the accumulation register 409 and supplies the selected result to the adder / subtractor 408.
[0143]
The multiplexer 405 stores the data read by the register unit (RGU) 13124, the operation parameter by the filter function unit FFU, the data read from the read-only cache RO # (0-3), or the data read from the read / write cache RW # (0-3). One of them is selected and supplied to the adder / subtractor 408.
[0144]
The adder / subtractor 406 adds (subtracts) the selection data of the multiplexer 401 and the selection data of the multiplexer 402 and outputs the result to the multiplier 407.
The multiplier 407 multiplies the output data of the adder / subtractor 406 and the data selected by the multiplexer 403 and outputs the result to the adder / subtractor 408.
The adder / subtracter 408 adds (subtracts) the multiplier 407 and the output data, the selection data of the multiplexer 404, and the selection data of the multiplexer 405, and outputs the result to the accumulation register 409.
Then, the data held in the integration register 409 is output to the output selection circuit OSLC and the next-stage POPE (1 to 3) as the operation result of each POPE.
[0145]
The output selection circuit OSLC has a function of selecting any of the operation data transferred from the output lines OTL0 to OTL3 of the respective POPE0 to P0PE3 and outputting the selected operation data to the crossbar circuit 13125.
In this embodiment, the output selection circuit OSLC is configured to select the operation data transferred on the output line OTL3 of POP3 that outputs the total in one POP, and output the selected operation data to the crossbar circuit 13125.
The operation data output to the crossbar circuit 13125 is set in the register unit 13124, and the set data is directly supplied to a predetermined operation unit of the pixel engine 13122 without passing through the crossbar circuit 13125.
[0146]
As shown in FIG. 27, the address generator AG transfers data from the memory module 132 simultaneously in one column (for four POPs), and reads each of the divided local caches D133 (0) to D133 (3). Since the access to the only caches RO # 0 to RO # 3 or the read / write caches RW # 0 to RW # 3 is performed independently, each of the read only caches RO # 0 to RO # 3 or the read / write cache RW # The cache addresses CADR0 to CADR3 for reading the element data read in parallel from the ports p (0) to p (3) of the memory module 132 to the corresponding POPE0 to POPE3 are respectively assigned to 0 to RW # 3. Generate and supply.
The address generator AG supplies, for example, the operation result OPR0 of POPE0 to POPE1 at the timing when the operation of POPE1 ends, the operation result of POPE1 (the result of adding the operation result OPR0 of POP0) OPR1 ends the operation of POPE2 Read-only caches RO # 0 to ROPE0 so that the operation result of POPE2 (the result obtained by adding the operation result OPR1 of POPE1) OPR2 is supplied to POPE3 at the timing when the operation of POPE3 ends. Cache addresses CADR0 to CADR3 are supplied to RO # 3 or read / write caches RW # 0 to RW # 3 at a predetermined timing. For example, when the number of element data supplied to each of POPE0 to POPE3 is the same, and element data is sequentially added at each of POPE0 to POPE3, address supply is performed by shifting the address supply timing by one address in order.
As a result, arithmetic operations without errors can be efficiently performed. That is, in the core 1312 according to the present embodiment, an improvement in operation efficiency is achieved.
[0147]
Next, template matching processing, which is one of two-dimensional image processing using the pixel operation processor group 13123 and the local cache 133 having the above configuration, will be described.
[0148]
FIG. 28 is a diagram for describing template matching.
The image shown in FIG. 28A is a target image OBIM, in which a frame indicated by MP is a previous frame matching position, and a frame indicated by SRC is a search range. The target image OBIM changes during the matching process until it matches within the search range SRC. The target image OBIM is stored in the memory module 132, for example.
The image shown in FIG. 28B is a reference image RFIM, which does not change at the time of matching and is stored in, for example, the memory module 132 or supplied from the global module 12 to the read-only cache RO # via the global bus. . In the present embodiment, the size of the reference image RFIM is 16 pixels × 16 pixels.
FIG. 28C shows a mask.
[0149]
When performing template matching, it is necessary to obtain the absolute value difference between the reference image RFIM and the target image OBIM by one arithmetic unit POPE. Therefore, two caches per one POPE, that is, as shown in FIG. Two caches, read-only cache RO # (0-3) and read / write cache RW # (0-3), provided corresponding to POPE0-POPE3 are used.
For example, as shown in FIG. 29, a reference image RFIM of 16 × 16 pixels that does not change and does not need to be refilled is stored in the read-only cache RO # (0 to 3). On the other hand, the target image OBIM that has changed and needs to be refilled as needed (for example, stored in the eDRAM) is stored in the read / write cache RW # (0 to 3).
[0150]
In the case of this template matching, in the POPE shown in FIG. 26, for example, the target image OBIM read from the read / write cache RW # (0-3) is selected by the multiplexer 401, and the read only cache RO # (0 3), the reference image RFIM read out is selected, and the difference between the two images is obtained by the adder / subtractor 406.
The multiplexer 403 selects an operation parameter (coefficient) by the filter function unit FFU, and the multiplier 407 multiplies the operation result of the adder / subtractor 406 by a coefficient.
Then, the adder / subtracter 408 multiplies and sums the operation results of the own stage selected by the multiplexer 404, and outputs the total result of the own stage from the first stage POPE0 to the next stage POPE1.
In addition, in POPE1 to POPE3 except for the first stage POPE0, the sum result of the previous stage POPE0 to 2 selected by the multiplexer 404 is added to the sum result of the own stage and output to the next stage POPE2 to POPE3.
[0151]
Next, an operation of template matching in which the pixel processing processor group 13123 performs calculation processing based on data in the memory and further performs calculation in the pixel engine 13122 will be described with reference to FIGS.
[0152]
Step ST51
First, in step ST51, the reference image OBIM is simultaneously transferred from the memory module (eDRAM) to the read / write caches RW # 0 to RO # 3 of the local cache 133 in one row (for four POPs). Further, the reference image RFIM is transferred to each of the read-only caches RO # 0 to RO # 3 via the global bus.
Next, as shown in FIGS. 32 (A), (C), (E), and (G), the address generator AG shifts each address to POPE0 to POP3 within one POP independently by each cache. Thus, cache addresses CADR0 to CADR3 are supplied.
Thus, the 16 element data of the reference image RFIM and the 16 element data of the target image OBIM are sequentially read out to each of POP0 to POP3 of POP0 to POP3, respectively.
[0153]
For example, cache addresses CADR00 to CADR0F are sequentially applied to read only cache RO # 0 and read / write cache RW # 0 of divided local cache 133 (0), and data 00 to 0F for one column is stored in POP0 of POP0 accordingly. Each is read.
Similarly, the cache addresses CADR10 to CADR1F are sequentially given to the read only cache RO # 1 and the read / write cache RW # 1 of the divided local cache 133 (0), and accordingly, one column of data 10 to POP1 of POP0. 1F is read out.
The cache addresses CADR20 to CADR2F are sequentially given to the read only cache RO # 2 and the read / write cache RW # 2 of the divided local cache 133 (0), and the data 20 to 2F for one column are respectively stored in POP2 of POP0. Is read.
The cache addresses CADR30 to CADR3F are sequentially given to the read only cache RO # 3 and the read / write cache RW # 3 of the divided local cache 133 (0), and the data 30 to 3F for one column are respectively stored in the POP3 of POP0. Is read.
[0154]
The cache addresses CADR40 to CADR4F are sequentially given to the read-only cache RO # 0 and the read / write cache RW # 0 of the divided local cache 133 (1), and one column of data 40 to 4F is respectively assigned to POP0 of POP1. Is read.
Similarly, cache addresses CADR50 to CADR5F are sequentially given to read-only cache RO # 1 and read / write cache RW # 1 of divided local cache 133 (1), and data 50 to CADR1 of POP1 are stored in POP1 of POP1 accordingly. 5F are read out.
The cache addresses CADR60 to CADR6F are sequentially given to the read-only cache RO # 2 and the read / write cache RW # 2 of the divided local cache 133 (1), and the data 60 to 6F for one column are respectively stored in POP2 of POP1. Is read.
The cache addresses CADR70 to CADR7F are sequentially given to the read only cache RO # 3 and the read / write cache RW # 3 of the divided local cache 133 (1), and the data 70 to 7F for one column are respectively stored in POP3 of POP1. Is read.
[0155]
The cache addresses CADR80 to CADR8F are sequentially given to the read only cache RO # 0 and the read / write cache RW # 0 of the divided local cache 133 (2), and the data 80 to 8F for one column are respectively stored in POP0 of POP2. Is read.
Similarly, cache addresses CADR90 to CADR9F are sequentially given to read-only cache RO # 1 and read / write cache RW # 1 of divided local cache 133 (2), and accordingly, one row of data 90 to CADR9F is assigned to POP1 of POP2. 9F is read out.
The cache addresses CADRA0 to CADRAF are sequentially given to the read-only cache RO # 2 and the read / write cache RW # 2 of the divided local cache 133 (2), and one column of data A0 to AF is respectively stored in POP2 of POP2. Is read.
The cache addresses CADRB0 to CADRBF are sequentially given to the read only cache RO # 3 and the read / write cache RW # 3 of the divided local cache 133 (2), and one column of data B0 to BF is respectively assigned to POP3 of POP2. Is read.
[0156]
The cache addresses CADRC0 to CADRCF are sequentially given to the read-only cache RO # 0 and the read / write cache RW # 0 of the divided local cache 133 (3), and one column of data C0 to CF is respectively stored in POP0 of POP3. Is read.
Similarly, cache addresses CADRD0 to CADRDF are sequentially given to read only cache RO # 1 and read / write cache RW # 1 of divided local cache 133 (3), and one column of data D0 to POP1 of POP3 in response thereto. The DF is read out.
The cache addresses CADRE0 to CADREF are sequentially given to the read-only cache RO # 2 and the read / write cache RW # 2 of the divided local cache 133 (3), and the data E0 to EF for one column are respectively stored in POP2 of POP3. Is read.
The cache addresses CADRF0 to CADRFF are sequentially given to the read only cache RO # 3 and the read / write cache RW # 3 of the divided local cache 133 (3), and data F0 to FF for one column are respectively stored in POP3 of POP3. Is read.
[0157]
Step ST52
In step ST52, as described above, data obtained by multiplying the difference between the reference image RFIM and the target image OBIM by a coefficient in each of POP0 to POP3 of each POP (0 to 3) is added for one column of one element (16). Is done.
Specifically, in POP0 of POP0, data 00 to 0F are sequentially added as shown in FIG. 32B, and the operation result OPR0 is output to POP1.
In POPE1 of POP0, as shown in FIG. 32D, data 10 to 1F are sequentially added.
In POPE2 of POP0, data 20 to 2F are sequentially added as shown in FIG.
In POPE3 of POP0, data 30 to 3F are sequentially added as shown in FIG.
The same applies to the other POP1 to POP3.
[0158]
Step ST53
In step ST53, the operation results of each of POP0 to POP3 of each of POPs (0 to 3) are added to obtain an addition result of 16 × 4 elements.
Specifically, as shown in FIGS. 32 (B), (D) and FIG. 36, the operation result OPR0 of POP0 of POP0 is output to POP1.
32 (D), (F) and FIG. 34, the operation result OPR0 of POP0 of POP0 is added to POPE1 of POP0, and the operation result OPR1 is output to POPE2.
32 (F), (H), and FIG. 34, the operation result OPR1 of the POP0 POP1 is added to the operation result OPR1 of the POP0, and the operation result OPR2 is output to the POPE3.
Then, in POPE3 of POP0, as shown in FIG. 32H, the operation result OPR2 of POP2 of POP0 is added to its own operation result, and the operation result OPR3 is output to the output selection circuit OSLC.
The same applies to the other POP1 to POP3.
[0159]
Step ST54
In step ST54, the total operation result OPR3 is transferred from the output selection circuit OSLC of each of POP0 to POP3 to the register unit (RGU) 13124 via the crossbar circuit 13125.
For example, as shown in FIG. 33, the total operation result OPR3 of POP3 of POP0 is stored in the FIFO register FREG1 of the register unit (RGU) 13124 via the crossbar circuit 13125.
The total operation result OPR3 of POPE3 of POP1 is stored in the FIFO register FREG2 of the register unit (RGU) 13124 via the crossbar circuit 13125.
The total operation result OPR3 of POPE3 of POP2 is stored in the FIFO register FREG3 of the register unit (RGU) 13124 via the crossbar circuit 13125.
The total operation result OPR3 of POPE3 of POP3 is stored in the FIFO register FREG4 of the register unit (RGU) 13124 via the crossbar circuit 13125.
[0160]
Step ST55
In step ST55, the total operation result of POP0 and POP1 set in the FIFO registers FREG1 and FREG2 of the register unit (RGU) 13124 is added by the first adder ADD1 of the pixel engine (PXE) 13122. Is stored in the FIFO register FREG5 of the register unit (RGU) 13124 via the crossbar circuit 13125.
Further, the total operation result of POP2 and POP3 set in the FIFO registers FREG3 and FREG4 of the register unit (RGU) 13124 is added by the second adder ADD2 of the pixel engine (PXE) 13122, and the operation result is added to the crossbar. The data is stored in the FIFO register FREG6 of the register unit (RGU) 13124 via the circuit 13125.
Then, the operation results of the first and second adders ADD1 and ADD2 set in the FIFO registers FREG5 and FREG6 of the register unit (RGU) 13124 are added by the third adder ADD3 of the stream processing engine (SPE) 13143. Is done.
[0161]
Step ST56
In step ST56, as shown in FIG. 32 (P), the addition result of the third adder ADD3 of the pixel engine (PXE) 13122 is output as a series of calculation results.
[0162]
FIG. 35 is a diagram showing an outline of operation including a pixel engine (PXE) 13122 of a core, a pixel operation processor (POP) group 13123, a register unit (RGU) 13124, and a memory part in the processing unit according to the present embodiment.
[0163]
In FIG. 35, the broken line indicates the flow of address data, the dashed line indicates the flow of read data, and the solid line indicates the flow of write data.
In the register unit (RGU) 13124, FREGA1 and FREGA2 denote FIFO registers used for an address system, FREGR denotes a FIFO register used for read data, and FREGW denotes a FIFO register used for write data.
[0164]
In the example of FIG. 35, for example, source (reading) address data generated by the rasterizer 1311 is set in the FIFO registers FREGA1 and FREGA2 of the register unit (RGU) 13124 via the crossbar circuit 13125.
The address data set in the FIFO register FREGA1 is directly supplied to the address generator AG1 of the pixel operation processor (POP) 13123 without passing through the crossbar circuit 13125, for example. The address of the data to be read is generated by the address generator AG1, and the desired data read from the memory module 132 to the read-only cache 1331 is supplied to each processor (POPE) of the pixel processor (POP) 13123 based on the generated address. Is done.
[0165]
The operation result of each operation unit (POPE) of the pixel operation processor (POP) 13123 is set in the FIFO register FREGR of the register unit (RGU) 13124 via the crossbar circuit 13125.
The data set in the FIFO register FREGR is directly supplied to each operation unit OP of the pixel engine (PXE) 13122 without passing through the crossbar circuit 13125.
Then, the operation result of each operation unit OP of the pixel engine (PXE) 13122 is set in the FIFO register FREGW of the register unit (RGU) 13124 via the crossbar circuit 13125.
The data set in the FIFO register FREGW is supplied to each operation unit (POPE) of the pixel operation processor (POP) 13123.
[0166]
Further, destination (write) address data generated by the rasterizer 1311 is set in the FIFO register FREGA2 of the register unit (RGU) 13124 via the crossbar circuit 13125.
Then, the address data set in the FIFO register FREGA2 is supplied directly to the address generator AG2 of the pixel operation processor (POP) 13123 without passing through the crossbar circuit 13125. The address of the data to be written is generated by the address generator AG2, and based on this, the operation result of each operation unit (POPE) of the pixel operation processor (POP) 13123 is written to the read / write cache 1332 and further written to the memory module 132. .
[0167]
Note that, in the example of FIG. 35, the read / write cache 1332 is described to perform only writing, but reading is also performed by the same operation as in the case of the above-described read-only cache 1331.
[0168]
Next, an operation example in the case of graphics processing and image processing in the processing unit 131 (-0 to -3) having the above configuration will be described with reference to the drawings.
[0169]
First, the graphics processing when there is no dependent texture will be described with reference to FIGS. 36 and 37.
[0170]
In this case, the rasterizer 1311 receives the parameter data broadcast from the global module 12 and determines, for example, whether or not the triangle is the area in charge of itself. , Each pixel data is generated and supplied to the core 1312.
Specifically, in the rasterizer 1311, window coordinates (X, Y, Z), primary colors (PC; Rp, Gp, Bp, Ap), secondary colors (SC; Rs, Gs, Bs, As), and Fog coefficients ( f), various kinds of pixel data of texture coordinates and various vectors (V1x, V1y, V1z) and (V2x, V2y, V2z) are generated.
[0171]
Then, the generated window coordinates (X, Y, Z) are passed through a specific FIFO register of the register unit (RGU) 13124, directly into the pixel operation processor (POP) group 13123, or a light provided separately. It is supplied to the unit WU.
Further, the generated two sets of texture coordinate data and various vectors (V1x, V1y, V1z) and (V2x, V2y, V2z) are passed through the FIFO unit of the crossbar circuit 13125 and the register unit (RGU) 13124 to the graphics unit ( GRU) 12121.
Further, the generated primary color (PC), secondary color (SC), and Fog coefficient (F) are supplied to a pixel engine (PXE) 13122 through a crossbar circuit 13125 and a FIFO register of a register unit (RGU) 13124.
[0172]
The graphics unit (GRU) 13121 performs perspective collection, LOD (Level) based on the supplied texture coordinate data, various vectors (V1x, V1y, V1z), and (V2x, V2y, V2z).
The calculation of the mipmap (MIPMAP) level by the calculation of of @ Detail, the selection of the surface of the cube map (CubeMap), and the calculation of the normalized texel coordinates (s, t) are performed.
Then, two sets of data (s1, t1, lod1), (s2, t2, lod2) generated by the graphics unit (GRU) 13121 including, for example, normalized texel coordinates (s, t) and LOD data (lod). ) Are directly supplied to the pixel operation processor (POP) group 13123 via individual wirings without passing through the crossbar circuit 13125, for example.
[0173]
In the pixel operation processor (POP) group 13123, as shown in FIG. 37, (s1, t1, lod1), (s2, t2, lod2) directly supplied from the graphics unit (GRU) 13121 in the filter function unit FFU. ), The (u, v) address calculation for texture access is performed, the address data (ui, vi, lodi) is supplied to the address generator AG, and the data (uf, vf, lodf) are supplied to the coefficient generator COF.
[0174]
The address generator AG receives the address data (ui, vi, lodi) and performs (N, V) coordinates of four neighbors for performing four-neighbor filtering, that is, (u0, v0), (u1, v1). , (U2, v2), (u3, v3) are calculated and supplied to the memory controller MC.
Thereby, desired texel data is read out from memory module 132 to each POP of pixel operation processor (POP) group 13123 through, for example, read-only cache RO #.
Further, the coefficient generator COF receives the data (uf, vf, lodf), calculates a texture filter coefficient K (0 to 3), and supplies the texture filter coefficient K to each corresponding POPE of the pixel operation processor (POP) group 13123. .
Then, in each POP of the pixel operation processor (POP) group 13123, color data (TR, TG, TB) and a mixed value (blend value: TA) are obtained, and two sets of data (TR1, TG1, TB1, TA1) are obtained. And (TR2, TG2, TB2, TA2) are transferred through the crossbar circuit 13125 and set in a predetermined FIFO register of the register unit (RGU) 13124, and this setting data is directly transmitted without passing through the crossbar circuit 13125. It is supplied to a pixel engine (PXE) 13122.
[0175]
In the pixel engine (PXE) 13122, the data (TR1, TG1, TB1, TA1) and (TR2, TG2, TB2, TA2) by the pixel operation processor (POP) group 13123, the primary color (PC) by the rasterizer 1311 and the secondary Based on the color (SC) and the Fog coefficient (F), for example, an operation of Pixel @ Shader is performed to obtain color data (FR1, FG1, FB1) and a mixed value (blend value: FA1). FG1, FB1, FA1) are transferred to the crossbar circuit 13125 and set in a predetermined FIFO register of the register unit (RGU) 13124, and the setting data is directly sent to the pixel operation processor ( POP) group 1 123 is supplied to a predetermined POP within or separately provided light unit WU of.
[0176]
In the write unit WU, based on the window coordinates (X, Y, Z) by the rasterizer 1311, for example, the destination color data (RGB), the mixed value data (A), and the depth data (A) from the memory module 132 through the read / write cache RW #. Z) is read.
In the write unit WU, the data (FR1, FG1, FB1, FA1) by the pixel engine (PXE) 13122, the destination color data (RGB) read from the memory module 132 through the read / write cache RW #, and the mixed value data ( Based on A) and the depth data (Z), calculations required for pixel writing of graphics processing such as α blending, various tests, and logical operations are performed, and the calculation results are written back to the read / write cache RW #.
[0177]
Next, the graphics processing when there is a dependent texture will be described with reference to FIGS.
[0178]
In this case, in the rasterizer 1311, window coordinates (X, Y, Z), primary colors (PC; Rp, Gp, Bp, Ap), secondary colors (SC; Rs, Gs, Bs, As), and Fog coefficients (f) , Various pixel data of the texture coordinates (V1x, V1y, V1z) are generated.
[0179]
Then, the generated window coordinates (X, Y, Z) are directly supplied to the pixel operation processor (POP) group 13124 through a specific FIFO register of the register unit (RGU) 13124.
Further, the generated texture coordinates (V1x, V1y, V1z) are supplied to the graphics unit (GRU) 12121 through the crossbar circuit 13125 and the FIFO register of the register unit (RGU) 13124.
Further, the generated primary color (PC), secondary color (SC), and Fog coefficient (F) are supplied to a pixel engine (PXE) 13122 through a crossbar circuit 13125 and a FIFO register of a register unit (RGU) 13124.
[0180]
In the graphics unit (GRU) 13121, based on the supplied texture coordinate (V1x, V1y, V1z) data, perspective collection, calculation of a mipmap (MIPMAP) level by LOD calculation, surface selection of a cube map (CubeMap), Calculation processing of the normalized texel coordinates (s, t) is performed.
Then, a set of data (s1, t1, lod1) including, for example, normalized texel coordinates (s, t) and LOD data (lod) generated by the graphics unit (GRU) 13121 is output to the crossbar circuit 13125, for example. And is directly supplied to a pixel operation processor (POP) group 13123 without passing through the POP.
[0181]
In the pixel operation processor (POP) group 13123, as shown in FIG. 37, the texture is based on the value of (s1, t1, lod1) directly supplied from the graphics unit (GRU) 13121 in the filter function unit FFU. The (u, v) address calculation for access is performed, the address data (ui, vi, lodi) is supplied to the address generator AG, and the data (uf, vf, lodf) is calculated for the coefficient by the coefficient generator. Supplied to COF.
[0182]
The address generator AG receives the address data (ui, vi, lodi) and performs (N, V) coordinates of four neighbors for performing four-neighbor filtering, that is, (u0, v0), (u1, v1). , (U2, v2), (u3, v3) are calculated and supplied to the memory controller MC.
Thereby, desired texel data is read out from memory module 132 to each POP of pixel operation processor (POP) group 13123 through, for example, read-only cache RO #.
Further, the coefficient generator COF receives the data (uf, vf, lodf), calculates a texture filter coefficient K (0 to 3), and supplies it to each POPE of the pixel operation processor (POP) group 13123.
Then, in each POP of the pixel operation processor (POP) group 13123, color data (TR, TG, TB) and a mixture value (blend value: TA) are obtained, and the data (TR1, TG1, TB1, TA1) are crossed. The bar circuit 13125 is transferred and set in a predetermined FIFO register of a register unit (RGU) 13124, and the setting data is directly supplied to the pixel engine (PXE) 13122 without passing through the crossbar circuit 13125.
[0183]
In the pixel engine (PXE) 13122, the data (TR1, TG1, TB1, TA1) by the pixel operation processor (POP) group 13123, and the primary color (PC), secondary color (SC), and Fog coefficient (F) by the rasterizer 1311 For example, Pixel @ Shader is calculated based on the above, texture coordinates (V2x, V2y, V2z) are generated and supplied to the graphics unit (GRU) 13121 via the crossbar circuit 13125 and the register unit (RGU) 13124. You.
[0184]
In the graphics unit (GRU) 13121, based on the supplied texture coordinate (V2x, V2y, V2z) data, perspective collection, calculation of a mipmap (MIPMAP) level by LOD calculation, surface selection of a cube map (CubeMap), Calculation processing of the normalized texel coordinates (s, t) is performed.
Then, the data (s2, t2, lod2) including, for example, the normalized texel coordinates (s, t) and the LOD data (lod) generated by the graphics unit (GRU) 13121 does not pass through the crossbar circuit 13125, for example. It is directly supplied to a pixel operation processor (POP) group 13123.
[0185]
In the pixel operation processor (POP) group 13123, as shown in FIG. 37, the texture is based on the value of (s2, t2, lod2) directly supplied from the graphics unit (GRU) 13121 in the filter function unit FFU. The (u, v) address calculation for access is performed, the address data (ui, vi, lodi) is supplied to the address generator AG, and the data (uf, vf, lodf) is calculated for the coefficient by the coefficient generator. Supplied to COF.
[0186]
The address generator AG receives the address data (ui, vi, lodi) and performs (N, V) coordinates of four neighbors for performing four-neighbor filtering, that is, (u0, v0), (u1, v1). , (U2, v2), (u3, v3) are calculated and supplied to the memory controller MC.
Thereby, desired texel data is read out from memory module 132 to each POP of pixel operation processor (POP) group 13123 through, for example, read-only cache RO #.
Further, the coefficient generator COF receives the data (uf, vf, lodf), calculates a texture filter coefficient K (0 to 3), and supplies it to each POPE of the pixel operation processor (POP) group 13123.
Then, in each POP of the pixel operation processor (POP) group 13123, color data (TR, TG, TB) and a mixture value (blend value: TA) are obtained, and the data (TR2, TG2, TB2, TA2) are crossed. The bar circuit 13125 is transferred and set in a predetermined FIFO register of a register unit (RGU) 13124, and the setting data is directly supplied to the pixel engine (PXE) 13122 without passing through the crossbar circuit 13125.
[0187]
In the pixel engine (PXE) 13122, data (TR2, TG2, TB2, TA2) by the pixel operation processor (POP) group 13123, and a primary color (PC), a secondary color (SC), and a Fog coefficient (F) by the rasterizer 1311 , A predetermined filtering operation such as 4-neighbor interpolation is performed, color data (FR1, FG1, FB1) and a mixture value (blend value: FA1) are obtained, and the data (FR1, FG1, FB1, FA1) are obtained. ) Is transferred to the crossbar circuit 13125 and set in a predetermined FIFO register of the register unit (RGU) 13124, and this set data is directly transmitted to the pixel operation processor (POP) group 13123 without passing through the crossbar circuit 13125. Within a given POP or separately It is provided by supplying to the light unit WU.
[0188]
In the write unit WU, based on the window coordinates (X, Y, Z) by the rasterizer 1311, for example, the destination color data (RGB), the mixed value data (A), and the depth data (A) from the memory module 132 through the read / write cache RW #. Z) is read.
Then, in the write unit WU, data (FR1, FG1, FB1, FA1) by the pixel engine (PXE) 13122, and destination color data (RGB) and mixed value data (A) read from the memory module 132 through the read / write cache RW #. ) And the depth data (Z), calculations required for pixel writing of graphics processing such as α blending, various tests, and logical operations are performed, and the calculation results are written back to the read / write cache RW #.
[0189]
Next, image processing will be described.
[0190]
First, the operation in the case of performing the SAD (Summed Absolute \ Difference) processing as shown in FIG. 39 will be described with reference to FIG.
[0191]
In the SAD processing, for one block (X1s, Y1s) of the original image ORIM as shown in FIG. 39A, the search rectangular area SRGN of the reference image RFIM as shown in FIG. While shifting, the SAD (absolute value difference) in the corresponding block BLK is obtained.
Among them, the position (X2s, y2s) and the SAD value of the block having the minimum SAD are stored in (Xd, Yd) as shown in FIG.
(X1s, Y1s) is set as a context in a register in the POP from an upper position (not shown).
[0192]
In this case, the source address and the image processing result for reading the reference image data from the memory module 132 (−0 to −3) output from, for example, a higher-level device (not shown) via the global module 12 are transmitted to the rasterizer 1311. Commands and data necessary for generating a destination address for writing, for example, width and height (Ws, Hs) data and block size (Wbk, Hbk) data of the search rectangular area SRGN are input.
The rasterizer 1311 generates a source address (X2s, Y2s) of the reference image RFIM stored in the memory module 132 based on the input data, and generates a destination address (X2s, Y2s) for storing the processing result in the memory module 132. Xd, Yd) are generated.
[0193]
In the generated destination address (Xd, Yd), the supply line of the window coordinates (X, Y, Z) at the time of graphics processing is shared, and directly through a specific FIFO register of the register unit (RGU) 13124. It is supplied to the light unit WU of the pixel operation processor (POP) group 13124.
The source address (X2s, Y2s) of the generated reference image RFIM is supplied to the graphics unit (GRU) 12121 through the crossbar circuit 13125 and the FIFO register of the register unit (RGU) 13124. The source address (X2s, Y2s) is supplied directly to the pixel operation processor (POP) group 13123 without passing through the crossbar circuit 13125, for example, without passing through the graphics unit (GRU) 12121.
[0194]
In the pixel operation processor (POP) group 13123, based on the supplied source addresses (X1s, Y1s) and (X2s, Y2s), the memory module 132 receives the read-only cache RO # and the read / write cache RW #, for example. The stored data of the original image ORIM and the stored data of the reference image RFIM are read.
Here, the coordinates of the original image ORIM are set in a register as a context. The coordinates of the reference image RFIM are given, for example, as the coordinates of a sub-block that is assigned to each of the four POPs.
Then, the pixel operation processor (POP) group 13123 shifts the SAD in the corresponding sub-block BLK with respect to one block (X1s, Y1s) of the original image ORIM by shifting the search rectangular area SRGN of the reference image RFIM by one pixel. (Absolute value difference) is obtained from time to time.
Then, the position (X2s, y2s) of each sub-block and each SAD value are transferred to the crossbar circuit 13125 and set in a predetermined FIFO register of the register unit (RGU) 13124, and the setting data is stored in the crossbar circuit 13125. Is directly transferred to the pixel engine (PXE) 13122 without going through.
[0195]
In the pixel engine (PXE) 3122, the SAD of the entire block is totaled, and the block position (X2s, y2s) and the SAD value are transferred to the crossbar circuit 13125 and set in a predetermined FIFO register of the register unit (RGU) 13124. The setting data is directly transferred to the write unit WU without passing through the crossbar circuit 13125.
[0196]
In the write unit WU, the pixel engine (PXE) 13122 stores the block position (X2s, y2s) and the SAD value in the destination address (Xd, Yd) by the rasterizer 1311.
In this case, the SAD value read from the memory module 132 to the read / write cache RW # and the SAD value from the pixel engine (PXE) 13122 are used, for example, by using a function (Z comparison) for performing hidden surface removal (Hidden \ Surface \ Removal). Are compared.
As a result of the comparison, when the SAD value of the pixel engine (PXE) 13122 is smaller than the stored value, the block position (X2s, y2s) and the SAD value of the pixel engine (PXE) 13122 are converted to the destination address (Xd). , Yd) are written (updated) through the read / write cache RW #.
[0197]
Next, an operation in the case of performing a convolution filter (Convolution @ Filter) process as shown in FIG. 41 will be described with reference to FIG.
[0198]
In the convolution filter processing, for each pixel (X1s, Y1s) of the target image OBIM as shown in FIG. 41 (A), peripheral pixels of a filter kernel size are read, and a result obtained by multiplying by a filter coefficient is added. The result is stored in the destination address (Xd, Yd) as shown in FIG.
The storage address of the filter kernel coefficient is set as a context in a register in the POP.
[0199]
In this case, a source address and an image for reading image data (pixel data) from the memory module 132 (-0 to -3) output from, for example, a higher-level device (not shown) to the rasterizer 1311 via the global module 12 are output. Commands and data necessary for generating a destination address for writing a processing result, for example, filter kernel size data (Wk, Hk) are input.
The rasterizer 1311 generates a source address (X1s, Y1s) of the target image OBIM stored in the memory module 132 based on the input data, and generates a destination address (X1s, Y1s) for storing the processing result in the memory module 132. Xd, Yd) are generated.
[0200]
In the generated destination address (Xd, Yd), the supply line of the window coordinates (X, Y, Z) at the time of graphics processing is shared, and directly through a specific FIFO register of the register unit (RGU) 13124. It is supplied to the light unit WU of the pixel operation processor (POP) group 13124.
The source address (X1s, Y1s) of the generated target image OBIM is supplied to the graphics unit (GRU) 12121 through the crossbar circuit 13125 and the FIFO register of the register unit (RGU) 13124. The source address (X1s, Y1s) is supplied directly to the pixel operation processor (POP) group 13123 without passing through the crossbar circuit 13125, for example, without passing through the graphics unit (GRU) 12121.
[0201]
In the pixel operation processor (POP) group 13123, peripheral pixels having a kernel size enabled in the memory module 132 are read out, for example, via the read-only cache RO # based on the supplied source addresses (X1s, Y1s). .
In a pixel operation processor (POP) group 13123, a predetermined filter coefficient is multiplied by the read data, and these are added together. The result is color data (R, G, B) and mixed value data (A ) Is transferred to the write unit WU via the crossbar circuit 13125 and the register unit (RGU) 13124.
[0202]
In the write unit WU, data from the pixel operation processor (POP) group 13123 is stored in the destination address (Xd, Yd) via the read / write cache RW #.
[0203]
Finally, the operation according to the system configuration of FIG. 3 will be described.
Here, the processing of the texture system will be described.
[0204]
First, in the SDC 11, when each vertex data of three-dimensional coordinates, normal vectors, and texture coordinates is input, an operation is performed on the vertex data.
Next, various parameters required for rasterization are calculated.
Then, in the SDC 11, the calculated parameters are broadcast to all the local modules 13-0 to 13-3 via the global module 12.
In this process, the broadcasted parameter is passed to each of the local modules 13-0 to 13-3 via the global module 12 using a channel different from a cache fill described later. However, it does not affect the contents of the global cache.
[0205]
In each of the local modules 13-0 to 13-3, the following processing is performed in the processing units 131-0 to 131-3.
That is, in the processing units 131 (-0 to 3), upon receiving the broadcasted parameter, it is determined whether or not the triangle belongs to its own area, for example, an area interleaved in units of a rectangular area of 4 × 4 pixels. Is determined. As a result, if they belong, various data (Z, texture coordinates, colors, etc.) are rasterized.
Next, calculation of a mipmap (MIPMAP) level by LOD (Level @ Detail) calculation and (u, v) address calculation for texture access are performed.
[0206]
Then, the texture is read out.
In this case, the processing units 131-0 to 131-3 of the local modules 13-0 to 13-3 first check the entries of the local caches 133-0 to 133-3 at the time of texture reading.
As a result, when there is an entry, necessary texture data is read.
When the required texture data is not in the local caches 133-0 to 133-3, each of the processing units 131-0 to 131-3 sends a request to the global module 12 through the global interface 134-0 to 134-3. Request for a local cache fill.
[0207]
In the global module 12, when it is determined that the requested block data is in any of the global caches 121-0 to 121-3, the block data is read from any of the corresponding global caches 121-0 to 121-3. The request is sent back to the local module that sent the request through a predetermined channel.
[0208]
On the other hand, if it is determined that the requested block data is not in any of the global caches 121-0 to 121-3, the global cache fill of the local module holding the block from any of the desired channels is performed. A request is sent.
In the local module receiving the request for the global cache fill, the corresponding block data is read from the memory and sent to the global module 12 through the global interface.
Thereafter, in the global module 12, the block data is filled in a desired global cache, and the data is transmitted from a desired channel to the local module which has transmitted the request.
[0209]
When the requested block data is sent from the global module 12, the local cache is updated in the corresponding local module, and the block data is read by the processing unit.
[0210]
Next, in the local modules 13-0 to 13-3, filtering processing such as 4-neighbor interpolation is performed on the read texture data and the (u, v) address using the decimal part obtained at the time of calculation.
Next, a pixel-by-pixel operation is performed using the texture data after filtering and various data after rasterization.
Then, the pixel data that has passed various tests in the pixel level processing is written to the memory modules 132-0 to 132-3, for example, the frame buffer and the Z buffer on the built-in DRAM memory.
[0211]
As described above, according to the present embodiment, there are a plurality of POP0 to POP3 which are functional units for performing highly parallel arithmetic processing utilizing a memory bandwidth, and each POP is a computing unit arranged in parallel. Each of POPE0 to POPE3 receives a reference image RFIM and target image OBIM read from two caches, and receives predetermined operation (for example, subtraction, multiplication and Total addition) to output the operation result to the next-stage POPE. The next-stage POPE adds its own operation result to the previous-stage operation result, outputs the operation result to the next-stage POPE, and outputs the operation result to the final-stage POPE. In POP3, the sum of the operation results of all POP0 to POP3 is obtained. Only the calculation result of POPE3 from providing the pixel operation processor (POP) group 13124 to be output to the crossbar circuit 13146 selects the template matching process with a simple configuration, can be executed with high efficiency.
Further, the size of the crossbar circuit can be reduced, and the processing speed can be increased.
[0212]
In the present embodiment, the pixel operation processor (POP) group 13123 and the cache are connected with a wide bandwidth, and have an address generation function for memory access. It is possible to supply the maximum amount of stream data.
[0213]
Further, in the present embodiment, since the arithmetic units are arranged at high density in the form of matching the output data width near the memory and the regularity of the processing data is used, a large amount of arithmetic is performed by the minimum arithmetic unit. In addition, there is an advantage that it can be realized with a simple configuration, and the cost can be reduced.
[0214]
According to the present embodiment, at the time of graphics processing, parameter data broadcast from the global module 12 is received, and window coordinates, a primary color (PC), a secondary color (SC), a Fog coefficient (f), and a texture coordinate are received. And a rasterizer 1311 that generates a source address and a destination address based on input data at the time of image processing, a register unit 13124 having a plurality of FIFO registers, Graphics data (s, t, l) including texel coordinates (s, t) and LOD data is generated based on the texture coordinates set in the FIFO register 13124, and output without passing the source address. When the graphics unit 13121 performs graphics processing, it performs predetermined arithmetic processing based on the graphics data (s, t, l), transfers the calculated data to the crossbar circuit 13125, and sets the calculated data in a predetermined register of the register unit 13124. At the time of image processing, the pixel data processor 13123 reads out image data corresponding to the source address and performs a predetermined image processing operation, and transfers the operation data to the crossbar circuit 13125 to set the operation data in a predetermined register of the register unit 13124. A predetermined calculation process is performed on the calculation data of the pixel calculation processor 13123 set in the register based on the color data, and the calculation data is transferred to the crossbar circuit 13125 and set in the predetermined register of the register unit 13124. The pixel engine 13122 performs processing necessary for pixel writing based on window coordinates set in a register and operation data of the pixel engine 13122 at the time of graphics processing. At the time of processing, since the write unit WU for writing the operation data of the pixel operation processor 13123 set in the register to the destination address of the memory is provided, the following effects can be obtained.
[0215]
That is, according to the present embodiment, a large amount of arithmetic units can be efficiently used, the degree of freedom of the algorithm is high, the flexibility is high, and the complexity of the circuit is not increased and the cost is not increased. Processing can be performed with high throughput.
[0216]
Further, the processing unit 131 (-0 to -3) executes an algorithm represented by a data flow graph (Data {Flow} Graph: DFG) without a branch, and notes and edges of the DFG are calculated by an arithmetic unit or an arithmetic unit and its Can be seen as a connection relationship. Therefore, the processing unit 131 (-0 to -3) is a so-called dynamically reconfigurable hardware that dynamically switches the connection between the operation resources according to the DFG to be executed. And the connection relationship between them corresponds to the microprogram of the processing unit, and the DFG applied to each element of the stream data is the same, so that the bandwidth for issuing instructions can be reduced.
[0219]
In the processing unit 131 (-0 to -3), the designation of the arithmetic function and the switching control of the connection between the arithmetic units are data driven, and can be said to be distributed independent control.
By employing such dynamic scheduling, when the DFG is switched, the epilogue / prologue can be overlapped, and the overhead of DFG switching can be reduced.
[0218]
Further, when the scale of the DFG increases, it becomes impossible to map the algorithm to the internal calculation resources at once. In such a case, it is necessary to divide the data into a plurality of sub-DFGs (sub-DFG #).
As a method of dividing and executing a plurality of sub-DFGs, there is a multi-pass method of storing an intermediate value between the sub-DFGs in a memory. In this method, when the number of passes increases, the memory bandwidth is consumed and performance is reduced.
As described above, the processing units 131 (-0 to -3) transfer the stream data between the arithmetic units and the arithmetic units via the FIFO type register unit (RGU). Intermediate values can be passed through a file and the number of multi-passes can be reduced.
Although the division of the DFG itself is performed statically by the compiler, the execution control of the divided DFG is performed by hardware, so that there is an advantage that the load on software is light.
[0219]
Furthermore, in the present embodiment, the stream data set in the FIFO register of the register unit 13124 by transferring the crossbar circuit 13125 is directly passed through the graphics unit (GRU) 13121 and the pixel engine (PXE) without passing through the crossbar circuit. ) 13122, a pixel operation processor (POP) group 13123, and a light unit WU, and the graphics operation data obtained by the graphics unit 13121 is directly passed through a specific wiring without passing through a crossbar circuit. Since it is supplied to the pixel operation processor (POP) group 13123, the crossbar circuit can be further simplified and downsized, the number of multi-passes can be reduced, and the processing speed can be further increased. it can.
[0220]
Further, in the present embodiment, a configuration in which only one core 1312 is provided as an arithmetic processing unit for realizing the present architecture has been described as an example. However, for example, as shown in FIG. It is also possible to adopt a configuration in which the cores 1312-1 to 1312-n are provided in parallel.
Even in this case, the DFG executed in each core is the same.
In addition, the unit of parallelization of the configuration in which a plurality of cores are provided is, for example, a small rectangular area (stamp) unit in graphics processing and a block unit in image processing. In this case, there is an advantage that parallel processing with a fine granularity can be realized.
[0221]
Further, according to the present embodiment, the SDC 11 and the global module 12 exchange data, and a plurality of (four in the present embodiment) local modules 13-0 to 13-3 are provided for one global module 12. Are connected in parallel, the processing data is shared by a plurality of local modules 13-0 to 13-3 and processed in parallel, the global module 12 has a global cache, and each of the local modules 13-0 to 13-3 is Since each of the local modules has a local cache, and has two levels of cache layers, a global cache shared by the four local modules 13-0 to 13-3 and a local cache locally owned by each local module, a plurality of processes are performed. Reduces duplicate access when devices share processing data and perform parallel processing Yellow, cross-bar is not required a lot of number of wires. As a result, there is an advantage that an image processing apparatus that can be easily designed and that can reduce wiring cost and wiring delay can be realized.
[0222]
Further, according to the present embodiment, as shown in FIG. 3, the local module 13-0 to the local module 13-0 to the local module 13-0 By arranging 13-3 near its periphery, the distance between each corresponding channel block and the local module can be kept uniform, the wiring areas can be arranged neatly, and the average wiring length can be shortened. Therefore, there is an advantage that the wiring delay and the wiring cost can be reduced, and the processing speed can be improved.
[0223]
In this embodiment, the case where the texture data is stored in the built-in DRAM is described as an example. However, as another case, only the color data and the z data are placed in the built-in DRAM, and the texture data is stored in the external memory. It is also possible to put in. In this case, when a miss occurs in the global cache, a cache fill request is issued to the external DRAM.
[0224]
In the above description, the configuration of FIG. 3, that is, an image processing apparatus in which a plurality of (four in the present embodiment) local modules 13-0 to 13-3 are connected in parallel to one global module 12 10 is an example of a case where parallel processing is performed, but the configuration of FIG. 3 is arranged as one cluster CLST, and four clusters CLST0 to CLST3 are arranged in a matrix as shown in FIG. Thus, data can be exchanged between the global modules 12-0 to 12-3 of each of the clusters CLST0 to CLST3.
In the example of FIG. 44, the global module 12-0 of the cluster CLST0 is connected to the global module 12-1 of the cluster CLST1, the global module 12-1 of the cluster CLST1 is connected to the global module 12-3 of the cluster CLST3, The global module 12-3 of the cluster CLST3 is connected to the global module 12-2 of the cluster CLST2, and the global module 12-2 of the cluster CLST2 is connected to the global module 12-0 of the cluster CLST0.
That is, the global modules 12-0 to 12-3 of the plurality of clusters CLST0 to CLST3 are connected in a ring.
In the case of the configuration in FIG. 44, it is possible to configure so that parameters are broadcast from one SDC to global modules 12-0 to 12-3 of CLST0 to CLST3.
[0225]
By adopting such a configuration, more accurate image processing can be realized, and the wiring between the clusters is simply connected in one direction as a two-way system, so that the load between the clusters is kept uniform. The wiring regions can be arranged neatly, and the average wiring length can be shortened. Therefore, wiring delay and wiring cost can be reduced, and the processing speed can be improved.
[0226]
【The invention's effect】
As described above, according to the present invention, a template matching process can be executed efficiently with a simple configuration.
Further, when a plurality of processing devices share processing data and perform parallel processing, redundant access can be reduced, and a crossbar circuit having a large number of wirings can be reduced in size. As a result, there are advantages that the design is easy, the wiring cost and the wiring delay can be reduced, and the image processing can be speeded up.
[Brief description of the drawings]
FIG. 1 is a diagram conceptually illustrating a parallel processing at a primitive level based on a technique of parallel processing at a pixel level.
FIG. 2 is a diagram illustrating a processing procedure including texture filtering in a general image processing apparatus.
FIG. 3 is a block diagram showing an embodiment of an image processing apparatus according to the present invention.
FIG. 4 is a flowchart for explaining main processing of a stream data controller (SDC) according to the embodiment.
FIG. 5 is a flowchart for explaining functions of a global module according to the embodiment.
FIG. 6 is a diagram illustrating graphics processing of a processing unit in a local module according to the embodiment.
FIG. 7 is a flowchart for explaining the operation of the local module at the time of texture reading according to the embodiment;
FIG. 8 is a diagram for describing image processing of a processing unit in the local module according to the embodiment.
FIG. 9 is a block diagram illustrating a configuration example of a local cache in the local module according to the embodiment;
FIG. 10 is a block diagram illustrating a configuration example of a memory controller of a local cache according to the embodiment;
FIG. 11 is a block diagram illustrating a specific configuration example of a processing unit of a local module according to the embodiment.
FIG. 12 is a block diagram illustrating a configuration example of a pixel engine according to the embodiment.
FIG. 13 is a diagram illustrating a configuration example of a connection network CCN according to the present embodiment.
FIG. 14 is a diagram illustrating a configuration example of a selector according to the embodiment.
FIG. 15 is an explanatory diagram illustrating an outline of calculation execution of the pixel engine according to the embodiment, and is a diagram illustrating a data flow graph of the calculation.
FIG. 16 is an explanatory diagram illustrating an outline of calculation execution of the pixel engine according to the embodiment.
FIG. 17 is an explanatory diagram of pipeline processing of the pixel engine according to the embodiment.
FIG. 18 is a diagram illustrating a first method of realizing dynamic reconfiguration of the pixel engine according to the embodiment.
FIG. 19 is a diagram illustrating a first method of realizing dynamic reconfiguration of the pixel engine according to the embodiment.
FIG. 20 is a diagram illustrating a second method of realizing dynamic reconfiguration of the pixel engine according to the embodiment.
FIG. 21 is a diagram illustrating a second method of realizing dynamic reconfiguration of the pixel engine according to the embodiment.
FIG. 22 is a diagram illustrating a second method of realizing dynamic reconfiguration of the pixel engine according to the embodiment.
FIG. 23 is a diagram illustrating a configuration example of a pixel engine according to the present embodiment, and a connection example with a register unit (RGU) and a crossbar circuit.
FIG. 24 is a diagram illustrating a configuration example of a pixel operation processor (POP) group according to the present embodiment.
FIG. 25 is a diagram illustrating a connection mode between a POP (pixel operation processor) and a memory according to the present embodiment and a configuration example of the POP.
FIG. 26 is a circuit diagram showing a specific configuration example of POPE according to the present embodiment.
FIG. 27 is a diagram showing a form of reading data from a memory to a cache and a form of reading data from a cache to each POPE according to the present embodiment.
FIG. 28 is a diagram for explaining template matching according to the embodiment.
FIG. 29 is a diagram for explaining template matching according to the embodiment.
FIG. 30 is a flowchart for explaining an operation in a case where a pixel processing processor group performs calculation processing based on data in a memory according to the present embodiment and further performs calculation with a pixel engine.
FIG. 31 is a diagram for explaining an operation in a case where arithmetic processing is performed by a group of pixel arithmetic processors based on data in a memory according to the present embodiment, and further, arithmetic is performed by a pixel engine.
FIG. 32 is a timing chart for explaining an operation in a case where arithmetic processing is performed by a group of pixel arithmetic processors based on data in a memory according to the present embodiment, and further, arithmetic is performed by a pixel engine.
FIG. 33 is a block diagram for explaining an operation in a case where arithmetic processing is performed by a group of pixel arithmetic processors based on data in a memory according to the present embodiment, and further, arithmetic is performed by a pixel engine.
FIG. 34 is a diagram for explaining an operation in a case where a pixel operation processor group performs calculation processing based on data in a memory according to the present embodiment and further performs calculation with a pixel engine.
FIG. 35 is a diagram showing an operation outline including a pixel engine (PXE) of a core, a pixel operation processor (POP), a register unit (RGU), and a memory part in the processing unit according to the embodiment.
FIG. 36 is a diagram for describing graphics processing in the case where there is no dependent texture in the processing unit according to the present embodiment.
FIG. 37 is a diagram illustrating a specific operation of a pixel operation processor (POP) group for graphics processing in the processing unit according to the embodiment.
FIG. 38 is a diagram for describing graphics processing in the case where there is a dependent texture in the processing unit according to the present embodiment.
FIG. 39 is a diagram for describing SAD (Summed Absolute \ Difference) processing.
FIG. 40 is a diagram for describing SAD processing in the processing unit according to the present embodiment.
FIG. 41 is a diagram for describing a convolution filter (Convolution @ Filter) process;
FIG. 42 is a diagram for explaining the convolution filter processing in the processing unit according to the embodiment.
FIG. 43 is a diagram illustrating another configuration example (an example in which a plurality of cores are provided) in the processing unit according to the embodiment;
FIG. 44 is a block diagram showing another embodiment of the image processing apparatus according to the present invention.
[Explanation of symbols]
10, 10A image processing apparatus, 11 stream data controller (SDC), 12-0 to 12-3 global module, 121-0 to 121-3 global cache, 13-0 to 13-3 local module 131-0 to 131-3 processing unit, 132-0 to 132-3 memory module, 133-0 to 133-3 local cache, 134-0 to 134-3 global interface (GAIF), CLST0 to CLST ... Cluster, 1311 ... Rasterizer, 1312, 132-1 to 1312-n ... Core, 13121 ... Graphics unit (GRU), 13122 ... Pixel engine (PXE), 13123 ... Pixel operation processor (POP) group, 13124 ... Register unit (RGU), 1 125 ... crossbar circuitry (IXB), POPE0~3 ... calculator, OSLC ... output selection circuit.

Claims (16)

参照画像と変化する対象画像を比較してテンプレートマッチング処理を行う画像処理装置であって、
上記参照画像が格納され、複数のポートを有する第1のメモリと、
上記対象画像が格納され、複数のポートを有する第2のメモリと、
上記第1および第2のメモリの複数のポートに対応して設けられ、演算用パラメータおよび上記第1のメモリおよび第2のメモリから読み出された上記参照画像の要素データおよび対象画像の要素データに基づいて並列演算処理を行い、連続するストリームデータを生成する複数の演算器を含む機能ユニットと、を有し、
上記機能ユニットの上記各演算器は、初段から最終段に向かって縦続接続され、各演算器はそれぞれ上記第1および第2のメモリの各ポートから読み出された要素データに対して所定の演算処理を行って次段の演算器に出力し、当該次段の演算器は自段の演算結果に前段の演算結果を加算し、当該加算結果を次段の演算器に出力し、最終段の演算器で全演算器の総和を求め、当該最終段の演算結果をストリームデータとして出力する
画像処理装置。
An image processing apparatus that performs a template matching process by comparing a reference image and a changing target image,
A first memory storing the reference image and having a plurality of ports;
A second memory storing the target image and having a plurality of ports;
Arithmetic parameters and element data of the reference image and element data of the target image, which are provided corresponding to the plurality of ports of the first and second memories and are read from the first and second memories. A functional unit including a plurality of arithmetic units that perform parallel arithmetic processing based on and generate continuous stream data,
The computing units of the functional unit are cascaded from the first stage to the last stage, and each computing unit performs a predetermined operation on the element data read from each port of the first and second memories. Performs the processing and outputs the result to the next-stage operation unit. The next-stage operation unit adds the previous-stage operation result to the own-stage operation result, and outputs the addition result to the next-stage operation unit. An image processing device for calculating the sum of all the arithmetic units by an arithmetic unit and outputting the operation result of the final stage as stream data.
上記第1および第2のメモリから上記機能ユニットの各演算器への参照画像の要素データおよび対象画像の要素データの読み出しが、初段から順にデータが入力され、かつ、前段の演算器の演算結果の入力が、自段の演算が終了し前段の演算器の演算結果を加算できるタイミングとなるようにアドレスを生成して上記第1および第2のメモリに供給するアドレス生成器を有する
請求項1記載の画像処理装置。
The reading of the element data of the reference image and the element data of the target image from the first and second memories to the respective operation units of the functional unit is performed by sequentially inputting the data from the first stage and calculating the operation result of the preceding operation unit. 2. An address generator, which generates an address so that the input of the first stage has a timing at which the operation of its own stage is completed and the operation result of the previous stage arithmetic unit can be added, and supplies the address to the first and second memories. An image processing apparatus as described in the above.
少なくとも対象画像または参照画像のいずれかを記憶し、複数のポートを有するメモリモジュールを有し、
上記第1および第2のメモリは、少なくとも上記メモリモジュールの各ポートから読み出された画像データを記憶し、記憶データをキャッシュアドレスに応じて上記機能ユニットの各演算器に供給する複数の第1および第2のキャッシュを含み、
上記第1および第2のキャッシュから上記機能ユニットの各演算器への参照画像の要素データおよび対象画像の要素データの読み出しが、初段から順にデータが入力され、かつ、前段の演算器の演算結果の入力が、自段の演算が終了し前段の演算器の演算結果を加算できるタイミングとなるようにアドレスを生成して上記第1および第2のキャッシュに供給するアドレス生成器をさらに
を有する請求項1記載の画像処理装置。
At least one of the target image or the reference image is stored, and has a memory module having a plurality of ports,
The first and second memories store at least image data read from each port of the memory module, and supply the first and second memories to each of the functional units of the functional unit according to a cache address. And a second cache,
The reading of the element data of the reference image and the element data of the target image from the first and second caches to the respective operation units of the functional unit is performed by sequentially inputting the data from the first stage and calculating the operation result of the preceding operation unit. Further comprising: an address generator for generating an address so that the input of the first stage is at a timing at which the operation of the own stage is completed and the operation result of the preceding stage arithmetic unit can be added, and supplied to the first and second caches. Item 2. The image processing apparatus according to Item 1.
上記機能ユニットで生成されたストリームデータに対して所定の演算処理を行う複数の演算器を含む第2の機能ユニットと、
上記第1の機能ユニットと上記第2の機能ユニットの複数の演算器とを相互に接続するクロスバー回路と
を有する請求項1記載の画像処理装置。
A second functional unit including a plurality of arithmetic units that perform predetermined arithmetic processing on the stream data generated by the functional unit;
The image processing apparatus according to claim 1, further comprising a crossbar circuit that interconnects the plurality of arithmetic units of the first functional unit and the plurality of arithmetic units of the second functional unit.
上記並列処理は、ピクセルレベルでの並列処理である
請求項1記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the parallel processing is a parallel processing at a pixel level.
参照画像と変化する対象画像を比較してテンプレートマッチング処理を行う画像処理装置であって、
上記参照画像が格納され、複数のポートを有する第1のメモリと、
上記対象画像が格納され、複数のポートを有する第2のメモリと、
上記第1および第2のメモリの複数のポートに対応して設けられ、演算用パラメータおよび上記第1のメモリおよび第2のメモリから読み出された上記参照画像の要素データおよび対象画像の要素データに基づいて並列演算処理を行い、連続するストリームデータを生成する複数の演算器を含む複数の第1の機能ユニットと、
上記各第1の機能ユニットで生成されたストリームデータに対する集約的な演算処理を行う複数の演算器を含む第2の機能ユニットと、
上記複数の第1の機能ユニットと上記第2の機能ユニットの複数の演算器とを相互に接続するクロスバー回路と、を有し、
上記各第1の機能ユニットの上記各演算器は、初段から最終段に向かって縦続接続され、各演算器はそれぞれ上記第1および第2のメモリの各ポートから読み出された要素データに対して所定の演算処理を行って次段の演算器に出力し、当該次段の演算器は自段の演算結果に前段の演算結果を加算し、当該加算結果を次段の演算器に出力し、最終段の演算器で全演算器の総和を求め、当該最終段の演算結果をストリームデータとして出力する
画像処理装置。
An image processing apparatus that performs a template matching process by comparing a reference image and a changing target image,
A first memory storing the reference image and having a plurality of ports;
A second memory storing the target image and having a plurality of ports;
Arithmetic parameters and element data of the reference image and element data of the target image, which are provided corresponding to the plurality of ports of the first and second memories and are read from the first and second memories. A plurality of first functional units including a plurality of arithmetic units for performing parallel arithmetic processing based on and generating continuous stream data;
A second functional unit including a plurality of arithmetic units that perform intensive arithmetic processing on the stream data generated by each of the first functional units;
A crossbar circuit interconnecting the plurality of first functional units and the plurality of arithmetic units of the second functional unit,
The arithmetic units of each of the first functional units are cascaded from the first stage to the last stage, and each of the arithmetic units operates on element data read from each port of the first and second memories. And performs a predetermined arithmetic process and outputs the result to the next-stage arithmetic unit. The next-stage arithmetic unit adds the previous-stage arithmetic result to the own-stage arithmetic result, and outputs the addition result to the next-stage arithmetic unit. An image processing apparatus for calculating the sum of all the arithmetic units in a final stage arithmetic unit and outputting the arithmetic result of the final stage as stream data.
上記第1および第2のメモリから上記機能ユニットの各演算器への参照画像の要素データおよび対象画像の要素データ読み出しが、初段から順にデータが入力され、かつ、前段の演算器の演算結果の入力が、自段の演算が終了し前段の演算器の演算結果を加算できるタイミングとなるようにアドレスを生成して上記第1および第2のメモリに供給するアドレス生成器を有する
請求項6記載の画像処理装置。
The reading of the element data of the reference image and the element data of the target image from the first and second memories to the respective operation units of the functional unit is performed by sequentially inputting the data from the first stage and calculating the operation result of the previous operation unit. 7. An address generator having an input for generating an address so as to have a timing at which the operation of its own stage is completed and the operation result of the previous stage arithmetic unit can be added, and supplies the address to the first and second memories. Image processing device.
少なくとも対象画像または参照画像のいずれかを記憶し、複数のポートを有するメモリモジュールを有し、
上記第1および第2のメモリは、少なくとも上記メモリモジュールの各ポートから読み出された画像データを記憶し、記憶データをキャッシュアドレスに応じて上記第1の機能ユニットの各演算器に供給する複数の第1および第2のキャッシュを含み、
上記第1および第2のキャッシュから上記第1の機能ユニットの各演算器への参照画像の要素データおよび対象画像の要素データの読み出しが、初段から順にデータが入力され、かつ、前段の演算器の演算結果の入力が、自段の演算が終了し前段の演算器の演算結果を加算できるタイミングとなるようにアドレスを生成して上記第1および第2のキャッシュに供給するアドレス生成器をさらに
を有する請求項6記載の画像処理装置。
At least one of the target image or the reference image is stored, and has a memory module having a plurality of ports,
The first and second memories store at least image data read from each port of the memory module, and supply the stored data to each computing unit of the first functional unit according to a cache address. Including first and second caches of
The reading of the element data of the reference image and the element data of the target image from the first and second caches to the operation units of the first functional unit is performed by sequentially inputting the data from the first stage and executing the operation at the preceding stage. And an address generator for generating an address so that the input of the operation result of (1) is at a timing at which the operation of the own stage is completed and the operation result of the previous stage operation unit can be added, and supplies the address to the first and second caches. The image processing apparatus according to claim 6, further comprising:
上記第2の機能ユニットは、制御信号に応じて再構成可能であって、上記演算器を上記制御信号に応じた電気的な接続網で接続し、複数の演算器回路の電気的接続を確立して複数の演算器からなる演算回路を構成する
請求項6記載の画像処理装置。
The second functional unit is reconfigurable in accordance with a control signal, and connects the arithmetic unit with an electrical connection network according to the control signal to establish an electrical connection of a plurality of arithmetic unit circuits. 7. The image processing apparatus according to claim 6, wherein an arithmetic circuit including a plurality of arithmetic units is configured.
上記並列処理は、ピクセルレベルでの並列処理である
請求項6記載の画像処理装置。
The image processing apparatus according to claim 6, wherein the parallel processing is a parallel processing at a pixel level.
複数のモジュールが処理データを共有して並列処理を行う画像処理装置であって、
グローバルモジュールと複数のローカルモジュールとを含み、
上記グローバルモジュールは、
上記複数のローカルモジュールが並列に接続され、ローカルモジュールからリクエストを受けると、上記リクエストに応じた当該リクエストを出したローカルモジュールに処理データを出力し、
上記複数のローカルモジュールは、参照画像と変化する対象画像を比較してテンプレートマッチング処理を行うモジュールであって、
上記参照画像が格納され、複数のポートを有する第1のメモリと、
上記対象画像が格納され、複数のポートを有する第2のメモリと、
上記第1および第2のメモリの複数のポートに対応して設けられ、演算用パラメータおよび上記第1のメモリおよび第2のメモリから読み出された上記参照画像の要素データおよび対象画像の要素データに基づいて並列演算処理を行い、連続するストリームデータを生成する複数の演算器を含む機能ユニットと、を有し、
上記機能ユニットの上記各演算器は、初段から最終段に向かって縦続接続され、各演算器はそれぞれ上記第1および第2のメモリの各ポートから読み出された要素データに対して所定の演算処理を行って次段の演算器に出力し、当該次段の演算器は自段の演算結果に前段の演算結果を加算し、当該加算結果を次段の演算器に出力し、最終段の演算器で全演算器の総和を求め、当該最終段の演算結果をストリームデータとして出力する
画像処理装置。
An image processing apparatus in which a plurality of modules share processing data and perform parallel processing,
Including a global module and multiple local modules,
The above global module is
When the plurality of local modules are connected in parallel and receive a request from the local module, processing data is output to the local module that issued the request in accordance with the request,
The plurality of local modules are modules that perform a template matching process by comparing a reference image and a changing target image,
A first memory storing the reference image and having a plurality of ports;
A second memory storing the target image and having a plurality of ports;
Arithmetic parameters and element data of the reference image and element data of the target image, which are provided corresponding to the plurality of ports of the first and second memories and are read from the first and second memories. A functional unit including a plurality of arithmetic units that perform parallel arithmetic processing based on and generate continuous stream data,
The computing units of the functional unit are cascaded from the first stage to the last stage, and each computing unit performs a predetermined operation on the element data read from each port of the first and second memories. Performs the processing and outputs the result to the next-stage operation unit. The next-stage operation unit adds the previous-stage operation result to the own-stage operation result, and outputs the addition result to the next-stage operation unit. An image processing device for calculating the sum of all the arithmetic units by an arithmetic unit and outputting the operation result of the final stage as stream data.
複数のモジュールが処理データを共有して並列処理を行う画像処理装置であって、
グローバルモジュールと複数のローカルモジュールとを含み、
上記グローバルモジュールは、
上記複数のローカルモジュールが並列に接続され、ローカルモジュールからリクエストを受けると、上記リクエストに応じた当該リクエストを出したローカルモジュールに処理データを出力し、
上記複数のローカルモジュールは、参照画像と変化する対象画像を比較してテンプレートマッチング処理を行うモジュールであって、
上記参照画像が格納され、複数のポートを有する第1のメモリと、
上記対象画像が格納され、複数のポートを有する第2のメモリと、
上記第1および第2のメモリの複数のポートに対応して設けられ、演算用パラメータおよび上記第1のメモリおよび第2のメモリから読み出された上記参照画像の要素データおよび対象画像の要素データに基づいて並列演算処理を行い、連続するストリームデータを生成する複数の演算器を含む複数の第1の機能ユニットと、
上記各第1の機能ユニットで生成されたストリームデータに対する集約的な演算処理を行う複数の演算器を含む第2の機能ユニットと、
上記複数の第1の機能ユニットと上記第2の機能ユニットの複数の演算器とを相互に接続するクロスバー回路と、を有し、
上記各第1の機能ユニットの上記各演算器は、初段から最終段に向かって縦続接続され、各演算器はそれぞれ上記第1および第2のメモリの各ポートから読み出された要素データに対して所定の演算処理を行って次段の演算器に出力し、当該次段の演算器は自段の演算結果に前段の演算結果を加算し、当該加算結果を次段の演算器に出力し、最終段の演算器で全演算器の総和を求め、当該最終段の演算結果をストリームデータとして出力する
画像処理装置。
An image processing apparatus in which a plurality of modules share processing data and perform parallel processing,
Including a global module and multiple local modules,
The above global module is
When the plurality of local modules are connected in parallel and receive a request from the local module, processing data is output to the local module that issued the request in accordance with the request,
The plurality of local modules are modules that perform a template matching process by comparing a reference image and a changing target image,
A first memory storing the reference image and having a plurality of ports;
A second memory storing the target image and having a plurality of ports;
Arithmetic parameters and element data of the reference image and element data of the target image, which are provided corresponding to the plurality of ports of the first and second memories and are read from the first and second memories. A plurality of first functional units including a plurality of arithmetic units for performing parallel arithmetic processing based on and generating continuous stream data;
A second functional unit including a plurality of arithmetic units that perform intensive arithmetic processing on the stream data generated by each of the first functional units;
A crossbar circuit interconnecting the plurality of first functional units and the plurality of arithmetic units of the second functional unit,
The arithmetic units of each of the first functional units are cascaded from the first stage to the last stage, and each of the arithmetic units operates on element data read from each port of the first and second memories. And performs a predetermined arithmetic process and outputs the result to the next-stage arithmetic unit. The next-stage arithmetic unit adds the previous-stage arithmetic result to the own-stage arithmetic result, and outputs the addition result to the next-stage arithmetic unit. An image processing apparatus for calculating the sum of all the arithmetic units in a final stage arithmetic unit and outputting the arithmetic result of the final stage as stream data.
参照画像と変化する対象画像を比較してテンプレートマッチング処理を行う画像処理方法であって、
縦続接続された複数の演算ステージにおいて、それぞれ第1および第2のメモリの各ポートから読み出された参照画像および対象画像の要素データに対して所定の演算処理を行い、
次段の演算ステージでは、自段の演算結果に前段の演算結果を加算し、
最終段の演算ステージで全演算ステージの総和を求め、当該最終段の演算結果をストリームデータとして出力する
画像処理方法。
An image processing method of performing a template matching process by comparing a reference image and a changing target image,
In a plurality of cascade-connected operation stages, predetermined operation processing is performed on the element data of the reference image and the target image read from each port of the first and second memories, respectively.
In the next operation stage, the operation result of the previous stage is added to the operation result of the own stage,
An image processing method in which a sum of all operation stages is obtained in a final operation stage, and the operation result of the final stage is output as stream data.
上記メモリから各演算ステージへのデータの読み出しは、初段から順にデータを入力し、かつ、前段の演算ステージの演算結果の入力が、自段の演算が終了し前段の演算ステージの演算結果を加算できるタイミングとなるように行う
請求項13記載の画像処理方法。
When reading data from the above-mentioned memory to each operation stage, data is input in order from the first stage, and the input of the operation result of the previous operation stage adds the operation result of the previous operation stage when the operation of the own stage is completed. 14. The image processing method according to claim 13, wherein the method is performed so as to be able to perform the timing.
参照画像と変化する対象画像を比較してテンプレートマッチング処理を行う画像処理方法であって、
複数の機能ユニットの縦続接続された複数の演算ステージにおいて、それぞれ第1および第2のメモリの各ポートから読み出された参照画像および対象画像の要素データに対して所定の演算処理を行い、
次段の演算ステージでは、自段の演算結果に前段の演算結果を加算し、
最終段の演算ステージで全演算ステージの総和を求め、当該最終段の演算結果をストリームデータとしてクロスバー回路に出力し、
上記クロスバー回路を転送された複数のストリームデータに対して集約的な演算処理を行う
画像処理方法。
An image processing method of performing a template matching process by comparing a reference image and a changing target image,
In a plurality of operation stages connected in cascade of a plurality of functional units, a predetermined operation is performed on the element data of the reference image and the target image read from each port of the first and second memories, respectively.
In the next operation stage, the operation result of the previous stage is added to the operation result of the own stage,
The final operation stage calculates the sum of all the operation stages, outputs the operation result of the final stage to the crossbar circuit as stream data,
An image processing method for performing intensive arithmetic processing on a plurality of stream data transferred through the crossbar circuit.
上記メモリから各演算ステージへのデータの読み出しは、初段から順にデータを入力し、かつ、前段の演算ステージの演算結果の入力が、自段の演算が終了し前段の演算ステージの演算結果を加算できるタイミングとなるように行う
請求項15記載の画像処理方法。
When reading data from the above-mentioned memory to each operation stage, data is input in order from the first stage, and the input of the operation result of the previous operation stage adds the operation result of the previous operation stage when the operation of the own stage is completed. 16. The image processing method according to claim 15, wherein the method is performed so as to be able to perform the timing.
JP2002211852A 2002-07-19 2002-07-19 Image processing apparatus and method Expired - Fee Related JP4264530B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002211852A JP4264530B2 (en) 2002-07-19 2002-07-19 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002211852A JP4264530B2 (en) 2002-07-19 2002-07-19 Image processing apparatus and method

Publications (2)

Publication Number Publication Date
JP2004054647A true JP2004054647A (en) 2004-02-19
JP4264530B2 JP4264530B2 (en) 2009-05-20

Family

ID=31934934

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002211852A Expired - Fee Related JP4264530B2 (en) 2002-07-19 2002-07-19 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP4264530B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005088548A1 (en) * 2004-03-10 2005-09-22 Kabushiki Kaisha Toshiba Drawing device, drawing method and drawing program
JP2005284663A (en) * 2004-03-29 2005-10-13 Advanced Telecommunication Research Institute International Arithmetic element tile, arithmetic unit, and manufacturing method of arithmetic unit
JP4810605B2 (en) * 2006-03-13 2011-11-09 株式会社ソニー・コンピュータエンタテインメント Texture unit for multiprocessor environments
JPWO2015125960A1 (en) * 2014-02-24 2017-03-30 株式会社ニコン Information processing apparatus, digital camera and processor
CN112070651A (en) * 2019-06-10 2020-12-11 华夏芯(北京)通用处理器技术有限公司 Texture mapping hardware accelerator based on double Buffer architecture
CN113329139A (en) * 2020-02-28 2021-08-31 中国电信股份有限公司 Video stream processing method, device and computer readable storage medium

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005088548A1 (en) * 2004-03-10 2005-09-22 Kabushiki Kaisha Toshiba Drawing device, drawing method and drawing program
JPWO2005088548A1 (en) * 2004-03-10 2007-08-30 株式会社東芝 Drawing apparatus, drawing method, and drawing program
JP4521399B2 (en) * 2004-03-10 2010-08-11 株式会社東芝 Drawing apparatus, drawing method, and drawing program
US7817153B2 (en) 2004-03-10 2010-10-19 Kabushiki Kaisha Toshiba Graphic rendering apparatus which parallel-processes pixels at a time
JP2005284663A (en) * 2004-03-29 2005-10-13 Advanced Telecommunication Research Institute International Arithmetic element tile, arithmetic unit, and manufacturing method of arithmetic unit
JP4810605B2 (en) * 2006-03-13 2011-11-09 株式会社ソニー・コンピュータエンタテインメント Texture unit for multiprocessor environments
JPWO2015125960A1 (en) * 2014-02-24 2017-03-30 株式会社ニコン Information processing apparatus, digital camera and processor
CN112070651A (en) * 2019-06-10 2020-12-11 华夏芯(北京)通用处理器技术有限公司 Texture mapping hardware accelerator based on double Buffer architecture
CN113329139A (en) * 2020-02-28 2021-08-31 中国电信股份有限公司 Video stream processing method, device and computer readable storage medium
CN113329139B (en) * 2020-02-28 2023-11-03 天翼云科技有限公司 Video stream processing method, device and computer readable storage medium

Also Published As

Publication number Publication date
JP4264530B2 (en) 2009-05-20

Similar Documents

Publication Publication Date Title
JP4158413B2 (en) Image processing device
US6819332B2 (en) Antialias mask generation
US7522171B1 (en) On-the-fly reordering of 32-bit per component texture images in a multi-cycle data transfer
US6798421B2 (en) Same tile method
US7187383B2 (en) Yield enhancement of complex chips
US6900800B2 (en) Tile relative origin for plane equations
US6731288B2 (en) Graphics engine with isochronous context switching
JP5345226B2 (en) Graphics processor parallel array architecture
US6847370B2 (en) Planar byte memory organization with linear access
US6791559B2 (en) Parameter circular buffers
US7227556B2 (en) High quality antialiased lines with dual sampling pattern
US8077174B2 (en) Hierarchical processor array
US20020130874A1 (en) Vector instruction set
JPH10177659A (en) Three-dimensional graphic accelerator for executing multilogic bus while using improved common data line for bus communication
US20070233975A1 (en) Data processor with a built-in memory
JPWO2003009125A1 (en) Arithmetic device and image processing device
JP4264530B2 (en) Image processing apparatus and method
JP4264529B2 (en) Image processing apparatus and method
US20030164823A1 (en) 3D graphics accelerator architecture
JP4186561B2 (en) Image processing apparatus and method
JP2004145838A (en) Image processor
Poulton et al. Breaking the frame-buffer bottleneck with logic-enhanced memories
JP2004118713A (en) Image processing apparatus
JP4264526B2 (en) Image processing apparatus and method
JP4264527B2 (en) Image processing apparatus and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050622

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080625

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080708

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080908

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081014

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081215

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090126

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

Free format text: PAYMENT UNTIL: 20120227

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees