JP2006209651A - Graphics hardware - Google Patents
Graphics hardware Download PDFInfo
- Publication number
- JP2006209651A JP2006209651A JP2005023745A JP2005023745A JP2006209651A JP 2006209651 A JP2006209651 A JP 2006209651A JP 2005023745 A JP2005023745 A JP 2005023745A JP 2005023745 A JP2005023745 A JP 2005023745A JP 2006209651 A JP2006209651 A JP 2006209651A
- Authority
- JP
- Japan
- Prior art keywords
- pixel data
- pixel
- tile
- area
- tile area
- 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
Links
Images
Landscapes
- Image Input (AREA)
- Image Generation (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
【課題】 グラフィクスハードウェアの描画処理を高速化する。
【解決手段】 ピクセルデータを用いて描画処理を行うグラフィクスエンジン10と、グラフィクスエンジン10に供給するピクセルデータを格納し、それらのピクセルデータのバースト転送が可能なフレームバッファ14と、フレームバッファ14との間で、フレームバッファ14の記憶領域をタイル状に分割した寸法変更可能なタイル領域の単位でピクセルデータの入出力を行い、取得したピクセルデータをグラフィクスエンジン10に供給するピクセルキャッシュ11と、ピクセルキャッシュ11がフレームバッファ14にアクセスする際に出力するアドレスをフレームバッファ14の物理アドレスに変換して、アクセスを仲介するメモリ制御装置12を備え、メモリ制御装置12は、タイル領域内のピクセルデータがフレームバッファ14の同一ページ領域の範囲内に収まるようにアドレス変換する。
【選択図】 図1
PROBLEM TO BE SOLVED: To speed up graphics hardware drawing processing.
A graphics engine 10 that performs rendering processing using pixel data, a frame buffer 14 that stores pixel data to be supplied to the graphics engine 10 and is capable of burst transfer of the pixel data, and a frame buffer 14 A pixel cache 11 that inputs and outputs pixel data in units of tile areas whose dimensions can be changed by dividing the storage area of the frame buffer 14 into tiles, and supplies the acquired pixel data to the graphics engine 10; 11 includes a memory control device 12 that converts an address output when accessing the frame buffer 14 into a physical address of the frame buffer 14 and mediates the access. buffer Address conversion is performed so as to be within the range of 14 identical page areas.
[Selection] Figure 1
Description
この発明は、グラフィクスハードウェアに関するものである。 The present invention relates to graphics hardware.
描画処理を行うグラフィクスハードウェアにおいて、グラフィクスエンジンから描画用メモリ(以下、フレームバッファと記す。)へのピクセルデータの入出力が低速である場合、それが描画高速化のボトルネックになる。
SDRAM(Synchronous Dynamic Random Access Memory)のようにバースト転送が可能なメモリでは、バースト転送を用いて連続したデータを入出力することができる。1つのデータを入出力する場合も連続したデータをバースト転送にて入出力する場合も、データ転送までの待ち時間は同じであるため、バースト転送を用いてデータを連続して入出力するほうが効率的である。
そのため、グラフィクスハードウェアのフレームバッファとしてバースト転送可能なメモリを用いる場合があるが、その場合、グラフィクスハードウェア内部にピクセルデータ用のメモリ装置(以下、ピクセルキャッシュと記す。)を搭載するシステムが実現されている。ピクセルキャッシュ内には、フレームバッファとの間で連続して入出力するピクセルデータが数個保存される。グラフィクスエンジンは、ピクセルキャッシュとの間でピクセルデータの入出力を行い、ピクセルキャッシュはフレームバッファとの間でバースト転送によりピクセルデータの入出力を行う。
グラフィクスハードウェアにピクセルキャッシュを搭載した場合、グラフィクスエンジンが逐次的にフレームバッファへピクセルデータを入出力する場合に比べメモリ帯域幅が改善される。
しかし、ピクセルキャッシュがフレームバッファとの間でバースト転送によってピクセルデータの入出力を行う場合、グラフィクスハードウェアの描画処理のためには不要なピクセルデータが転送される場合が少なからず発生し、データ転送処理に無駄が生じるという問題がある。
そこで、例えば、特許文献1に開示された技術のように、ピクセルキャッシュとフレームバッファの間での無駄なピクセルデータの入出力を減少させるシステムが提案されている。具体的には、スクリーンをタイル状に分割した領域(タイル領域)の単位で、ピクセルキャッシュとフレームバッファはピクセルデータの入出力を行う。
一般に、グラフィクスエンジンがアクセスするピクセルデータには空間的局所性があるため、タイル領域の一部にアクセスがあった場合、同一タイル内へのアクセスが近いうちに発生する可能性が高い。そのため、特許文献1に開示された方法を用いれば、無駄なピクセルデータの入出力を減少させることが可能となる。
In graphics hardware that performs drawing processing, when pixel data is input / output from a graphics engine to a drawing memory (hereinafter referred to as a frame buffer) at a low speed, this becomes a bottleneck for speeding up drawing.
In a memory capable of burst transfer, such as SDRAM (Synchronous Dynamic Random Access Memory), continuous data can be input / output using burst transfer. Whether the data is input / output or the continuous data is input / output by burst transfer, the waiting time until the data transfer is the same, so it is more efficient to input / output data continuously using burst transfer. Is.
For this reason, there is a case where a memory capable of burst transfer is used as a frame buffer of the graphics hardware. In that case, a system in which a memory device for pixel data (hereinafter referred to as a pixel cache) is mounted inside the graphics hardware is realized. Has been. In the pixel cache, several pieces of pixel data that are continuously input / output from / to the frame buffer are stored. The graphics engine inputs / outputs pixel data to / from the pixel cache, and the pixel cache inputs / outputs pixel data to / from the frame buffer by burst transfer.
When the pixel cache is mounted on the graphics hardware, the memory bandwidth is improved as compared with the case where the graphics engine sequentially inputs and outputs pixel data to the frame buffer.
However, when the pixel cache inputs / outputs pixel data to / from the frame buffer by burst transfer, there are not a few cases where unnecessary pixel data is transferred for graphics hardware drawing processing. There is a problem that processing is wasted.
Therefore, for example, as in the technique disclosed in
In general, pixel data accessed by a graphics engine has spatial locality, and therefore, when a part of a tile area is accessed, there is a high possibility that access to the same tile will occur soon. Therefore, if the method disclosed in
しかし、特許文献1に開示された方法では、フレームバッファ左上からスキャンライン(フレームバッファ横方向連続アクセス)に沿って、ピクセルデータのタイル領域を確保している。このため、1タイル領域が異なるページにまたがる場合には、そのタイル領域のピクセルデータ入出力時にフレームバッファの非連続空間へのアクセスが発生し、ピクセルキャッシュとフレームバッファの間でのデータ入出力に遅延が生じることがある。
また、特許文献1に記載された方法では、タイル領域寸法を動的に変更可能としているが、この変更はグラフィクスエンジンの種類に基づいて行われる。しかし、一種類のグラフィクスエンジンが描画する図形がどれも同じ特徴を持っているとは限らない。よって、グラフィクスエンジンの種類だけでなく描画される図形からタイル領域の寸法を決定するほうがよい。
However, in the method disclosed in
In the method described in
この発明は上記のような課題を解決するためになされたもので、グラフィクスハードウェアの描画処理を高速化することを目的とする。 The present invention has been made to solve the above-described problems, and an object of the present invention is to speed up graphics hardware drawing processing.
この発明に係るグラフィクスハードウェアは、ピクセルデータを用いて描画処理を行うグラフィクスエンジンと、グラフィクスエンジンに供給するピクセルデータを格納し、それらのピクセルデータのバースト転送が可能な描画用メモリと、描画用メモリとの間で、描画用メモリの記憶領域をタイル状に分割した寸法変更可能なタイル領域の単位でピクセルデータの入出力を行い、取得したピクセルデータをグラフィクスエンジンに供給するピクセルキャッシュと、ピクセルキャッシュが描画用メモリにアクセスする際に出力するアドレスを描画用メモリの物理アドレスに変換して、アクセスを仲介するメモリ制御装置を備え、メモリ制御装置は、タイル領域内のピクセルデータが描画用メモリの同一ページ領域の範囲内に収まるようにアドレス変換するものである。 The graphics hardware according to the present invention stores a graphics engine that performs rendering processing using pixel data, a pixel memory that stores pixel data to be supplied to the graphics engine, and capable of burst transfer of the pixel data, A pixel cache that inputs and outputs pixel data to and from the memory in units of tile areas whose dimensions can be changed by dividing the storage area of the drawing memory into tiles, and supplies the acquired pixel data to the graphics engine, and pixels A memory control device that converts an address output when the cache accesses the drawing memory into a physical address of the drawing memory and mediates the access, and the pixel data in the tile area is stored in the drawing memory. Add to fit within the same page area It is intended to be converted.
この発明によれば、描画用メモリのタイル領域の寸法が変更されても、メモリ制御装置のアドレス変換機能により、描画用メモリの同一ページ領域の範囲内に1つのタイル領域のピクセルデータが格納されるようにしたので、描画用メモリへのアクセスの遅延が避けられ、グラフィクスハードウェアの描画処理を高速化することができる。 According to the present invention, even if the size of the tile area of the drawing memory is changed, the pixel data of one tile area is stored in the range of the same page area of the drawing memory by the address conversion function of the memory control device. Thus, a delay in access to the drawing memory can be avoided, and the graphics hardware drawing process can be speeded up.
以下、この発明の実施の形態を説明する。
実施の形態1.
図1は、この発明の実施の形態1による、グラフィクスハードウェア100の構成を示すブロック図である。図に示すように、グラフィクスハードウェア100は、グラフィクスエンジン10、ピクセルキャッシュ11、メモリ制御装置12、メモリ(描画用メモリ)13、表示装置15、CPU16を備えている。
グラフィクスエンジン10は、図形イメージのスクリーンへの出力やピクセルデータの入出力等の描画処理を行うエンジンであり、例えば、二次元の図形イメージを生成する二次元グラフィクスエンジンや三次元のイメージを生成する三次元グラフィクスエンジンやMPEG(Moving Picture Experts Group)などの動画を生成するMPEGエンジンなどがある。なお、グラフィクスエンジン10は複数搭載してもよい。
ピクセルキャッシュ11は、例えば、SRAM等の高速なメモリである。
メモリ13はバースト転送が可能なSDRAMやDDR−SDRAM等のDRAMメモリであり、フレームバッファ(描画用メモリ)14を含んでいる。
Embodiments of the present invention will be described below.
FIG. 1 is a block diagram showing a configuration of
The
The pixel cache 11 is a high-speed memory such as an SRAM.
The
次に、動作について説明する。
まず、グラフィクスハードウェア100の動作の概要について説明する。
メモリ13の一部もしくは全領域は、フレームバッファ14として利用され、フレームバッファ14には、グラフィクスエンジン10が描画処理に用いる全てのピクセルデータが保存されている。フレームバッファ14の記憶領域は複数のタイル領域に分割されており、ピクセルデータは各タイル領域に格納されている。このタイル領域は、動的に寸法を変更することができる。
フレームバッファ14とグラフィクスエンジン10の間でのピクセルデータの入出力は、ピクセルキャッシュ11を介して行われる。ピクセルキャッシュ11はピクセルデータを一時保存するためのメモリであり、メモリ制御装置12を経由してバースト転送によりフレームバッファ14との間でピクセルデータの入出力を行う。
メモリ制御装置12には、CRTや液晶ディスプレイなどの表示装置15が接続されており、メモリ制御装置12は、フレームバッファ14のピクセルデータを読み出して表示装置15に表示する機能を有する。また、メモリ制御装置12にはCPU16のようなメモリ13にアクセス可能な装置が接続されている。メモリ制御装置12に接続される装置がメモリ13にアクセスする際、メモリ制御装置12は、それらの装置から出力されるアドレスをメモリ13の物理アドレスに変換するアドレス変換機能を有する。メモリ制御装置12の機能により、メモリ13はバースト転送によるデータの高速入出力が可能である。
Next, the operation will be described.
First, an outline of the operation of the
A part or the whole area of the
Input / output of pixel data between the
A
次に、ピクセルキャッシュ11とフレームバッファ14の間でのデータ入出力動作について説明する。
図2は、ピクセルキャッシュ11の構成を示す図である。ピクセルキャッシュ11は、フレームバッファ14のタイル領域に対応する複数のエントリを有する。各エントリは、制御フラグ21、タイル領域の寸法を表すタイルサイズ22、フレームバッファ14のタイル領域内の先頭ピクセルのスクリーン位置(X−Y座標)を表すタグアドレス23、タイル領域内のピクセルデータ24から構成される。制御フラグ21は、ピクセルデータが変更されたことを表すダーティフラグとキャッシュエントリが有効であることを示すイネーブルフラグから構成される。ダーティフラグは1エントリ中のピクセルデータ24を分割したブロックごとに管理するフラグである。保存できるピクセルデータ24の量はどのエントリも同じであるが、タイルサイズ22はエントリ間で異なっていてもよい。
Next, a data input / output operation between the pixel cache 11 and the
FIG. 2 is a diagram illustrating a configuration of the pixel cache 11. The pixel cache 11 has a plurality of entries corresponding to the tile areas of the
図3は、ピクセルキャッシュ11の各エントリのピクセルデータ24とフレームバッファ14の対応を示す図である。あるフレームバッファ14のタイル領域に対応するエントリのピクセルデータ24は、フレームバッファ14上でタグアドレス23を領域の左上とし、寸法がタイルサイズ22の領域内に含まれるピクセルデータである。
また、タイル領域内のピクセルデータは、例えば図3に示すエントリ3に対応したタイル領域33と、エントリXに対応したタイル領域34のように重複して格納されていても良い。
FIG. 3 is a diagram showing the correspondence between the
Further, the pixel data in the tile area may be stored redundantly, for example, as a tile area 33 corresponding to
ピクセルキャッシュ11に保存できるピクセルデータ24の量には限界があるため、グラフィクスエンジン10の処理において不要になったピクセルデータはピクセルキャッシュ11からフレームバッファ14へ転送し、新たに必要になったピクセルデータをフレームバッファ14からピクセルキャッシュ11へ転送する。この時、ピクセルデータは、タイル領域単位で入出力される。
Since there is a limit to the amount of
ここで、フレームバッファ14のタイル領域の寸法は変更可能であり、寸法を変更することによってピクセルキャッシュ11とフレームバッファ14の間のピクセルデータの入出力回数を減らすことが可能である。
図4は、フレームバッファ14のタイル領域の分割例を示す図である。図中(a)に示すようにフレームバッファ14を複数のタイル領域41に分割した場合、図に示すような三角形を書くためには、網がけ部分のタイル領域へのアクセスが必要となり、ピクセルキャッシュ11からフレームバッファ14へ合計6回の書き込みアクセスが必要である。これは、グラフィクスエンジン10がピクセルキャッシュ11に対して三角形のピクセルデータを出力すると、ピクセルキャッシュ11はタイル領域単位でフレームバッファ14とピクセルデータの入出力を行うので、描画する図形が占めるタイル領域の数だけ、ピクセルキャッシュ11とフレームバッファ14の間でデータ入出力が発生するからである。
一方、図中(b)に示すようにフレームバッファ14を複数のタイル領域42に分割した場合、同じ三角形を書くために必要なピクセルキャッシュ11からフレームバッファ14への書き込みアクセスの回数は3回でよい。なお、a、bどちらも1タイル領域内のピクセル数は同じである。描画する図形が矩形塗りつぶしの場合は、逆に図4の(a)のように分割した方がアクセス回数が減る場合も考えられる。
このように、描画する図形によって、フレームバッファ14のタイル領域の寸法を変化させると、ピクセルキャッシュ11とフレームバッファ14の間のデータ入出力回数を減らすことができるので、描画を高速化できる。
Here, the size of the tile area of the
FIG. 4 is a diagram illustrating an example of division of the tile area of the
On the other hand, when the
As described above, if the size of the tile area of the
ここで、タイル領域の寸法を変化させる方法について説明する。タイル領域の寸法変更方法の例としては以下の3つを上げることができる。
寸法変更方法1:グラフィクスエンジン10がタイル寸法を指定する。
寸法変更方法2:グラフィクスハードウェア100を制御するプログラムがタイル寸法を指定する。
寸法変更方法3:ピクセルキャッシュ11がタイル寸法を決定する。
Here, a method for changing the size of the tile area will be described. The following three examples can be given as examples of the tile area size changing method.
Dimension changing method 1: The
Dimension changing method 2: A program for controlling the
Size changing method 3: The pixel cache 11 determines the tile size.
寸法変更方法1では、グラフィクスエンジン10毎に予めタイル寸法を決めておき、アクセスがあったグラフィクスエンジン10の種類に基づいてタイル寸法を決定する。
寸法変更方法2では、グラフィクスエンジン10を制御する描画プログラム側でタイル寸法を指定する。描画プログラムは描画する図形を把握しているので、ピクセルキャッシュ11のタイル寸法をその図形に適したタイル寸法に変更する。
寸法変更方法3では、ピクセルキャッシュ11が、グラフィクスエンジン10がアクセスするピクセルに基づいてタイル寸法を決定する。
In the
In the
In the
以下、ピクセルキャッシュ11がタイル寸法を決定する方法(寸法変更方法3)について説明する。上述したように、ピクセルキャッシュ11は制御フラグ21を有しており、その中にピクセルデータが変更されたことを表すダーティフラグがある。ピクセルキャッシュ11は、ダーティフラグに基づいてタイル領域のうちどのピクセルがアクセスされたかを知ることができる。また同時に、アクセスされなかった未使用領域も検出し、その未使用領域をタイルの寸法決定に用いることができる。
ピクセルキャッシュ11は、ピクセルキャッシュ11のエントリ中、直近にアクセスされたエントリのダーティフラグに基づいてタイル寸法を決定する。具体的には、変化しうるタイル領域の寸法を予め決めておき、その中から未使用部分が一番少なくなる寸法を選択する。例えば、直近でアクセスされたピクセルキャッシュ11のエントリのピクセルデータ24が、図5に示す8×8ピクセルのタイル領域50に対応している場合、タイル領域の左上を固定して、タイル領域寸法を変化させた時に未使用部分が一番少なくなるようなタイル領域寸法を決める。図5中のタイル領域51は未使用部分を含むが、タイル領域52は未使用部分がまったくないため、タイル領域寸法をタイル領域52の寸法に変更する。なお、この例ではタイル領域の左上を固定しているが、右下や中心等の1ピクセルを固定してもよい。また、固定するピクセルは、未使用部分が最小になるように選択してもよい。
また、タイル領域の寸法と未使用部分の変更履歴を保存しておき、タイル領域の変更後、最も未使用部分が少なくなった組み合わせを選択するようにしてもよい。
Hereinafter, a method (size changing method 3) by which the pixel cache 11 determines the tile size will be described. As described above, the pixel cache 11 has the
The pixel cache 11 determines the tile size based on the dirty flag of the entry accessed most recently in the entry of the pixel cache 11. Specifically, the dimension of the tile area that can be changed is determined in advance, and the dimension that minimizes the unused portion is selected from among the dimensions. For example, when the
Alternatively, the size of the tile area and the change history of the unused part may be stored, and the combination with the least unused part may be selected after the tile area is changed.
また、未使用部分を検出してタイル領域の寸法を変更する際、隣接タイル領域の先読み(プリフェッチ)を行うことも可能である。例えば、図6に示すように、タイル領域600の下半分が未使用である場合、上、右、左のタイル領域602,603,604が次にアクセスされる可能性が高い。アクセスされるであろうタイル領域をピクセルキャッシュ11に先読みすれば、描画性能向上に効果的である。 Further, when an unused portion is detected and the size of the tile area is changed, it is possible to prefetch (prefetch) adjacent tile areas. For example, as shown in FIG. 6, when the lower half of the tile area 600 is unused, the top, right, and left tile areas 602, 603, and 604 are likely to be accessed next. Prefetching the tile area to be accessed into the pixel cache 11 is effective in improving the drawing performance.
図7は、実施の形態1による、ピクセルキャッシュ11の動作のフローチャートである。
まず、ステップST61では、グラフィクスエンジン10からアクセスするピクセルのスクリーン位置を表すアドレスを取得する。
ステップST62では、取得したアドレスに対応するピクセルがピクセルキャッシュ11内に保存されたタイル領域に格納されているかを判定する。
格納されていると判定された場合には、ステップST63に進み、グラフィクスエンジン10からのアクセスが読み出し要求か、もしくは書き込み要求かを判定する。読み出し要求の場合ステップST64に進み、ピクセルキャッシュ11内の対応するピクセルデータをグラフィクスエンジン10に転送する。書き込み要求の場合はステップST65に進み、グラフィクスエンジン10から転送されるデータでピクセルキャッシュ11内のピクセルデータ24を更新する。この際、タイル領域が複数重なった部分のピクセルに書き込みアクセスがあった場合には、そのピクセルを含むタイル領域に対応するエントリ全てを更新する。例えば、図3に示すタイル領域33とタイル領域34の重なった部分に書き込みアクセスがあった場合には、エントリ3とエントリXの両方のピクセルデータ24を更新する。
FIG. 7 is a flowchart of the operation of the pixel cache 11 according to the first embodiment.
First, in step ST61, an address representing a screen position of a pixel accessed from the
In step ST <b> 62, it is determined whether the pixel corresponding to the acquired address is stored in the tile area stored in the pixel cache 11.
If it is determined that it is stored, the process proceeds to step ST63, and it is determined whether the access from the
ステップST62でグラフィクスエンジン10によりアクセスされるピクセルが、ピクセルキャッシュ11内に保存したタイル領域にないと判定された場合には、ステップST66に進む。
ステップST66では、上述した寸法変更方法によってタイル領域寸法を決定する。次に、ステップST67では、フレームバッファ14に退避させるピクセルキャッシュ11のエントリを決定する。すなわち、新たに必要となったタイル領域のピクセルデータをフレームバッファ14から読み出してピクセルキャッシュ11に格納するため、1エントリ分のデータをピクセルキャッシュ11からフレームバッファ14に退避する必要がある。そのため、退避するエントリを決定する。退避するエントリの決定方法としては、一般的なLRU(least recently used)法を用いてアクセスされてからの経過時間が一番長いエントリを退避するようにしてもよいが、グラフィクスエンジン10がアクセスしたピクセルから一番離れたタイル領域に対応するエントリを退避するエントリに選択しても良い。グラフィクスエンジン10がアクセスするピクセルには空間的局所性があるため、離れているタイル領域を再びアクセスする確率は低い。そのため、一番離れたタイル領域に対応するエントリをフレームバッファ14に退避させてしまってもよいと考えられる。
次に、ステップST68では、新しく決定したタイル領域をフレームバッファ14から読み出す。ここで、ステップST67で決定したエントリをフレームバッファ14へ退避する処理(ステップST69)は保留し、置き換えられる新しいタイル領域のピクセルデータの読み出しを先に行う。これは、ステップST68が終了するまでグラフィクスエンジン10からピクセルキャッシュ11へのアクセスは待ち状態となるため、この待ち時間が減少するように、ステップST69を後回しにしてステップST68を先に実施している。ステップST68を終了した後、ステップST63に進み、グラフィクスエンジン10のアクセスに応答すると同時に、ステップST69を実行し、退避させるエントリのフレームバッファ14への書き戻しを実行する。なお、上述した先読み(プリフェッチ)を実施する場合にはステップST67に進む。
If it is determined in step ST62 that the pixel accessed by the
In step ST66, the tile area dimensions are determined by the above-described dimension changing method. Next, in step ST67, an entry of the pixel cache 11 to be saved in the
Next, in step ST68, the newly determined tile area is read from the
次に、メモリ制御装置12のアドレス変換方法について説明する。以下の説明では、バースト転送可能なメモリの代表であるSDRAMを用いて説明する。
図8はSDRAMの構成を示す図である。SDRAMはロウアドレスとカラムアドレスの2つによりアドレスを指定する。ロウアドレスが同一のメモリ領域はページと呼ばれる。連続するアクセスが同じページに対して行われていれば、高速ページモードを使用して、カラムアドレスを指定しながらRead/Writeを高速に実行することができる。ページが異なる場合は、アクセス間に遅延が生じる。
Next, an address conversion method of the
FIG. 8 shows the structure of the SDRAM. In the SDRAM, an address is specified by a row address and a column address. Memory areas with the same row address are called pages. If consecutive accesses are made to the same page, Read / Write can be executed at high speed while specifying a column address using the high-speed page mode. If the pages are different, there will be a delay between accesses.
図9は、SDRAMのページをフレームバッファ14に対応させた例を示す図である。図に示すように、スクリーン左上からタイル状にページ(ページタイル領域)を割り当てている。各タイル領域は、このページタイル領域に含まれる。ここで、ピクセルキャッシュ11のエントリに対応するタイル領域の寸法が変更されても、メモリ制御装置12がピクセルデータのフレームバッファ14上での物理アドレスを変換することにより、ページタイル領域内からはみ出さないようにする。なお、このためには、ピクセルキャッシュ11のエントリに対応するタイル領域が取り得る寸法の公倍数をページタイル領域の寸法に設定するとよい。例えば、図10に示すように、ピクセルキャッシュ11のエントリに対応するタイル領域の縦寸法が1,4,8,16のいずれかに変更可能な場合、ページタイル領域の縦寸法を16の倍数に設定すれば、タイル領域がページタイル領域をまたぐことは少なくなる。これにより、タイル領域の寸法が変化しても同一ページ内に収めることが可能となり、高速ページモードでアクセスすることができる。
FIG. 9 is a diagram showing an example in which SDRAM pages are associated with the
また、SDRAMは複数のバンクから構成され、各バンクは独立に制御することができる。これをマルチバンクオペレーションと呼ぶ。これを利用してピクセルキャッシュ11とフレームバッファ14の間のアクセスを高速化するようなアドレス変換を実現する方法について説明する。
図11は、図9に示すページタイル領域の1つを表した図である。図に示すように、ページタイル領域をさらにタイル状に分割し、その領域をブロックと呼ぶことにする。各ブロックを互い違いになるようSDRAMのバンクに対応させる。図中A,B,C,Dの各ブロックは、図8に示すSDRAMのバンクA,B,C,Dに対応している。
ブロックの寸法は、バースト転送X回でアクセスできる最大ピクセル数に基づいて決定する。1回のバースト転送で入出力するピクセル数をYとした場合、ブロック内のピクセル数は(X*Y)にする。ブロック寸法はブロックに含めることができるピクセル数から任意に決定する。なお、図11に示すブロック内の番号はカラムアドレスを(バーストレングス*X)で割った値である。
図に示すように、ピクセルキャッシュ11のエントリに対応するタイル領域は、複数のブロックで構成してもよいし、1ブロックのみで構成しても良い。そのため、タイル領域はブロックの寸法の倍数になる。例えば、図12に示すタイル領域120のように、横2ブロック、縦4ブロックで構成してもよいし、タイル領域121のように横4ブロック、縦4ブロックで構成してもよい。タイル領域がZ個のブロックで構成されている場合、Z回のバースト転送でピクセルデータの転送を行うことができる。
マルチバンクオペレーションでは、異なるバンクに対してはコマンドを独立して発行することができる。例えばバンクAに対してReadを行っている場合、Readデータ出力が完了する前にバンクBに対して他のコマンドを発行することができる。従って、ブロックを互い違いにバンクにマッピングすることで、マルチバンクオペレーションが利用できる機会を増やすことが可能になる。
The SDRAM is composed of a plurality of banks, and each bank can be controlled independently. This is called multi-bank operation. A method for realizing address translation that speeds up access between the pixel cache 11 and the
FIG. 11 shows one of the page tile areas shown in FIG. As shown in the figure, the page tile area is further divided into tiles, and the area is called a block. Each block is made to correspond to the bank of the SDRAM so as to alternate. In the figure, blocks A, B, C, and D correspond to SDRAM banks A, B, C, and D shown in FIG.
The block size is determined based on the maximum number of pixels that can be accessed in X burst transfers. When Y is the number of pixels input / output in one burst transfer, the number of pixels in the block is (X * Y). The block size is arbitrarily determined from the number of pixels that can be included in the block. The numbers in the block shown in FIG. 11 are values obtained by dividing the column address by (burst length * X).
As shown in the figure, the tile area corresponding to the entry in the pixel cache 11 may be composed of a plurality of blocks or only one block. Therefore, the tile area is a multiple of the block size. For example, a tile area 120 shown in FIG. 12 may be configured with two horizontal blocks and four vertical blocks, or a tile area 121 may be configured with four horizontal blocks and four vertical blocks. When the tile area is composed of Z blocks, pixel data can be transferred by Z burst transfer.
In multi-bank operation, commands can be issued independently to different banks. For example, when Read is performed on the bank A, another command can be issued to the bank B before the Read data output is completed. Therefore, by mapping the blocks to the banks alternately, it is possible to increase the opportunities for using multi-bank operations.
以上のように、実施の形態1によれば、ピクセルキャッシュ11によってフレームバッファ14のタイル領域の寸法が変更されても、メモリ制御装置12のアドレス変換機能により、メモリ13の同一ページ領域の範囲内に1つのタイル領域のピクセルデータが格納されるようにしたので、フレームバッファ14へのアクセスの遅延が避けられ、グラフィクスハードウェア100の描画処理を高速化することができる。
また、ピクセルキャッシュ11は、描画する図形により未使用部分が最小となるタイル領域を決定し、そのタイル領域の単位でフレームバッファ14とのデータ入出力を行うようにしたので、メモリ13へのアクセスが最適化され、高速動作可能なグラフィクスハードウエア100が実現できる。
また、メモリ制御装置12は、各タイル領域が、メモリ13の複数のバンクの領域から構成されるようにピクセルキャッシュ11から出力されたアドレスを変換するようにしたので、マルチバンクオペレーションが利用できる機会を増やし、フレームバッファ14へのアクセスを高速化することができる。
As described above, according to the first embodiment, even if the size of the tile area of the
In addition, the pixel cache 11 determines the tile area where the unused portion is the smallest depending on the figure to be drawn, and performs data input / output with the
In addition, since the
実施の形態2.
実施の形態2では、グラフィクスエンジン10からピクセルキャッシュ11へのアクセスを効率化する。
グラフィクスエンジン10がピクセルデータを取得する場合、1つのタイル領域へ連続アクセスする方が効率がよい。ここでのタイル領域とは、ピクセルキャッシュ11のエントリに対応するタイル領域もしくはメモリ13のページに対応したページタイル領域のいずれかである。タイル領域をまたぐ領域にアクセスすると、ピクセルキャッシュ11において、エントリ内のピクセルデータ24の書き換えが発生する可能性がある。書き換えが発生すると、フレームバッファ14へのアクセスが発生し、グラフィクスエンジン10の待ち時間が発生してしまう。特に、メモリ13のページに対応したページタイル領域をまたぐ場合は待ち時間が長くなる。
そこで、グラフィクスエンジン10が1つのタイル領域ごとにピクセルを順番に出力するように最適化する。例えば、図13に示すように、三角形を描画するため場合には、タイル領域ごとにピクセルデータを順番に生成する。
これにより、グラフィクスエンジン10からのタイル領域をまたぐアクセスが減少し、処理を高速化することができる。
In the second embodiment, access from the
When the
Therefore, the
As a result, access across the tile area from the
実施の形態3.
図14は、実施の形態3によるグラフィクスハードウェア200の構成を示すブロック図である。図に示すように、グラフィクスハードウェア200は、グラフィクスエンジン10とピクセルキャッシュ11の間に、一時的にピクセルデータを保持できるバッファメモリ17を備えている。
実施の形態3では、グラフィクスエンジン10から出力されたピクセルデータを、バッファメモリ17でタイル領域に合わせた順序に並び替えてからピクセルキャッシュ11に出力する。
例えば、図15に示すように、三角形を描画する場合には、グラフィクスエンジン10が水平方向の順番でピクセルデータを出力しても、バッファメモリ17を経由することによりタイル領域ごとの順番に並び替えられている。
このように、実施の形態3によれば、バッファメモリ17においてピクセルデータの順序を並べ替えることにより、タイル領域をまたぐアクセスが減少し、処理を高速化することができる。
FIG. 14 is a block diagram showing a configuration of
In the third embodiment, the pixel data output from the
For example, as shown in FIG. 15, when drawing a triangle, even if the
As described above, according to the third embodiment, by rearranging the order of the pixel data in the
10 グラフィクスエンジン、11 ピクセルキャッシュ、12 メモリ制御装置、13 メモリ(描画用メモリ)、14 フレームバッファ(描画用メモリ)、15 表示装置、16 CPU、17 バッファメモリ、21 制御フラグ、22 タイルサイズ、23 タグアドレス、24 ピクセルデータ、100,200 グラフィクスハードウェア。
10 graphics engine, 11 pixel cache, 12 memory controller, 13 memory (drawing memory), 14 frame buffer (drawing memory), 15 display device, 16 CPU, 17 buffer memory, 21 control flag, 22 tile size, 23 Tag address, 24 pixel data, 100,200 Graphics hardware.
Claims (12)
上記グラフィクスエンジンに供給するピクセルデータを格納し、それらのピクセルデータのバースト転送が可能な描画用メモリと、
上記描画用メモリとの間で、上記描画用メモリの記憶領域をタイル状に分割した寸法変更可能なタイル領域の単位でピクセルデータの入出力を行い、取得したピクセルデータを上記グラフィクスエンジンに供給するピクセルキャッシュと、
上記ピクセルキャッシュが上記描画用メモリにアクセスする際に出力するアドレスを上記描画用メモリの物理アドレスに変換して、アクセスを仲介するメモリ制御装置を備え、
上記メモリ制御装置は、上記タイル領域内のピクセルデータが上記描画用メモリの同一ページ領域の範囲内に収まるようにアドレス変換することを特徴とするグラフィクスハードウェア。 A graphics engine that performs rendering using pixel data;
A drawing memory for storing pixel data to be supplied to the graphics engine and capable of burst transfer of the pixel data;
Pixel data is input / output to / from the drawing memory in units of tile areas whose dimensions can be changed by dividing the storage area of the drawing memory into tiles, and the acquired pixel data is supplied to the graphics engine. Pixel cache,
A memory control device that converts an address output when the pixel cache accesses the drawing memory into a physical address of the drawing memory and mediates access;
The graphics hardware according to claim 1, wherein the memory control device performs address conversion so that pixel data in the tile area is within a range of the same page area of the drawing memory.
上記描画用メモリから新しいピクセルデータを取得した後に、上記描画用メモリへピクセルデータを退避することを特徴とする請求項1記載のグラフィクスハードウェア。 In the pixel cache, the pixel data to be accessed by the graphics engine is not held in the pixel cache, and when the pixel data is exchanged with the drawing memory,
2. The graphics hardware according to claim 1, wherein after obtaining new pixel data from the drawing memory, the pixel data is saved in the drawing memory.
2. The graphics hardware according to claim 1, wherein a buffer memory is provided between the graphics engine and the pixel cache, and pixel data output from the graphics engine is rearranged in the order of each tile area in the buffer memory. Wear.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005023745A JP4699036B2 (en) | 2005-01-31 | 2005-01-31 | Graphics hardware |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005023745A JP4699036B2 (en) | 2005-01-31 | 2005-01-31 | Graphics hardware |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2006209651A true JP2006209651A (en) | 2006-08-10 |
| JP4699036B2 JP4699036B2 (en) | 2011-06-08 |
Family
ID=36966409
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2005023745A Expired - Fee Related JP4699036B2 (en) | 2005-01-31 | 2005-01-31 | Graphics hardware |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4699036B2 (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009063699A (en) * | 2007-09-05 | 2009-03-26 | Japan Radio Co Ltd | Image display driving apparatus and image display system |
| JP2009134620A (en) * | 2007-11-30 | 2009-06-18 | Fujitsu Ltd | Drawing apparatus, drawing program, and drawing method |
| JP2011129109A (en) * | 2009-12-17 | 2011-06-30 | Arm Ltd | Forming windowing display in frame buffer |
| WO2011161723A1 (en) * | 2010-06-24 | 2011-12-29 | 富士通株式会社 | Drawing device and drawing method |
| JP2013083577A (en) * | 2011-10-11 | 2013-05-09 | Denso Corp | Position detection device |
| JP2013109356A (en) * | 2012-12-20 | 2013-06-06 | Japan Radio Co Ltd | Image display driving device and image display system |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0546141A (en) * | 1991-08-15 | 1993-02-26 | Oki Electric Ind Co Ltd | Character cache system |
| JPH06332664A (en) * | 1993-03-23 | 1994-12-02 | Toshiba Corp | Display control system |
| JPH07110787A (en) * | 1993-06-30 | 1995-04-25 | Samsung Electron Co Ltd | Raster graphics system |
| JPH0877367A (en) * | 1994-09-05 | 1996-03-22 | Hitachi Ltd | Image processor and image data processing device using the same |
| JPH08255262A (en) * | 1995-01-31 | 1996-10-01 | Videologic Ltd | Improvement about 3-d rendering system of computer |
| JP2000348168A (en) * | 1999-06-01 | 2000-12-15 | Sony Corp | Image processing apparatus and method, and medium |
| JP2001249843A (en) * | 1999-12-30 | 2001-09-14 | Stmicroelectronics Inc | Memory system for accelerating graphics processing in electronic devices |
| JP2003529859A (en) * | 2000-03-31 | 2003-10-07 | インテル・コーポレーション | Tile graphics architecture |
| JP2004133608A (en) * | 2002-10-09 | 2004-04-30 | Victor Co Of Japan Ltd | Image forming device |
-
2005
- 2005-01-31 JP JP2005023745A patent/JP4699036B2/en not_active Expired - Fee Related
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0546141A (en) * | 1991-08-15 | 1993-02-26 | Oki Electric Ind Co Ltd | Character cache system |
| JPH06332664A (en) * | 1993-03-23 | 1994-12-02 | Toshiba Corp | Display control system |
| JPH07110787A (en) * | 1993-06-30 | 1995-04-25 | Samsung Electron Co Ltd | Raster graphics system |
| JPH0877367A (en) * | 1994-09-05 | 1996-03-22 | Hitachi Ltd | Image processor and image data processing device using the same |
| JPH08255262A (en) * | 1995-01-31 | 1996-10-01 | Videologic Ltd | Improvement about 3-d rendering system of computer |
| JP2000348168A (en) * | 1999-06-01 | 2000-12-15 | Sony Corp | Image processing apparatus and method, and medium |
| JP2001249843A (en) * | 1999-12-30 | 2001-09-14 | Stmicroelectronics Inc | Memory system for accelerating graphics processing in electronic devices |
| JP2003529859A (en) * | 2000-03-31 | 2003-10-07 | インテル・コーポレーション | Tile graphics architecture |
| JP2004133608A (en) * | 2002-10-09 | 2004-04-30 | Victor Co Of Japan Ltd | Image forming device |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2009063699A (en) * | 2007-09-05 | 2009-03-26 | Japan Radio Co Ltd | Image display driving apparatus and image display system |
| JP2009134620A (en) * | 2007-11-30 | 2009-06-18 | Fujitsu Ltd | Drawing apparatus, drawing program, and drawing method |
| JP2011129109A (en) * | 2009-12-17 | 2011-06-30 | Arm Ltd | Forming windowing display in frame buffer |
| US8803898B2 (en) | 2009-12-17 | 2014-08-12 | Arm Limited | Forming a windowing display in a frame buffer |
| WO2011161723A1 (en) * | 2010-06-24 | 2011-12-29 | 富士通株式会社 | Drawing device and drawing method |
| US8605100B2 (en) | 2010-06-24 | 2013-12-10 | Fujitsu Limited | Drawing device and drawing method |
| JP5362915B2 (en) * | 2010-06-24 | 2013-12-11 | 富士通株式会社 | Drawing apparatus and drawing method |
| JP2013083577A (en) * | 2011-10-11 | 2013-05-09 | Denso Corp | Position detection device |
| JP2013109356A (en) * | 2012-12-20 | 2013-06-06 | Japan Radio Co Ltd | Image display driving device and image display system |
Also Published As
| Publication number | Publication date |
|---|---|
| JP4699036B2 (en) | 2011-06-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3732593B2 (en) | Image processing device | |
| US6856320B1 (en) | Demand-based memory system for graphics applications | |
| US7102646B1 (en) | Demand-based memory system for graphics applications | |
| US6674443B1 (en) | Memory system for accelerating graphics operations within an electronic device | |
| US10163180B2 (en) | Adaptive memory address scanning based on surface format for graphics processing | |
| US20090015591A1 (en) | Image generating apparatus, image generating method, and computer readable medium | |
| KR20150027873A (en) | System for image optimized rolling cache | |
| CN101201933A (en) | Graphics processing unit and method | |
| CN101257626A (en) | Method, apparatus for access DRAM and medium player | |
| JP4416694B2 (en) | Data transfer arbitration device and data transfer arbitration method | |
| JP3619565B2 (en) | Data processing apparatus and system using the same | |
| JP2010507868A (en) | System for interleaved storage of video data | |
| JP4699036B2 (en) | Graphics hardware | |
| JP5115548B2 (en) | Semiconductor integrated circuit device | |
| JP2003186740A (en) | Memory control device and memory control method | |
| US6008823A (en) | Method and apparatus for enhancing access to a shared memory | |
| US20040268072A1 (en) | Information processing device | |
| US8902240B2 (en) | Image processing device | |
| CN108629734B (en) | Image geometric transformation method, device and terminal | |
| JP3955862B2 (en) | Data processing apparatus and system using the same | |
| JP2019185447A (en) | Memory controller, image processing device, and data transfer method | |
| JP2000029782A (en) | Memory control method and device | |
| JP2007018222A (en) | Memory access control circuit | |
| JPH11232470A (en) | Cache memory using DRAM and logic embedded LSI and graphics system using the same | |
| JPH07220059A (en) | Image memory access method and image processing system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20071010 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20071128 |
|
| RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20080722 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100419 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100511 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100601 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100720 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100811 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20101019 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20101224 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110119 |
|
| A911 | Transfer of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20110131 |
|
| 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: 20110222 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20110302 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4699036 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| LAPS | Cancellation because of no payment of annual fees |