JP2014060579A - Image processing apparatus and image processing method - Google Patents
Image processing apparatus and image processing method Download PDFInfo
- Publication number
- JP2014060579A JP2014060579A JP2012204284A JP2012204284A JP2014060579A JP 2014060579 A JP2014060579 A JP 2014060579A JP 2012204284 A JP2012204284 A JP 2012204284A JP 2012204284 A JP2012204284 A JP 2012204284A JP 2014060579 A JP2014060579 A JP 2014060579A
- Authority
- JP
- Japan
- Prior art keywords
- logical operation
- read
- write
- memory
- address
- 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
- Record Information Processing For Printing (AREA)
- Image Input (AREA)
- Storing Facsimile Image Data (AREA)
Abstract
Description
本発明は、メモリアクセスをリードモディファイライトを用いて行う場合に用いて好適な画像処理装置および画像処理方法に関する。 The present invention relates to an image processing apparatus and an image processing method suitable for use when performing memory access using read-modify-write.
従来、ページプリンタなどにおいて、印刷解像度の高解像度化や、印刷速度の高速化が要求されている一方で、プリンタの動作を制御するCPU(Central Processing Unit)の処理能力のみでは、これらの要求を満たすことが困難となってきている。 Conventionally, in page printers and the like, there has been a demand for higher printing resolution and higher printing speed, but the CPU (Central Processing Unit) that controls the operation of the printer alone can meet these requirements. It has become difficult to meet.
ここで、従来技術によるプリンタにおける処理の流れについて、概略的に説明する。パーソナルコンピュータなどで作成された例えばPDL(Page Description Language)データが、ネットワークやケーブルなど所定のインターフェイスを介してプリンタに転送される。プリンタは、転送されたPDLデータを解析して、プリンタにおける描画部が実行可能な中間言語を作成する。描画部は、作成された中間言語を解析して画像データを生成し、生成した画像データに対して階調処理を施して2値化画像データを得る。この2値化画像データを、バンドメモリに対して描画し、バンドメモリに書き込む。画像の描画は、C、M、Y、Kの各色毎に行われる。 Here, the flow of processing in the printer according to the prior art will be schematically described. For example, PDL (Page Description Language) data created by a personal computer or the like is transferred to a printer via a predetermined interface such as a network or a cable. The printer analyzes the transferred PDL data and creates an intermediate language that can be executed by the drawing unit of the printer. The drawing unit analyzes the created intermediate language to generate image data, and performs gradation processing on the generated image data to obtain binary image data. The binarized image data is drawn on the band memory and written to the band memory. Image drawing is performed for each color of C, M, Y, and K.
プリンタは、バンドメモリに描画された各色の画像データを、JBIG(Joint Bi-level Image Coding Expert Group)などの2値画像の圧縮アルゴリズムにより符号化し、生成された符号をそれぞれメモリに書き込む。プリンタは、印字時に、C、M、Y、K各版毎に遅延させてメモリから符号を読み出してそれぞれ復号し、復号したデータをC、M、Y、K各版に対応するプリンタエンジンに転送して印字を行う。 The printer encodes the image data of each color drawn in the band memory by a binary image compression algorithm such as JBIG (Joint Bi-level Image Coding Expert Group), and writes the generated codes to the memory. When printing, the printer reads the code from the memory with a delay for each of the C, M, Y, and K plates, decodes the code, and transfers the decoded data to the printer engine corresponding to each of the C, M, Y, and K plates. To print.
このようなプリンタ装置におけるメモリアクセス制御に関して、特許文献1では、画像処理部がメモリアクセスの調停を行うメモリアービタを介してCPUとメモリを共有して描画処理(論理演算処理)を行う技術が開示されている。このメモリアービタを介したメモリのリード処理は、CPU(Central Processing Unit)などメモリアービタに接続される他の構成の処理とアクセスが競合するために、一般的には、リード要求が出されてから当該リード要求に応じて読み出されたデータが到着するまでに、比較的長い時間を要する場合がある。
With respect to memory access control in such a printer apparatus,
一方、近年では、内部にCPUおよびシステムバスを内蔵させたLSI(Large Scale Integration)が開発されている。また、近年では、SOC(System-on-a-chip)におけるバスの標準プロトコルとして、AXI(Advanced eXtensible Interface)バスが注目を集めている。 On the other hand, in recent years, LSI (Large Scale Integration) with a built-in CPU and system bus has been developed. In recent years, the AXI (Advanced eXtensible Interface) bus has attracted attention as a standard protocol for buses in SOC (System-on-a-chip).
SOCにおいてAXIバスを用いた構成では、CPUと、画像処理部と、バンドメモリとの間の調停を、メモリアービタを用いた場合に比べて効率良く行うことが可能である。そのため、データ読み出し側は、コマンドとして発行するリード要求を、リード要求に応じたリードデータの到着を待たずに次々と発行でき、バンドメモリに対するアクセスを効率良く処理することが可能となる。 In the configuration using the AXI bus in the SOC, arbitration among the CPU, the image processing unit, and the band memory can be performed more efficiently than in the case where the memory arbiter is used. Therefore, the data reading side can issue read requests issued as commands one after another without waiting for the arrival of read data according to the read request, and can efficiently process access to the band memory.
ところで、上述したAXIバスを用いた構成では、メモリアクセスを効率的に行うことができる一方で、バンドメモリ上の同一アドレスに対するリードモディファイライト(以下、RMWと略称する)において、正しくない描画/論理演算処理が行われる場合がある。 By the way, in the configuration using the AXI bus described above, memory access can be performed efficiently, but in the case of read-modify-write (hereinafter abbreviated as RMW) for the same address on the band memory, incorrect drawing / logic Arithmetic processing may be performed.
図20を用いて、RMWにおける正しくない論理演算処理について、概略的に説明する。図20(a)は、正しい、すなわち、本来意図したアクセスおよび論理演算処理の例を示す。この例では、図20(a)の左側の図に示される横長の四角形の画像200のRMWを行い、図20(a)の右側の図に示される、画像200に交差する縦長の画像201のRMWを行う。このとき、本来意図した論理演算処理では、画像200と画像201との交差部分において画像200と画像201との間で所定の演算がなされ、変更された画像が当該交差部分に描画される。
An incorrect logical operation process in the RMW will be schematically described with reference to FIG. FIG. 20A shows an example of correct access, that is, originally intended access and logical operation processing. In this example, RMW of the horizontally long
図20(b)は、正しくない、すなわち、本来意図しないアクセスおよび論理演算処理が行われた例を示す。この例では、上述と同様に、図20(b)の左側の図に示される横長の画像200のRMWを行い、画像200に交差する縦長の画像201のRMWを行っているが、画像200と画像201との交差部分が、画像201で上書きされてしまっている。これは、上述の図20(a)で説明した、本来意図する論理演算処理の結果とは異なっている。
FIG. 20B shows an example in which an incorrect access, that is, an unintended access and logical operation processing are performed. In this example, as described above, the RMW of the horizontally
このように、論理演算結果が本来意図したものと異なってしまう原因は、上述したように、データ読み出し側(描画処理部側)が、リード要求に応じたデータの到着を待たずに次々とリード要求を発行するために発生する。すなわち、画像200と画像201との交差部分の論理演算処理は、画像200において当該交差部分のRMWが完了した後に実行される必要がある。
As described above, the reason why the logical operation result is different from the originally intended one is that the data reading side (the drawing processing unit side) reads one after another without waiting for the arrival of data corresponding to the read request. Occurs to issue a request. That is, the logical operation processing of the intersection between the
しかしながら、メモリのアクセスを制御するメモリコントローラは、RMWをリード情報とライト情報とに分解されたアクセス情報として扱うため、RMWにおけるリードおよびライトのデータの保証が困難である。そのため、リードデータの到着を待たずに次々とリード要求を発行した場合、RMWによるライトが終了していないアドレスに対してリードを行い、当該ライトが終了した当該アドレスに対して当該リードしてモディファイしたデータをライトしてしまう事態が発生する可能性がある。図20(b)で説明した現象は、このような理由により発生している。 However, since a memory controller that controls memory access handles RMW as access information that is divided into read information and write information, it is difficult to guarantee read and write data in the RMW. Therefore, when the read request is issued one after another without waiting for the arrival of the read data, the read is performed on the address where the write by RMW has not been completed, and the read is performed on the address where the write has been completed and the modification is performed. There is a possibility that the written data will be written. The phenomenon described with reference to FIG. 20B occurs for this reason.
本発明は、上記に鑑みてなされたものであって、RMWを行う場合において、高速処理を可能とすると共に、本来の意図とは異なる論理演算が行われることを防ぐことを可能とすることを目的とする。 The present invention has been made in view of the above, and in performing RMW, it is possible to perform high-speed processing and to prevent a logical operation different from the original intention from being performed. Objective.
上述した課題を解決し、目的を達成するために、本発明は、少なくとも描画パターンと、描画パターンのメモリ上のアドレスを示す描画アドレスと、描画パターンに施す論理演算を示す情報とを含む描画情報を生成する生成部と、描画情報を保持する複数の保持部と、生成部で生成された描画情報に含まれる論理演算を示す情報がメモリ上でのリードモディファイライトを用いる論理演算を示している場合に、描画情報に含まれる描画アドレスと、複数の保持部のうち少なくとも1に保持される描画情報に含まれる描画アドレスとが一致するか否かを判定する判定部と、判定部により一致していると判定された場合に、生成部で生成された描画情報に基づくメモリに対するリードモディファイライトによるリード処理を一時的に停止する制御部とを有することを特徴とする。 In order to solve the above-described problems and achieve the object, the present invention provides drawing information including at least a drawing pattern, a drawing address indicating an address of the drawing pattern in a memory, and information indicating a logical operation performed on the drawing pattern. A generation unit that generates the drawing information, a plurality of holding units that hold the drawing information, and information indicating the logical operation included in the drawing information generated by the generation unit indicates a logical operation using the read-modify-write on the memory. In this case, the determination unit that determines whether or not the drawing address included in the drawing information matches the drawing address included in the drawing information held in at least one of the plurality of holding units is matched by the determination unit. Control to temporarily stop the read processing by read-modify-write to the memory based on the drawing information generated by the generation unit when it is determined that Characterized in that it has and.
本発明によれば、RMWを行う場合において、高速処理が可能となると共に、本来の意図とは異なる論理演算が行われることを防ぐことが可能となるという効果を奏する。 According to the present invention, when RMW is performed, it is possible to perform high-speed processing, and it is possible to prevent a logical operation different from the original intention from being performed.
以下に添付図面を参照して、画像処理装置および画像処理方法の実施の形態を詳細に説明する。図1は、実施形態に係る画像形成装置1の一例の構成を示すブロック図である。画像形成装置1において、AXI(Advanced eXtensible Interface)バスに従ったバス13(以下、AXIバス13と呼ぶ)に対してCPU I/F11を介してCPU(Central Processing Unit)10が接続されると共に、ローカルI/F21を介してROM(Read Only Memory)22およびパネルコントローラ23が接続される。
Embodiments of an image processing apparatus and an image processing method will be described below in detail with reference to the accompanying drawings. FIG. 1 is a block diagram illustrating an exemplary configuration of an
AXIバス13は、メモリコントローラ25を介してメインメモリ14が接続される。それと共に、AXIバス13に対して、描画部15、符号化部16、復号部17および通信コントローラ20が接続される。復号部17の出力は、プリンタエンジン19を制御するエンジンコントローラ18に接続される。
The
AXIバス13は、接続された各部間におけるデータ転送を制御する。CPU I/F11は、CPU10とAXIバス13との間のインターフェイスであって、CPU10は、CPU I/F11およびAXIバス13を介して、画像形成装置1の各部に接続される。パネルコントローラ23は、ユーザ操作を行うために操作子や表示部が設けられたパネル24が接続される。
The
ROM22は、各種プログラムや文字などのフォント情報が予め記憶されている。CPU10は、ROM22に予め記憶されたプログラムに従い、図示されないRAM(Random Access Memory)をワークメモリとして用いて、この画像形成装置1の動作を制御する。CPU10は、ワークメモリとしてメインメモリ14を利用することも可能である。また、CPU10は、エンジンコントローラ18に対して、プリンタエンジン19を制御するための命令を出す。通信コントローラ20は、ネットワークを介して接続される、パーソナルコンピュータ(PC)といった外部機器との間の通信を制御する。
The
AXIバス13を介してなされるメインメモリ14に対するアクセスの制御は、メモリコントローラ25により行われる。メインメモリ14は、例えばプログラム領域、PDLデータ領域、CMYKバンド画像データ領域、CMYKページ符号データ領域およびその他領域を含む。
Control of access to the
プログラム領域は、CPU10が動作するためのプログラムなどが格納される。PDLデータ領域は、例えば通信コントローラ20を介してパーソナルコンピュータから転送されたPDL(Page Description Language)データが格納される。CPU10がPDLデータに基づき生成した中間言語をこのPDLデータ領域に格納してもよい。CMYKバンド画像データ領域は、PDLデータに基づき生成されたC、M、Y、K各色の版によるバンド画像データがそれぞれ格納される。CMYKバンド符号データ領域は、CMYK各版の、符号化されたバンド画像データ(バンド符号データと呼ぶ)が格納される。また、その他領域は、上述以外のデータが格納される領域であって、例えばCPU10がプログラムを実行する際のワークメモリとして用いることができる。
The program area stores a program for the
描画部15は、CPU10によりPDLデータに基づき生成された中間言語を読み込んで解析し、解析結果に従い、メインメモリ14のバンド記憶領域に対してバンド画像を書き込む描画処理を行う。また、描画部15は、論理演算処理部30を有し、中間言語の解析結果に論理演算命令が含まれる場合、当該論理演算命令に従いバンド画像に対して論理演算を施す。
The
メインメモリ14から、描画部15により描画されたバンド画像が読み出されて、AXIバス13を介して符号化部16および復号部17で符号化および復号処理などを施されて、エンジンコントローラ18に供給される。エンジンコントローラ18が、供給されたバンド画像に従いプリンタエンジン19を制御することで、印刷媒体に対して画像が形成され、印刷がなされる。
The band image drawn by the
このような構成において、例えばパーソナルコンピュータで生成されたPDLデータがネットワークを介して通信コントローラ20に受信され、メインメモリ14のPDLデータ領域に記憶される。CPU10は、メインメモリ14のPDLデータ領域からPDLデータを読み出して解析し、解析結果に基づき中間言語を生成し、メインメモリ14に記憶する。描画部15は、メインメモリ14から読み出した中間言語に従い描画処理を行い、CMYK各版の画像データを生成する。生成されたCMYK各版の画像データは、メインメモリ14のCMYKバンド画像データ領域に書き込まれる。
In such a configuration, for example, PDL data generated by a personal computer is received by the
符号化部16は、メインメモリ14のCMYKバンド画像データ領域から読み出されたCMYK各版のバンド画像データに対して、MTF(Move To Front)制御およびハフマン符号化などを利用した圧縮符号化方式により圧縮符号化処理を施す。バンド画像データが圧縮符号化された符号データは、メインメモリ14のCMYKページ符号データ領域に格納される。復号部17は、メインメモリ14のCMYKページ符号データ領域から読み出されたCMYK各版の符号データを復号して、CMYK各版の画像データを出力し、エンジンコントローラ18に送る。エンジンコントローラ18は、復号部17から受け取ったCMYK各版の画像データに従い基づきプリンタエンジン19を制御してプリントアウトを行う。
The
図2は、メインメモリ14におけるバンド記憶領域の一例のフォーマットを示す。図2の例では、バンド幅は、例えば1ページの幅すなわち水平走査(主走査)により描画される1水平ラインの長さであり、バンド高さは、1ページを垂直走査方向に所定に分割した1の領域の高さとしている。また、描画ワード幅は、描画部15においてバンド記憶領域をアクセスする単位を示す。
FIG. 2 shows an exemplary format of a band storage area in the
図2には、バンド記憶領域に対する画像データの書き込みの例として、水平ラインYに対して、水平ラインX始点から水平ラインX終点までの水平ラインを描画(書き込み)した例が示されている。このように、描画部15では、画像処理を施した画像データを、水平ラインの1ライン毎にバンド記憶領域に書き込むことで、描画を行っている。なお、水平ラインに沿った方向をX方向、水平ラインに垂直な方向、すなわち副走査方向をY方向とし、例えば1ページにおける印刷領域をX,Y座標で表すものとする。
FIG. 2 shows an example of writing (writing) a horizontal line from the start point of the horizontal line X to the end point of the horizontal line X with respect to the horizontal line Y as an example of writing image data to the band storage area. As described above, the
図3は、描画部15が処理する中間言語の例を概略的に示す。図3の例では、中間言語は、バンド初期化コマンド、論理演算タイプ設定コマンド、四角形描画コマンド、3角形描画コマンド、論理演算タイプ設定コマンド、四角形描画コマンド、四角形描画コマンド、バンド終了コマンドが順次記述されている。なお、実際には、C、M、Y、K各色について、中間言語が存在する。
FIG. 3 schematically shows an example of an intermediate language processed by the
図4は、上述の中間言語によるコマンドの一例を示す。図4の例では、各コマンドは、32ビットのデータ幅を持つ。先頭の32ビットがコマンドヘッダとされ、その後ろに、当該コマンドの各パラメータが付加される構造となっている。各コマンドは、C、M、Y、K各色について指定することができる。なお、コマンドヘッダの直後のNOPは、コマンドヘッダのデータ幅を32ビット幅に合わせるためのもので、以下、このNOPを含んでコマンドヘッダと呼ぶ。 FIG. 4 shows an example of the command in the above intermediate language. In the example of FIG. 4, each command has a data width of 32 bits. The first 32 bits are used as a command header, followed by each parameter of the command. Each command can be specified for each color of C, M, Y, and K. The NOP immediately after the command header is for adjusting the data width of the command header to the 32-bit width, and hereinafter, this NOP is included and referred to as a command header.
図4(a)は、バンド初期化コマンドの例を示す。バンド初期化コマンドは、コマンドヘッダに続き、バンドの先頭アドレス、バンド高さおよびバンド幅の各設定パラメータが指定される。図7を用いて後述する描画コマンド解析部41は、このコマンドを受け取ると、バンドの先頭アドレスとバンドの高さと幅とを、図7のパラメータ記憶部40に記憶する。
FIG. 4A shows an example of a band initialization command. In the band initialization command, following the command header, setting parameters for the head address of the band, the band height, and the bandwidth are designated. When receiving the command, the drawing
図4(b)は、四角形の描画を命令する四角形描画コマンドの例を示す。コマンドヘッダに続き、四角形の左上隅のXおよびY座標、右下隅のXおよびY座標の各描画パラメータがそれぞれ指定される。図7で後述する描画コマンド解析部41は、このコマンドを受け取ると四角形の左上隅のX,Y座標、右下隅のX,Yの座標と四角形コマンド名を図7で後述する水平ライン変換部42へ転送し、描画処理を行う。
FIG. 4B shows an example of a rectangle drawing command for instructing drawing of a rectangle. Following the command header, the drawing parameters of the X and Y coordinates of the upper left corner and the X and Y coordinates of the lower right corner of the rectangle are designated, respectively. Upon receiving this command, the drawing
図4(c)は、三角形の描画を命令する三角形描画コマンドの例を示す。三角形の3の端点#0、#1および#2それぞれのXおよびY座標の各描画パラメータが指定される。図7で後述する描画コマンド解析部41は、このコマンドを受け取ると、3角形の各端点の座標と3角形コマンド名を図7で後述する水平ライン変換部42へ転送し、描画処理を行う。
FIG. 4C shows an example of a triangle drawing command for instructing triangle drawing. Each drawing parameter of the X and Y coordinates of the three
図4(d)は、論理演算タイプを定義する論理演算タイプ設定コマンドの例を示す。コマンドヘッドに続き、論理演算タイプが指定される。図5は、論理演算タイプの例を示す。図5の例では、論理演算タイプ「ROP_00」〜「ROP_FF」でそれぞれ示される16種類の論理演算が定義される。論理演算において、「0x0000_0000」は黒塗りつぶし、「0xFFFF_FFFF」は白塗りつぶしを示す。また、記号「S」および「D」は、それぞれ演算対象の画像(描画パターン)を示し、1または2の画像に対して論理演算が定義される。 FIG. 4D shows an example of a logical operation type setting command that defines a logical operation type. Following the command head, the logical operation type is specified. FIG. 5 shows examples of logical operation types. In the example of FIG. 5, 16 types of logical operations respectively defined by logical operation types “ROP_00” to “ROP_FF” are defined. In the logical operation, “0x0000 — 0000” indicates black painting, and “0xFFFF_FFFF” indicates white painting. Symbols “S” and “D” indicate images (drawing patterns) to be calculated, and a logical operation is defined for one or two images.
図5において、各論理演算タイプに対して、各論理演算で用いるメモリアクセス種類が対応付けられている。メモリアクセス「WRITE」は、書き込み(ライト)のみを用いる論理演算を示す。また、メモリアクセス「RMW」は、リードモディファイライトを用いる論理演算を示す。リードモディファイライトは、メモリ上のある領域からデータを読み出し(リード)て変更(モディファイ)し、変更されたデータを元の領域に書き込む(ライト)処理である。 In FIG. 5, a memory access type used in each logical operation is associated with each logical operation type. Memory access “WRITE” indicates a logical operation using only writing. Memory access “RMW” indicates a logical operation using read-modify-write. The read modify write is a process of reading (reading) data from a certain area on the memory, changing (modifying) the data, and writing (writing) the changed data in the original area.
以降、リードモディファイライトをRMWと略称する。また、以降において、論理演算は、適宜「ROP」と記述する。 Hereinafter, the read modify write is abbreviated as RMW. Further, hereinafter, the logical operation is described as “ROP” as appropriate.
図4(e)は、定義したバンドの描画の終了を指示するバンド終了コマンドの例を示す。このバンド終了コマンドは、コマンドヘッダのみを有する。図7を用いて後述する描画コマンド解析部41は、このコマンドを受け取るとそのバンドの処理を終了する。
FIG. 4E shows an example of a band end command for instructing the end of drawing of the defined band. This band end command has only a command header. When receiving the command, the drawing
図6は、描画部15の一例の構成を示す。描画部15は、論理演算処理部30と、描画パターン生成部31と、AXIバス入力部32と、AXIバス出力部33とを有する。AXIバス入力部32およびAXIバス出力部33は、それぞれ、図1で示したAXIバス13との入力インタフェースおよび出力インタフェースである。
FIG. 6 shows an exemplary configuration of the
描画パターン生成部31は、図4を用いて説明した描画コマンドをメインメモリ14の中間言語格納メモリ領域から読み込み、描画コマンドを解析し、メインメモリ14のバンドメモリ領域へ描画するための描画パターンを生成し、論理演算処理部30に対して、描画パターンと、描画するワード単位の描画パターン、マスクパターンおよびアドレスとを含む描画情報を転送する。
The drawing
論理演算処理部30は、実施形態の特徴をなす部分であって、描画パターン生成部31からの描画パターン、マスクパターン、アドレスおよび論理演算タイプなどを含む描画情報を受け取る。論理演算処理部30は、描画パターン生成部31から受け取った描画情報に従い論理演算などを行い、AXIバス入力部32およびAXIバス出力部33を介してメモリコントローラ25と通信を行い、演算結果をメインメモリ14のバンドメモリ領域へ描画する。
The logical
図7は、描画パターン生成部31の一例の構成を示す。描画パターン生成部31は、描画コマンド解析部41と、水平ライン変換部42と、水平ライン描画部43とを有する。描画コマンド解析部41は、AXIバス入力部32からの描画コマンドを読み込み、描画コマンドを解析し、パラメータの設定コマンドであれば、パラメータ記憶部40にパラメータ値を転送し、描画コマンドであれば、水平ライン変換部42に描画コマンドを転送する。
FIG. 7 shows an exemplary configuration of the drawing
水平ライン変換部42は、描画コマンド解析部41から描画コマンドを受け取り、水平ラインへ変換し、水平ライン描画部43に転送する。水平ライン描画部43は、水平ライン変換部42からの水平ラインデータに基づき、水平ラインを描画するワード単位の描画パターンとマスクパターンとアドレスなどを生成し、論理演算処理部30に転送する。
The horizontal
図8は、論理演算処理部30の一例の構成を示す。描画パターン生成部I/F50は、図6の描画パターン生成部31とのインタフェースであり、描画するワード単位の描画パターン、論理演算タイプ、マスクパターンおよびアドレスなどを受け取る。RMW判断部51は、例えば図5の論理演算タイプの情報をテーブルとして持ち、受け取った論理演算タイプがRMWを用いた論理演算を行うか、ライト(W)のみを用いて論理演算を行うかを判断する。
FIG. 8 shows an exemplary configuration of the logical
RMW描画アドレスレジスタ52Aおよび52Bは、それぞれRMW時の描画アドレスを格納するレジスタである。この例では2つのリードを先投げするために、RMW描画アドレスレジスタ52Aおよび52Bの2のレジスタを持ち、これらRMW描画アドレスレジスタ52Aおよび52BをMUX(マルチプレクサ)60で切り替えてリード制御部67およびライト制御部68に転送している。
The RMW drawing address registers 52A and 52B each store a drawing address at the time of RMW. In this example, the RMW drawing address registers 52A and 52B have two registers in order to throw off two leads first, and these RMW drawing address registers 52A and 52B are switched by the MUX (multiplexer) 60, and the
RMW描画レングス格納レジスタ53Aおよび53Bは、それぞれRMW時の描画レングスを格納するレジスタである。この例では2つのリードを先投げするために、RMW描画レングスレジスタ53Aおよび53Bの2のレジスタを持ち、これらRMW描画レングスレジスタ53Aおよび53BをMUX61で切り替えてリード制御部67およびライト制御部68に転送している。
The RMW drawing
RMW_ROPTYPEレジスタ54Aおよび54Bは、それぞれRMW時の論理演算タイプを格納するレジスタである。この例では2つのリードを先投げするためにRMW_ROPTYPEレジスタ54Aおよび54Bの2のレジスタを持ち、MUX62で切り替えてRMW用の論理演算を行うRMW_ROPT処理部64に転送している。
The RMW_ROPTYPE registers 54A and 54B are registers for storing logical operation types during RMW. In this example, two registers, RMW_ROPTYPE registers 54A and 54B, are provided in order to presend two leads, and are transferred to the
RMWライト描画パターンバッファ55Aおよび55Bは、それぞれRMW時の描画パターン(ライト描画パターン)を格納するバッファである。この例では2つのリードを先投げするためにRMWライト描画パターンバッファ55Aおよび55Bの2のバッファを持ち、MUX63で切り替えてRMW用の論理演算を行うRMW_ROPT処理部64に転送している。
The RMW light drawing pattern buffers 55A and 55B each store a drawing pattern (light drawing pattern) at the time of RMW. In this example, two RMW write drawing pattern buffers 55A and 55B are provided in order to throw two leads ahead, and the data is transferred to the
このように、実施形態によるRMW処理では、リード時に先投げ処理を必要とするために、それぞれ2の描画情報(描画アドレス、描画レングス、論理演算タイプおよび描画パターン)を有する。以降、適宜、これら2の描画情報のうち一方をリードA、他方をリードBと呼ぶ。リードAおよびBの2つ(複数)の値を有するのは、RMWの処理のリード処理とライト処理との異なるタイミングで必要とするためであり、リードAおよびBを先投げし、リードAおよびBに応じてリードデータが帰ってくると、リードA、リードBの順序にライト処理を順次行うためである。 As described above, the RMW process according to the embodiment has two pieces of drawing information (drawing address, drawing length, logical operation type, and drawing pattern), because the first throw process is required at the time of reading. Hereinafter, one of these two pieces of drawing information will be referred to as a lead A and the other as a lead B as appropriate. The reason for having two (a plurality of) values of the leads A and B is that they are required at different timings of the read processing and the write processing of the RMW processing. This is because when the read data returns according to B, the write processing is sequentially performed in the order of read A and read B.
RMW_ROPT処理部64は、RMW用の論理演算を行う。RMW_ROPT処理部64は、リード描画パターンバッファ65からリード描画パターンを読み込むと共に、MUX62および63から論理演算タイプとライト描画パターンを読み込む。そして、RMW_ROPT処理部64は、読み込んだリード描画パターンとライト描画パターンに対して、論理演算タイプに示される論理演算を行い、演算結果の描画パターンをRMW用ライトバッファ66に書き込む。
The
リード描画パターンバッファ65は、リード制御部67から読み込まれたバンドメモリのデータをリード描画パターンとして格納する。RMWライトバッファ66は、RMW_ROPT処理部64により論理演算処理された描画パターンを格納する。
The lead
リード制御部67は、AXIバス入力部32からリードデータを読み込む。ライト制御68は、のAXIバス出力部33に対してライトデータを書き込む。
The
ライト描画アドレスレジスタ56は、ライト時の描画アドレスを格納するレジスタであり、格納されたライト時の描画アドレスをライトアドレスチェック部69に転送している。ライトレングスレジスタ57は、ライト時の描画レングスを格納するレジスタであり、格納されたライト時の描画レングスをライトアドレスチェック部69に転送している。ライトROPTYPEレジスタ58は、ライト時の論理演算タイプを格納するレジスタであり、格納されたライト時の論理演算タイプをライト用ROPT処理部70に転送している。ライト描画パターンバッファ59は、ライト時の描画パターンを格納するレジスタであり、格納されたライト時の描画パターンをライト用ROPT処理部70に転送している。
The write drawing address register 56 stores a drawing address at the time of writing, and transfers the stored drawing address at the time of writing to the write
このように、実施形態によれば、ライト処理は先投げ処理を行わないため、複数の描画情報を有しない。 As described above, according to the embodiment, the write process does not perform the first throw process, and thus does not have a plurality of drawing information.
ライト用ROPT処理部70は、論理演算タイプに示されるライト用の論理演算を行う。論理演算の結果の描画パターンは、ライト用ライトバッファ71に書き込まれる。
The write
ライトアドレスチェック部69は、RMWのアドレスおよびレングスと、ライトのアドレスとレングスとから、リードとライトのアドレスの衝突の有無をチェックし、衝突していない場合は、ライト制御部68にライトを要求し、衝突している場合は、コントローラ73にその旨通知する。リードアドレスチェック部72は、リードAおよびリードBによるアドレスおよびレングスに基づき、アドレスの衝突の有無をチェックし、衝突している場合、コントローラ73にその旨通知する。コントローラ73は、ライトアドレスチェック部69およびリードアドレスチェック部72のチェック結果に基づき、後述する論理演算処理を制御する。
The write
図9は、コントローラ73の一例の処理を示すフローチャートである。ステップS100で、コントローラ73は、描画パターン生成部31からのデータイネーブルがアクティブであるか否かを判定する。若し、非アクティブであると判定した場合、再びステップS100の処理を行う。アクティブであると判定された場合、処理をステップS101に移行させ、コントローラ73は、論理演算タイプが示す論理演算が書き込み(ライト)のみを用いる論理演算であるか否かを判定する。
FIG. 9 is a flowchart illustrating an example of processing of the
ステップS101で、論理演算がライトのみを用いると判定した場合、処理がステップS102に移行され、ライトアドレスチェック部69に対してライトアドレスチェックを行うように指示する。ライトアドレスチェック処理の詳細については後述する。次のステップS103で、コントローラ73は、ライトアドレスチェックの結果に基づき、ライトアドレスがリードアドレスと一致しているか否かを判定する。若し、一致していると判定した場合、処理をステップS102に戻し、ライトアドレスチェック部69に対して再びライトアドレスチェックを行うように指示する。これにより、ライト処理が一時的に停止される。
If it is determined in step S101 that the logical operation uses only a write, the process proceeds to step S102 and instructs the write
一方、ステップS103で、ライトアドレスがリードアドレスと一致していないと判定した場合、コントローラ73は、処理をステップS104に移行させ、描画パターン生成部31から受け取った描画アドレス、描画レングス、描画パターンをライト用ROPT処理部70に転送する。ライト用ROPT処理部70は、転送された描画アドレス、描画レングス、描画パターンに基づき、論理演算タイプに従い論理演算を行う。論理演算結果は、ライト用ライトバッファ71を介してライト制御部68に転送される。コントローラ73は、ライト制御部68に対して、ライト処理を要求する。その後、処理がステップS100に戻される。
On the other hand, if it is determined in step S103 that the write address does not match the read address, the
上述のステップS101で、論理演算がRMWを用いると判定した場合、処理がステップS105に移行され、リードAが空いているか否かが判定される。具体的には、RMW描画アドレスレジスタ52A、RMWレングスレジスタ53A、RMW_ROPTYPEレジスタ54AおよびRMWライト描画パターンバッファ55Aが空か否かが判定される。
When it is determined in step S101 described above that the logical operation uses RMW, the process proceeds to step S105, and it is determined whether or not the lead A is free. Specifically, it is determined whether or not the RMW drawing address register 52A, the RMW length register 53A, the
若し、空いていると判定した場合、処理がステップS106に移行され、描画パターン生成部31から受け取った描画アドレス、描画レングス、描画パターンをリードA側(RMW描画アドレスレジスタ52A、RMWレングスレジスタ53AおよびRMWライト描画パターンバッファ55A)に転送し、リード制御部67に対してリード処理を要求する。その後、処理がステップS100に戻される。
If it is determined that it is free, the process proceeds to step S106, and the drawing address, drawing length, and drawing pattern received from the drawing
ステップS105で空いていないと判定された場合、処理がステップS107に移行され、リードBが空いているか否かが判定される。具体的には、RMW描画アドレスレジスタ52B、RMWレングスレジスタ53B、RMW_ROPTYPEレジスタ54BおよびRMWライト描画パターンバッファ55Bが空か否かが判定される。空いていないと判定された場合、処理がステップS105に戻される。
If it is determined in step S105 that the lead B is not available, the process proceeds to step S107, and it is determined whether the lead B is available. Specifically, it is determined whether the RMW drawing address register 52B, the
若し、空いていると判定した場合、処理がステップS108に移行され、リードアドレスチェック部72に対してリードアドレスチェックを行うように指示する。リードアドレスチェック処理の詳細については後述する。次のステップS109で、コントローラ73は、リードアドレスチェックの結果に基づき、リードアドレスがリードAのリードアドレスと一致しているか否かを判定する。若し、一致していると判定した場合、処理をステップS108に戻し、リードアドレスチェック部72に対して再びリードアドレスチェックを行うように指示する。これにより、RMWによるリード処理が一時的に停止される。
If it is determined that it is free, the process proceeds to step S108 to instruct the read
ステップS109でリードアドレスが一致していないと判定した場合、処理がステップS110に移行され、描画パターン生成部31から受け取った描画アドレス、描画レングス、描画パターンをリードB側(RMW描画アドレスレジスタ52B、RMWレングスレジスタ53BおよびRMWライト描画パターンバッファ55B)に転送し、リード制御部67に対してリード処理を要求する。その後、処理がステップS100に戻される。
If it is determined in step S109 that the read addresses do not match, the process proceeds to step S110, and the drawing address, drawing length, and drawing pattern received from the drawing
図10は、リード制御部67のRMWにおける一例の処理を示すフローチャートである。ステップS120で、リード制御部67は、リードイネーブルがアクティブであるか否かを判定する。若し、非アクティブであると判定した場合、再びステップS120の処理を行う。若し、アクティブであると判定した場合、処理をステップS121に移行させ、リードフラグ(リードFLAG)が0であるか否かを判定する。
FIG. 10 is a flowchart showing an example of processing in the RMW of the read
若し、リードFLAG=0であると判定した場合、処理がステップS122に移行され、リード制御部67は、ライト処理中であるか否かを判定する。若し、ライト処理中であると判定した場合、再びステップS122の処理を行う。
If it is determined that the read FLAG = 0, the process proceeds to step S122, and the
ステップS122でライト処理中ではないと判定した場合、リード制御部67は、次のステップS123でリードFLAGの値を1として、処理をステップS124に移行させる。ステップS124で、RMW_ROPT処理部64は、リード描画パターンバッファ65から受け取ったリードパターンと、ライト描画パターンバッファ55Aから受け取った描画パターンとで、RMW_ROPTYPEレジスタ54Aから受け取った論理演算タイプに従って論理演算を行い、論理演算の結果の描画パターンの、RMW描画アドレスレジスタ52Aに格納される描画アドレスに対する、RMWレングスレジスタ53Aに格納される描画レングス分のライト要求を、ライト制御部68に対して行う。
If it is determined in step S122 that the write process is not in progress, the
ステップS121で、若し、リードFLAG=1である(リードFLAG=0でない)と判定した場合、処理がステップS125に移行され、リード制御部67は、ライト処理中であるか否かを判定する。若し、ライト処理中であると判定した場合、再びステップS125の処理を行う。
If it is determined in step S121 that read FLAG = 1 (not read FLAG = 0), the process proceeds to step S125, and the
ステップS125でライト処理中ではないと判定した場合、リード制御部67は、次のステップS126でリードFLAGの値を0として、処理をステップS127に移行させる。ステップS127で、RMW_ROPT処理部64は、リード描画パターンバッファ65から受け取ったリードパターンと、ライト描画パターンバッファ55Bから受け取った描画パターンとで、RMW_ROPTYPEレジスタ54Bから受け取った論理演算タイプに従って論理演算を行い、論理演算の結果の描画パターンの、RMW描画アドレスレジスタ52Bに格納される描画アドレスに対する、RMWレングスレジスタ53Bに格納される描画レングス分のライト要求を、ライト制御部68に対して行う。
If it is determined in step S125 that the write process is not in progress, the
図11は、図9のステップS102で説明した、ライトアドレスチェックの一例の処理を示すフローチャートである。ライトアドレスチェック部64は、ステップS130で、RMW描画アドレスレジスタ52AおよびRMWレングスレジスタ53Aに格納されるリードAの描画アドレスと描画レングスとから、リードAの終端アドレスを求める。同様に、ライトアドレスチェック部64は、ステップS131で、RMW描画アドレスレジスタ52BおよびRMWレングスレジスタ53Bに格納されるリードBの描画アドレスと描画レングスとから、リードBの終端アドレスを求める。さらに、ライトアドレスチェック部64は、ステップS132で、ライト描画アドレスレジスタ56に格納されるライト描画アドレスと、ライトレングスレジスタ57に格納されるライト描画レングスとに基づき、ライトの終端アドレスを求める。
FIG. 11 is a flowchart showing an example of the write address check process described in step S102 of FIG. In step S130, the write
ライトアドレスチェック部64は、ステップS133およびステップS134で、ライトの始点アドレスから終端アドレスの間でリードAの始点または終端アドレスの有無をチェックする。次に、ライトアドレスチェック部64は、ステップS135およびステップS136で、リードAの始点アドレスから終端アドレスの間でライトの始点または終端アドレスの有無をチェックする。これにより、リードAとライトとによるアドレス衝突の有無をチェックしている。
In step S133 and step S134, the write
次のステップS137およびステップS138で、ライトの始点アドレスから終端アドレスの間でリードBの始点または終端アドレスの有無をチェックする。次に、ライトアドレスチェック部64は、ステップS139およびステップS140で、リードBの始点アドレスから終端アドレスの間でライトの始点または終端アドレスの有無をチェックする。これにより、リードBとライトとによるアドレス衝突の有無をチェックしている。
In the next step S137 and step S138, it is checked whether or not there is a read B start point or end address between the write start point address and the end address. Next, in step S139 and step S140, the write
以上の判定の結果、ライトアドレスとリードアドレスとが衝突していないと判定された場合(ステップS133〜ステップS140の判定による判定結果が全て「No」の場合)、処理がステップS141に移行され、ライトアドレスとリードアドレスとが不一致であるとされる。一方、ライトアドレスとリードアドレスとが衝突していると判定された場合(ステップS133〜ステップS140の判定による判定結果のうち少なくとも1が「Yes」の場合)、処理がステップS142に移行され、ライトアドレスとリードアドレスとが一致しているとされる。 As a result of the above determination, when it is determined that the write address does not collide with the read address (when all the determination results in the determinations in steps S133 to S140 are “No”), the process proceeds to step S141. It is assumed that the write address and the read address do not match. On the other hand, when it is determined that the write address and the read address collide (when at least one of the determination results obtained in the determinations in steps S133 to S140 is “Yes”), the process proceeds to step S142 and the write is performed. It is assumed that the address matches the read address.
図12は、図9のステップS108で説明した、リードアドレスチェックの一例の処理を示すフローチャートである。リードアドレスチェック部72は、ステップS150で、RMW描画アドレスレジスタ52AおよびRMWレングスレジスタ53Aに格納されるリードAの描画アドレスと描画レングスとから、リードAの終端アドレスを求める。同様に、リードアドレスチェック部72は、ステップS151で、RMW描画アドレスレジスタ52BおよびRMWレングスレジスタ53Bに格納されるリードBの描画アドレスと描画レングスとから、リードBの終端アドレスを求める。
FIG. 12 is a flowchart showing an example of the read address check process described in step S108 of FIG. In step S150, the read
リードアドレスチェック部72は、ステップS152およびステップS153で、リードAの始点から終端アドレスの間でリードBの始点または終端アドレスの有無をチェックする。リードアドレスチェック部72は、ステップS154およびステップS155で、リードBの始点から終端アドレスの間でリードAの始点または終端アドレスの有無をチェックする。これにより、リードAとリードBとによるアドレス衝突の有無をチェックしている。
In step S152 and step S153, the read
以上の判定の結果、リードAとリードBとでアドレスが衝突していないと判定された場合(ステップS152〜ステップS155の判定による判定結果が全て「No」の場合)、処理がステップS156に移行され、リードAのアドレスとリードBのアドレスとが不一致であるとされる。一方、リードAとリードBとでアドレスが衝突していると判定された場合(ステップS152〜ステップS155の判定による判定結果のうち少なくとも1が「Yes」の場合)、処理がステップS157に移行され、リードAのアドレスとリードBのアドレスとが一致しているとされる。 As a result of the above determination, when it is determined that the addresses do not collide between lead A and lead B (when all the determination results in the determinations in steps S152 to S155 are “No”), the process proceeds to step S156. Thus, it is assumed that the address of the lead A and the address of the lead B do not match. On the other hand, when it is determined that the addresses of the lead A and the lead B collide (when at least one of the determination results of the determinations in steps S152 to S155 is “Yes”), the process proceeds to step S157. The address of the lead A and the address of the lead B are assumed to match.
図13および図14を用いて、実施形態による処理の効果について説明する。図13は、メモリアクセスの順番に処理した例を示す。RMWを用いる論理演算を行う描画情報を複数記憶し、RMWによるリードアドレスとライトアドレスとの衝突の有無をチェックすることで、ライトアドレス#Aによるデータ#0〜#3のライト処理と、リードアドレス#Bによるデータ#4〜#7のリード処理とを並行して実行することができる。
The effect of the processing according to the embodiment will be described with reference to FIGS. 13 and 14. FIG. 13 shows an example of processing in the order of memory access. A plurality of pieces of drawing information for performing logical operations using RMW are stored, and by checking whether or not there is a collision between the read address and the write address by RMW, the write processing of
このように、実施形態では、RMWを用いる論理演算を行う描画情報を複数記憶して、ライト要求の際に、描画アドレスが、複数のRMWの描画情報間で一致していないかを確認し、一致しないとされた場合、RMWによるリード処理とライト処理とを並行して実施している。そのため、処理を高速に実行することが可能となる。 As described above, in the embodiment, a plurality of pieces of drawing information for performing a logical operation using the RMW are stored, and at the time of the write request, it is confirmed whether or not the drawing addresses match among the drawing information of the plurality of RMWs. If they do not match, RMW read processing and write processing are performed in parallel. As a result, the processing can be executed at high speed.
また、図14は、RMWにおいてアドレス衝突が無いことをチェックして、ライトアドレス#Cによるデータ#8〜#11のライト処理を、ライトアドレス#Aによるライト処理よりも先に行った例を示す。この場合、図13の例に対して処理をより高速化できる。 FIG. 14 shows an example in which it is checked that there is no address collision in the RMW, and the write processing of data # 8 to # 11 by the write address #C is performed before the write processing by the write address #A. . In this case, the processing can be further speeded up with respect to the example of FIG.
図15−1〜図15−3を用いて、本実施形態を適用しない場合の例について説明する。図15−1(a)に示されるような、画像(描画パターン)300と画像(描画パターン)301とが交差し、交差部分で所定の論理演算が行われる場合について考える。ここで、図15−1(b)に示されるように、各部に領域a〜eの符号を付す。この場合、領域a、bおよびcの順に最初のRMW(RMW#1とする)を行い、さらに領域d、bおよびeの順に次のRMW(RMW#2とする)を行うものとする。すなわち、領域bは、RMW#1でモディファイされライトが行われたデータに対して、RMW#2のリードが行われるべきである。
An example in which the present embodiment is not applied will be described with reference to FIGS. Consider a case where an image (drawing pattern) 300 and an image (drawing pattern) 301 intersect as shown in FIG. 15A, and a predetermined logical operation is performed at the intersection. Here, as shown in FIG. 15-1 (b), reference numerals of the areas a to e are given to the respective parts. In this case, the first RMW (referred to as RMW # 1) is performed in the order of the regions a, b, and c, and the next RMW (referred to as RMW # 2) is performed in the order of the regions d, b, and e. That is, in the area b, RMW # 2 should be read with respect to data that has been modified by
AXIバスのように、リードの応答を待たずに次々にリードコマンドを発行できる場合、図15−2に例示されるように、領域a、b、cおよびdが順次リードされ、次に領域bのRMW#1によるライトが行われる前に、RMW#2により領域bがリードされてしまう事態が起こり得る。この場合、本来意図した処理手順が実行されないため、正しい論理演算結果が得られないことになる。
When a read command can be issued one after another without waiting for a read response as in the AXI bus, the areas a, b, c, and d are sequentially read and then the area b, as illustrated in FIG. There is a possibility that the area b is read by RMW # 2 before the write by
これを避けるためには、図15−3に例示されるように、領域a、b、cおよびdのリードが終了した後、これら領域a、b、cおよびdのライトが全て終了するのを待機し、その後、RMW#2による領域bおよびeのリードを開始する。この方法では、正しい論理演算結果が得られる一方で、待機時間が発生する分、処理が遅くなるという欠点がある。 In order to avoid this, as illustrated in FIG. 15C, after the reading of the areas a, b, c, and d is completed, the writing of these areas a, b, c, and d must be completed. Wait, and then start reading the areas b and e by RMW # 2. This method has a drawback in that while a correct logical operation result can be obtained, the processing is delayed by the amount of waiting time.
図16および図17−1〜図17−3を用いて、本実施形態を適用しない場合の別の例について説明する。この別の例では、メモリワード単位でアクセスされるメモリに対して、メモリワード以下の単位で論理演算が行われる。すなわち、図16(a)に例示されるように、領域310および311のRMWのために左側のメモリワードと中央のメモリワードをリードし、中央のメモリワードをモディファイしてライトする。このとき、領域311および312がモディファイしてライトされる。その後、右側のメモリワードをリードし、領域313をモディファイしてライトする。
Another example when this embodiment is not applied will be described with reference to FIGS. 16 and 17-1 to 17-3. In this other example, a logical operation is performed in units of memory words or less for a memory accessed in units of memory words. That is, as illustrated in FIG. 16A, the left memory word and the central memory word are read for the RMW in the
一方、リードの応答を待たずに次々にリードコマンドを発行できる場合、中央の領域は、領域310および311のRMWのためにリードされた後、ライトされる前に、領域312および313のRMWのためにリードされる事態が起こり得る。この場合、モディファイされた領域311が得られず、図16(b)に例示されるように、正しい論理演算結果が得られないことになる。
On the other hand, if a read command can be issued one after another without waiting for a read response, the central area is read for the RMW in
図17−1〜図17−3を用いて、本実施形態を適用しない場合の別の例についてより具体的に説明する。上述した図16(a)の画像に対して、図17−1で示されるように、メモリワードp、qおよびrの符号を付す。この場合、メモリワードpおよびqに対してRMW#1を行い、さらにメモリワードqおよびrに対してRMW#2を行うものとする。
Another example when the present embodiment is not applied will be described more specifically with reference to FIGS. As shown in FIG. 17A, symbols of the memory words p, q, and r are attached to the image of FIG. In this case,
AXIバスのように、リードの応答を待たずに次々にリードコマンドを発行できる場合、図17−2に例示されるように、RMW#1によりメモリワードpおよびqがリードされ、続けてRMW#2によりメモリワードqおよびrがリードされる。すると、メモリワードqは、RMW#1によるライトが行われる前にRMW#2によりリードされてしまう事態が起こり得る。この場合、本来意図した処理手順が実行されないため、正しい論理演算結果が得られないことになる。
When a read command can be issued one after another without waiting for a read response as in the AXI bus, the memory words p and q are read by
これを避けるためには、図17−3に例示されるように、RMW#1によるメモリワードpおよびqのRMWが完全に終了してから、RMW#2を開始する。この方法では、正しい論理演算結果が得られる一方で、待機時間が発生する分、処理が遅くなる。
In order to avoid this, as illustrated in FIG. 17C, RMW # 2 is started after
図18および図19を用いて、本実施形態を適用しないさらに別の例について説明する。図18は、RMWによる正しい論理演算が行われない例を示す。この例では、最初のRMW#1によるリードアドレス#Aによるデータがデータ#0〜#3とされ、次のRMW#2によるリードアドレス#Bによるデータがデータ#4〜#7とされ、RMW#1とRMW#2とでデータ#3が重複している。この場合、データ#3は、RMW#1によるライトが行われてから、RMW#2によるリードを行う必要がある。
Still another example to which the present embodiment is not applied will be described with reference to FIGS. 18 and 19. FIG. 18 shows an example in which a correct logical operation by RMW is not performed. In this example, data by read address #A by the
ところが、図18の例では、アドレスの衝突の有無をチェックしていないため、RMW#1とRMW#2とで重複するデータ#3においてアドレスの衝突が起こることが検出できない。そのため、データ#3がRMW#1により先ずリードデータ100としてリードされ、そのデータ#3が、RMW#1によるライトが行われる前に、RMW#2によりリードデータ101としてリードされ、その後、ライトデータ102としてライトされる。したがって、ライトデータ102は、RMW#2によるライトが反映されておらず、正しい論理演算結果が得られない。この場合、後続する同じデータ#3によるライトデータ103も、正しくないことになる。
However, in the example of FIG. 18, since the presence or absence of an address conflict is not checked, it is impossible to detect that an address conflict occurs in data # 3 that overlaps between
これを避けるためには、図19に例示されるように、リードアドレス#Aおよび#Bでアドレス衝突を認識し、リードアドレス#AのRMW#1によるデータ#0〜#3のライト処理が終了した後に、リードアドレス#BのRMW#1によるデータ#3〜#7のリードを行うことが考えられる。この場合でも、正しい論理演算結果が得られる一方で、待機時間が発生する分、処理が遅くなる。
In order to avoid this, as illustrated in FIG. 19, an address collision is recognized at the read addresses #A and #B, and the write processing of the
実施形態では、図13および図14を用いて説明したように、RMWを用いる論理演算を行う描画情報を複数記憶して、ライト要求の際に、描画アドレスが、複数のRMWの描画情報間で一致していないかを確認し、一致しないとされた場合、RMWによるリード処理とライト処理とを並行して実施している。そのため、処理を高速に実行することが可能となる。 In the embodiment, as described with reference to FIGS. 13 and 14, a plurality of pieces of drawing information for performing logical operations using RMW are stored, and a drawing address is set between drawing information of a plurality of RMWs at the time of a write request. It is confirmed whether or not they match, and if they do not match, the RMW read processing and write processing are performed in parallel. As a result, the processing can be executed at high speed.
なお、RMWによるアドレス衝突を避ける方法として、メモリにアクセスするための情報(アドレス情報、論理演算タイプ、描画マスク、ライトする描画パターンなど)をFIFO(First In, First Out)メモリに順次格納し、FIFOメモリ内部でライトおよびリードのアドレス衝突の有無を監視して衝突が無ければ順次FIFOからメモリアクセス情報を読み出してメモリをアクセスする方法が考えられる。 As a method of avoiding address collision by RMW, information (address information, logical operation type, drawing mask, drawing pattern to be written, etc.) for accessing the memory is sequentially stored in a FIFO (First In, First Out) memory, A method may be considered in which the presence or absence of a write / read address collision is monitored in the FIFO memory, and if there is no collision, the memory access information is sequentially read from the FIFO to access the memory.
しかしながらこの方法では、FIFOメモリにメモリアクセス情報を準じ格納するために、FIFOメモリが巨大化し大きなゲート規模が必要となってしまう。また、FIFOメモリが一杯になるとその時点でFIFOメモリが空になるまで待機する必要があり、高速化が困難である。さらに、メモリアクセス時に、FIFOメモリ内のアドレスと順次比較する必要があり、処理の高速化を妨げていた。 However, in this method, in order to store memory access information in the FIFO memory in accordance with the memory, the FIFO memory becomes enormous and a large gate scale is required. Further, when the FIFO memory is full, it is necessary to wait until the FIFO memory becomes empty at that time, and it is difficult to increase the speed. Further, when accessing the memory, it is necessary to sequentially compare the addresses in the FIFO memory, which hinders the speeding up of processing.
例えばバースト長が16ビットによる8回分のアクセスであれば、128個のメモリアクセス情報をFIFOメモリに格納する必要があり、FIFOメモリに大きか容量が必要となると共に、高速化のために少なくとも128個のアドレス比較装置が必要とされ、ゲート規模が大きくなってしまう。 For example, if the burst length is 8 accesses with 16 bits, it is necessary to store 128 pieces of memory access information in the FIFO memory, and the FIFO memory requires a large or large capacity, and at least 128 for speeding up. One address comparison device is required, and the gate scale becomes large.
実施形態では、アドレスの衝突チェックを、メモリアクセス単位に開始アドレスとレングス(描画長さ)に基づきアドレス一致の有無を確認することで行なっているためゲート規模が小さくて済み、高速処理が可能である。また、ゲート規模が小さいのでより多くメモリアクセスに対応することができる。 In the embodiment, since the address collision check is performed by checking whether or not there is an address match based on the start address and length (drawing length) for each memory access unit, the gate scale is small and high-speed processing is possible. is there. Further, since the gate scale is small, more memory accesses can be handled.
上述の実施形態は、本発明の好適な実施の例ではあるがこれに限定されるものではなく、本発明の要旨を逸脱しない範囲において種々の変形による実施が可能である。 The above-described embodiment is a preferred embodiment of the present invention, but is not limited thereto, and various modifications can be made without departing from the gist of the present invention.
1 画像処理装置
13 AXIバス
14 メインメモリ
15 描画部
30 論理演算部
31 描画パターン生成部
52A,52B RMW描画アドレスレジスタ
53A,53B RMW描画レングスレジスタ
54A,54B RMW_ROPTYPEレジスタ
55A,55B RMWライト描画パターンバッファ
56 ライト描画アドレスレジスタ
57 ライトレングスレジスタ
58 ライトROPTYPEレジスタ
59 ライト描画パターンバッファ
64 RMW_ROPT処理部
67 リード制御部
68 ライト制御部
69 ライトアドレスチェック部
70 ライト用ROPT処理部
72 リードアドレスチェック部
73 コントローラ
DESCRIPTION OF
Claims (7)
前記描画情報を保持する複数の保持部と、
前記生成部で生成された描画情報に含まれる論理演算を示す情報が前記メモリ上でのリードモディファイライトを用いる論理演算を示している場合に、該描画情報に含まれる描画アドレスと、前記複数の保持部のうち少なくとも1に保持される描画情報に含まれる描画アドレスとが一致するか否かを判定する判定部と、
前記判定部により一致していると判定された場合に、前記生成部で生成された描画情報に基づく前記メモリに対する前記リードモディファイライトによるリード処理を一時的に停止する制御部と
を有する
ことを特徴とする画像処理装置。 A generating unit that generates drawing information including at least a drawing pattern, a drawing address indicating an address on the memory of the drawing pattern, and information indicating a logical operation performed on the drawing pattern;
A plurality of holding units for holding the drawing information;
When the information indicating the logical operation included in the drawing information generated by the generating unit indicates a logical operation using read-modify-write on the memory, the drawing address included in the drawing information, and the plurality of A determination unit that determines whether or not a drawing address included in drawing information held in at least one of the holding units matches;
A control unit that temporarily stops read processing by the read-modify-write on the memory based on the drawing information generated by the generation unit when the determination unit determines that they match. An image processing apparatus.
前記複数の保持部に保持される前記描画情報に基づく前記メモリに対するリード要求を、リード応答の有無に関わらず順次実行する
ことを特徴とする請求項1に記載の画像処理装置。 The controller is
The image processing apparatus according to claim 1, wherein a read request to the memory based on the drawing information held in the plurality of holding units is sequentially executed regardless of presence or absence of a read response.
前記判定部により一致していると判定された場合に、前記メモリに対する前記リードモディファイライトによるリード処理とライト処理とをシリアルに実行する
ことを特徴とする請求項1または請求項2に記載の画像処理装置。 The controller is
3. The image according to claim 1, wherein when the determination unit determines that they match, the read process and the write process by the read-modify-write to the memory are serially executed. Processing equipment.
前記情報が前記メモリに対するライトのみを用いる論理演算を示し、且つ、前記判定部により一致していないと判定された場合に、前記メモリに対するライト処理を優先して実行する
ことを特徴とする請求項1乃至請求項3の何れか1項に記載の画像処理装置。 The controller is
The write processing with respect to the memory is preferentially executed when the information indicates a logical operation using only the write with respect to the memory and the determination unit determines that they do not match. The image processing apparatus according to any one of claims 1 to 3.
前記演算部は、
前記生成部で生成された描画情報に含まれる論理演算を示す情報が前記メモリ上でのリードモディファイライトを用いる論理演算を示している場合には、前記複数の保持部のうち1に保持される描画情報に従い論理演算を実行し、
該情報が前記メモリに対するライトのみを用いる論理演算を示している場合には、前記生成部で生成された描画情報に従い論理演算を実行し、
前記制御部は、
前記演算部による論理演算の結果を、該論理演算を示す前記情報が含まれる描画情報に従い前記メモリに対してライト処理する
ことを特徴とする請求項1乃至請求項4の何れか1項に記載の画像処理装置。 An arithmetic unit that performs a logical operation on the drawing pattern according to the information indicating the logical operation;
The computing unit is
When the information indicating the logical operation included in the drawing information generated by the generation unit indicates the logical operation using the read-modify-write on the memory, the information is held in one of the plurality of holding units. Perform logical operations according to the drawing information,
When the information indicates a logical operation using only writing to the memory, the logical operation is executed according to the drawing information generated by the generation unit,
The controller is
The result of the logical operation by the arithmetic unit is written to the memory according to drawing information including the information indicating the logical operation. Image processing apparatus.
前記情報が前記メモリに対するライトのみを用いる論理演算を示している場合に、該情報に従い描画パターンに対して論理演算を施す第2演算部と
をさらに有し、
前記制御部は、
前記判定部により一致していないと判定された場合に、前記第2演算部による論理演算を前記第1演算部による論理演算に対して優先して実行して、論理演算の結果を、該論理演算を示す前記情報が含まれる描画情報に従い前記メモリに対してライト処理する
ことを特徴とする請求項1乃至請求項4の何れか1項に記載の画像処理装置。 When information indicating a logical operation included in the drawing information generated by the generation unit indicates a logical operation using a read-modify-write on the memory, a logical operation is performed on the drawing pattern according to the information. 1 calculation unit,
A second operation unit for performing a logical operation on a drawing pattern according to the information when the information indicates a logical operation using only writing to the memory;
The controller is
When it is determined by the determination unit that they do not match, the logical operation by the second operation unit is executed with priority over the logical operation by the first operation unit, and the result of the logical operation is The image processing apparatus according to claim 1, wherein a write process is performed on the memory in accordance with drawing information including the information indicating an operation.
前記描画情報を複数の保持部に保持する保持ステップと、
前記生成ステップにより生成された描画情報に含まれる論理演算を示す情報が前記メモリ上でのリードモディファイライトを用いる論理演算を示している場合に、該描画情報に含まれる描画アドレスと、前記複数の保持部のうち少なくとも1に保持される描画情報に含まれる描画アドレスとが一致するか否かを判定する判定ステップと、
前記判定ステップにより一致していると判定された場合に、前記生成ステップにより生成された描画情報に基づく前記メモリに対する前記リードモディファイライトによるリード処理を一時的に停止する制御ステップと
を有する
ことを特徴とする画像処理方法。 A generation step of generating drawing information including at least a drawing pattern, a drawing address indicating an address of the drawing pattern on a memory, and information indicating a logical operation performed on the drawing pattern;
A holding step for holding the drawing information in a plurality of holding units;
When the information indicating the logical operation included in the drawing information generated by the generating step indicates a logical operation using read-modify-write on the memory, the drawing address included in the drawing information, and the plurality of A determination step of determining whether or not a drawing address included in drawing information held in at least one of the holding units matches;
And a control step of temporarily stopping the read processing by the read-modify-write on the memory based on the drawing information generated by the generation step when it is determined by the determination step that they match. An image processing method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012204284A JP6191106B2 (en) | 2012-09-18 | 2012-09-18 | Image processing apparatus and image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012204284A JP6191106B2 (en) | 2012-09-18 | 2012-09-18 | Image processing apparatus and image processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014060579A true JP2014060579A (en) | 2014-04-03 |
JP6191106B2 JP6191106B2 (en) | 2017-09-06 |
Family
ID=50616675
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012204284A Expired - Fee Related JP6191106B2 (en) | 2012-09-18 | 2012-09-18 | Image processing apparatus and image processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6191106B2 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5526474A (en) * | 1991-10-28 | 1996-06-11 | Ricoh Company, Ltd. | Image drawing with improved process for area ratio of pixel |
JP2006260590A (en) * | 2006-04-24 | 2006-09-28 | Hitachi Ltd | Figure processing device, method for using thereof, and microprocessor |
JP2007286863A (en) * | 2006-04-17 | 2007-11-01 | Ricoh Co Ltd | Drawing device and drawing process |
-
2012
- 2012-09-18 JP JP2012204284A patent/JP6191106B2/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5526474A (en) * | 1991-10-28 | 1996-06-11 | Ricoh Company, Ltd. | Image drawing with improved process for area ratio of pixel |
JP2007286863A (en) * | 2006-04-17 | 2007-11-01 | Ricoh Co Ltd | Drawing device and drawing process |
JP2006260590A (en) * | 2006-04-24 | 2006-09-28 | Hitachi Ltd | Figure processing device, method for using thereof, and microprocessor |
Also Published As
Publication number | Publication date |
---|---|
JP6191106B2 (en) | 2017-09-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20180082160A1 (en) | Image processing apparatus and image processing method | |
JP6171591B2 (en) | Image processing apparatus and image processing method | |
US9172839B2 (en) | Image forming apparatus, control method and storage medium | |
JP2008310798A (en) | Image processing controller and image forming apparatus | |
US7889386B2 (en) | Image processing apparatus and method for processing vector image data units of blocks | |
US7814251B2 (en) | DMA transfer control system that performs data decode and data transfer and that generates a no operation (NOP) interrupt signal to end the DMA transfer processing in response to a NOP designation | |
JP6904697B2 (en) | Information processing device and communication control method | |
JP2006289642A (en) | Image forming apparatus, image forming method, and printer | |
JP6191106B2 (en) | Image processing apparatus and image processing method | |
US6563505B1 (en) | Method and apparatus for executing commands in a graphics controller chip | |
US10089561B2 (en) | Generating a raster image region by rendering in parallel plural regions of smaller height and segmenting the generated raster image region into plural regions of smaller width | |
JP2005165592A (en) | Data transfer device | |
US10192282B2 (en) | Information processing device, image processing apparatus, and information processing method for high-speed translucency calculation | |
JP6283980B2 (en) | Image processing apparatus and image processing method | |
JP6135440B2 (en) | Image processing apparatus and image forming apparatus | |
JP4468754B2 (en) | Image forming apparatus and memory control method | |
JP2007286863A (en) | Drawing device and drawing process | |
JP6940283B2 (en) | DMA transfer control device, DMA transfer control method, and DMA transfer control program | |
JP2006260273A (en) | Subsystem module, information processor, and data transfer method in the subsystem module | |
JP2005258783A (en) | Data transfer device, data transfer method, image forming apparatus, and option board | |
JP5889372B2 (en) | Information processing apparatus, information processing system, information processing method, control apparatus, and control method | |
JPH1063250A (en) | Character processing device | |
JP2006157580A (en) | Image processor, image forming apparatus, image processing method, computer program, and recording medium | |
JP2003241917A (en) | Image processor, image processing method, program and recording medium | |
JP2007185911A (en) | Printer controller and printer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150818 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160628 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160712 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160908 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170221 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170227 |
|
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: 20170711 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170724 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6191106 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
LAPS | Cancellation because of no payment of annual fees |