JP4845351B2 - Data transfer control device, data processing device, and control method for data transfer control device - Google Patents
Data transfer control device, data processing device, and control method for data transfer control device Download PDFInfo
- Publication number
- JP4845351B2 JP4845351B2 JP2004170292A JP2004170292A JP4845351B2 JP 4845351 B2 JP4845351 B2 JP 4845351B2 JP 2004170292 A JP2004170292 A JP 2004170292A JP 2004170292 A JP2004170292 A JP 2004170292A JP 4845351 B2 JP4845351 B2 JP 4845351B2
- Authority
- JP
- Japan
- Prior art keywords
- image processing
- data
- processor
- unit
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Bus Control (AREA)
- Memory System (AREA)
- Image Processing (AREA)
Description
本発明は、画像処理に適用可能なデータ転送制御装置、データ処理装置、及びデータ転送制御装置の制御方法に関する。 The present invention relates to a data transfer control device applicable to image processing , a data processing device, and a control method for the data transfer control device .
近年、半導体プロセスの発展及びアーキテクチャの進化に伴い、各種機器に搭載されるプロセッサの処理速度が非常に高まってきている。これにより、以前は専用のハードウェアによってソフトウェアの介在無しに実現していた処理の幾つかは、プロセッサ上のソフトウェアによって実現することが可能になってきている。 In recent years, with the development of semiconductor processes and the evolution of architecture, the processing speed of processors mounted on various devices has been greatly increased. As a result, some of the processes that have been realized by dedicated hardware without software intervention can be realized by software on the processor.
プロセッサは、その動作周波数が上がることで性能の向上を遂げてきた。他方、メモリの動作周波数はプロセッサのそれよりも向上の度合いが低く、プロセッサとメモリの動作周波数の差がプロセッサの性能向上の足枷となってしまってきている。 Processors have improved performance by increasing their operating frequency. On the other hand, the operating frequency of the memory is less improved than that of the processor, and the difference between the operating frequency of the processor and the memory has become an obstacle to improving the performance of the processor.
そこで、プロセッサには、メモリアクセス時におけるレイテンシ(データ転送要求から実際にデータが転送されてくるまでの遅延時間)を短縮するために、プロセッサとメインメモリの間に低レイテンシでアクセスが可能なキャッシュメモリを配置する場合が多い(例えば、特許文献1参照)。キャッシュメモリは、同じアドレスのデータを繰り返しアクセスすることが多い、というデータアクセスの局所性を利用したものであり、プロセッサによって実行される多くの処理を該キャッシュメモリによって高速化することができる。 Therefore, the processor has a cache that can be accessed with low latency between the processor and the main memory in order to reduce the latency (delay time from the data transfer request to the actual transfer of data) during memory access. In many cases, a memory is arranged (see, for example, Patent Document 1). The cache memory uses the locality of data access that data of the same address is often accessed repeatedly, and many processes executed by the processor can be accelerated by the cache memory.
画像処理においても、高画質化を実現するために処理が複雑化すると共に多様化しており、ハードウェアによって単純かつ固定の処理を行うよりは、プロセッサによって柔軟に処理したいという要求が出てきている。 Even in image processing, processing has become complicated and diversified in order to achieve high image quality, and there has been a demand for processing more flexibly by a processor than by simple and fixed processing by hardware. .
しかしながら、画像処理においては、処理対象となる画像のデータ容量が大きい上に、プロセッサからメインメモリに対し、データが配置されているアドレス範囲の端から順番にアクセスするような場合が多く、データアクセスの局所性が非常に低い。そのため、キャッシュメモリによる処理の高速化の効果が低い。その代わり、メインメモリに対するアクセスパターンに規則性が高く、画像処理内容が予め分かっていれば、プロセッサのアクセスを予測することが比較的容易である。 However, in image processing, the data capacity of the image to be processed is large, and the processor often accesses the main memory in order from the end of the address range where the data is arranged. The locality of is very low. Therefore, the effect of speeding up the processing by the cache memory is low. Instead, if the access pattern to the main memory has high regularity and the contents of image processing are known in advance, it is relatively easy to predict processor access.
そこで、一般に、プロセッサとメインメモリの間に、キャッシュメモリだけでなく、プロセッサから自由に読み出し/書き込みが可能な小容量かつ低レイテンシでアクセス可能なローカルメモリを配置し、プロセッサがこのローカルメモリ上で処理を行う。このローカルメモリには、DMA(Direct Memory Access)可能な制御装置が接続されており、プロセッサの処理と並列に、次の処理に必要なデータをメインメモリ上からローカルメモリ上に転送し、処理結果のデータをローカルメモリ上からメインメモリ上に書き戻す。これによって、メインメモリへのアクセスレイテンシを隠蔽することができ、処理の高速化がなされる。
しかしながら、上述した手法によって処理の高速化を実現しようとする場合、より高速なプロセッサを使う必要があるが、プロセッサの搭載対象とする製品によっては低消費電力、低発熱、低コスト等に対する要求が存在する。このような場合においては、プロセッサの処理能力をある程度低く抑える必要が生じる場合がある。そのため、例えば画像処理に用いるプロセッサが要求性能に満たない場合には、ある特定の画像処理を補佐する専用機能を有するハードウェアを追加しなくてはならなくなる。 However, if it is intended to increase the processing speed by the above-described method, it is necessary to use a faster processor. However, depending on the product on which the processor is mounted, there is a demand for low power consumption, low heat generation, low cost, etc. Exists. In such a case, it may be necessary to reduce the processing capacity of the processor to some extent. Therefore, for example, when a processor used for image processing does not satisfy the required performance, hardware having a dedicated function for assisting a specific image processing must be added.
しかし、画像処理をプロセッサで行うことによって画像処理のアルゴリズムをソフトウェアによって実装することが可能となり、同一のハードウェアを使用しているにも関わらず複数の画像処理のアルゴリズムを実現するという柔軟性を得ることが可能となるはずが、専用機能を有するハードウェアを追加してしまうことで柔軟性を低下させてしまうという問題がある。 However, by performing image processing with a processor, it is possible to implement an image processing algorithm by software, and the flexibility of realizing multiple image processing algorithms despite using the same hardware. Although it should be possible to obtain, there is a problem that flexibility is reduced by adding hardware having a dedicated function.
また、プロセッサ側の画像処理は小容量のローカルメモリ上で行うため、処理対象となる画像データを幾つかに分割し、メインメモリ及びローカルメモリ間をデータ転送し、何回かに分けて処理を行う必要がある。このデータ転送はDMA制御装置によって制御されているが、DMA制御装置自体もDMA専用のハードウェアであり、決まったデータ転送手順を行うことしかできない。つまり、後から新しい画像処理内容を実現しようとしたときに、DMA制御装置が対応していないデータ転送手順を利用しなくてはならない場合には、後から新しい画像処理内容を実現することができないか、もしくは著しく処理速度が低下してしまうという問題がある。 Further, since the image processing on the processor side is performed on a small-capacity local memory, the image data to be processed is divided into several parts, the data is transferred between the main memory and the local memory, and the processing is divided into several times. There is a need to do. This data transfer is controlled by the DMA controller, but the DMA controller itself is DMA-dedicated hardware and can only perform a predetermined data transfer procedure. In other words, if a new image processing content is to be realized later and the data transfer procedure not supported by the DMA controller must be used, the new image processing content cannot be realized later. Or there is a problem that the processing speed is significantly reduced.
本発明の目的は、画像処理の高速化と処理内容の柔軟性を実現することを可能とし、特に、転送装置の結果に応じて画像処理手段で効率良く画像データを処理することを可能としたデータ転送制御装置、データ処理装置、及びデータ転送制御装置の制御方法を提供することにある。 An object of the present invention is to enable high-speed image processing and flexibility in processing contents, and in particular, it is possible to efficiently process image data with image processing means according to the result of the transfer device . A data transfer control device , a data processing device, and a control method for the data transfer control device are provided.
上述の目的を達成するために、本発明のデータ転送制御装置は、画像処理手段から出力された命令列を保持する保持手段と、前記保持手段の保持する命令列の解釈に従って、前記画像処理手段が行う画像処理と時間的に並列に、第1の記憶手段に記憶された画像処理対象の画像データの一部から前記画像処理手段の画像処理の内容を決定する値を取得し、前記画像データの一部と前記値とを第2の記憶手段に転送する転送手段とを備えることを特徴とする。 To achieve the above object, a data transfer controller according to the present invention, holding means for holding instruction string which is output from the image processing unit, according to the interpretation of the instruction sequence to retain the holding means, the image processing In parallel with the image processing performed by the means, a value for determining the content of the image processing of the image processing means is acquired from a part of the image processing target image data stored in the first storage means, and the image Transfer means for transferring a part of the data and the value to the second storage means is provided.
本発明によれば、従来のように専用機能を有するハードウェアを追加しなくとも(同一のハードウェア構成を用いながら)、データ転送制御装置が、画像処理装置側の複数の画像処理の内容それぞれに適したデータ転送及び画像処理装置側の画像処理を補佐する処理を行うことができ、画像処理の高速化と処理内容の柔軟性を実現することが可能となる。特に、画像データを部分的に転送をしながら、この画像データの一部に適用する画像処理を決定する値を抽出することで、転送装置の結果に応じて画像処理手段で効率良く画像データを処理することができる。 According to the present invention, without additional hardware having a dedicated function like a traditional (while using the same hardware configuration), the data transfer control device, the contents of the plurality of image processing in the image processing apparatus Data transfer suitable for each of them and processing for assisting image processing on the image processing apparatus side can be performed, and it is possible to realize high-speed image processing and flexibility in processing contents. In particular, by partially transferring the image data and extracting a value that determines the image processing to be applied to a part of the image data, the image processing means efficiently outputs the image data according to the result of the transfer device. Can be processed.
以下、本発明の実施の形態を図面に基づき説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[第1の実施の形態]
図1は、本発明の第1の実施の形態に係るデータ処理装置の構成を示すブロック図である。
[First Embodiment]
FIG. 1 is a block diagram showing the configuration of the data processing apparatus according to the first embodiment of the present invention.
図1において、データ処理装置は、プロセッサ1、DMAプロセッサ2、ローカルメモリ3、ローカルメモリ4、メモリコントローラ5、メインメモリ6、DMAプロセッサインタフェース7、アドレスバス・データバス8を備えている。
1, the data processing apparatus includes a
プロセッサ1は、アドレス・データバス8に接続されているローカルメモリ上の画像データに対する画像処理を行う。DMAプロセッサ2は、プロセッサ1が行う画像処理の内容に応じて処理内容を変更可能であり、内蔵のインストラクションメモリに保持されている命令列を読み込み、命令列を解釈し実行する。また、DMAプロセッサ2は、プロセッサが行う画像処理と時間的に並列に、アドレス・データバス8に接続されているローカルメモリ3、4と、メモリコントローラ5を介したメインメモリ6との間のデータ転送を行う。インストラクションメモリは、32ビットを1ワードとし、128ワードの命令列を格納することが可能である。個々のワードには0〜127のアドレスが割り振られており、基本的には0番地から順に命令列を実行する。
The
また、DMAプロセッサ2は、プロセッサ1が行う画像処理の内容に応じて、画像処理対象の画像データをプロセッサ側の処理に都合の良い形式に並べ替えながら、プロセッサ1の画像処理対象とするメインメモリ上の画像データの一部分をローカルメモリ3(または4)に転送し、プロセッサ側の処理を補佐する処理を行いながら、プロセッサ1の画像処理対象とするメインメモリ上の画像データの一部分をローカルメモリ3(または4)に転送する。
Further, the
また、DMAプロセッサ2は、プロセッサ1が行う画像処理の内容に応じて、プロセッサ側の画像処理に都合の良い形式で存在している画像データを後段の画像処理に都合の良い形式に変換しながら、プロセッサ1が画像処理を完了したローカルメモリ上の画像データをメインメモリ6に転送し、プロセッサ側の画像処理を補佐する処理を行いながら、プロセッサ1が画像処理を完了したローカルメモリ上の画像データをメインメモリ6に転送する。
Further, the
DMAプロセッサインタフェース7は、DMAプロセッサ2と接続されていると共に、アドレス・データバス8経由でプロセッサ1からの読み出し及び書き込みが可能な複数のレジスタ(図3)を備えている。プロセッサ1によりDMAプロセッサインタフェース7の前記レジスタを書き換えることによって、DMAプロセッサ2のリセット状態の制御と、DMAプロセッサ2内のインストラクションメモリの書き換えを行うことができる。
The DMA processor interface 7 is connected to the
ローカルメモリ3、4は、低レイテンシでアクセス可能なSRAM(Static RAM)から構成されている。メモリコントローラ5は、プロセッサ1、DMAプロセッサ2からアドレス・データバス8経由でメインメモリ6にアクセスする際の制御を行う。メインメモリ6は、アクセスには多くのレイテンシを必要とするが容量を大きくすることが可能なDRAM(Dynamic RAM)から構成されている。プロセッサ1、DMAプロセッサ2、ローカルメモリ3、4、メモリコントローラ5は、それぞれクロスバ接続されている。プロセッサ1とDMAプロセッサ2のアクセス要求先が同一でなければ、時間的に並列にローカルメモリ3、4、メインメモリ6にアクセスすることが可能になっている。
The
図2は、プロセッサ1及びDMAプロセッサ2において有効なメインメモリ6、ローカルメモリ3、4、DMAプロセッサインタフェース7のレジスタのアドレスマップ21を示す図である。
FIG. 2 is a diagram showing an
図2において、メインメモリ6は、0x00000000〜0x03ffffffの範囲であり、容量が64Mbytesである。ローカルメモリ3は、0xc0000000〜0xc0001fffの範囲であり、容量が8Kbytesである。ローカルメモリ4は、0xc0002000〜0xc0003fffの範囲であり、容量が8Kbytesである。DMAプロセッサインタフェース7のレジスタは、0xe0000000〜0xefffffffの範囲である。0xf0000000〜0xffffffffの範囲は、プロセッサ1のブート及びプログラム格納用のROM領域になっている。
In FIG. 2, the
図3は、プロセッサ1からアクセス可能なDMAプロセッサインタフェース7のレジスタマップ31を示す図である。
FIG. 3 is a diagram showing a
図3において、0xe0000000番地はresetレジスタ32である。プロセッサ1がresetレジスタ32に1を書き込むと、DMAプロセッサ2がreset 状態となり、プロセッサ1がresetレジスタ32に0を書き込むと、DMAプロセッサ2がreset解除状態となる。resetレジスタ32の初期値は1である。
In FIG. 3, the address 0xe0000000 is the
0xe0000004番地はtrigger emitレジスタ33である。プロセッサ1がtrigger emitレジスタ33に1を書き込むと、DMAプロセッサ2に対してtriggerイベントを発生させることができる。DMAプロセッサ2はtriggerイベントを専用の命令によって検知することができる。
The address 0xe0000004 is a trigger emit
0xe0000008番地はtrigger statusレジスタ34である。DMAプロセッサ2がtrigger emit命令を実行した後に、プロセッサ1がtrigger statusレジスタ34を読み込むと、値として1を得る。以前にDMAプロセッサ2がtrigger emit命令を実行していない場合に、プロセッサ1がtrigger statusレジスタ34を読み込むと、値として0を得る。プロセッサ1がtrigger statusレジスタ34に0を書き込むと、trigger statusレジスタ34が保持していた値がリセットされ、0が読み込めるようになる。trigger statusレジスタ34の初期値は0である。
The address 0xe0000008 is the
0xe000000c番地はmodeレジスタ35である。プロセッサ1がmodeレジスタ35に1を書き込むと、DMAプロセッサ2がインストラクションメモリ書き換え可能な停止状態となり、プロセッサ1がmodeレジスタ35に0を書き込むと、DMAプロセッサ2が命令実行状態となる。modeレジスタ35の初期値は0である。
The address 0xe000000c is the
0xe0000010番地はIMEM Addressレジスタ36である。DMAプロセッサ2がインストラクションメモリ書き換え可能な停止状態にある時に、プロセッサ1がインストラクションメモリの書き換え対象のアドレスをIMEM Addressレジスタ36に書き込むことで指定する。
The 0xe0000010 address is the IMEM Address register 36. When the
0xe0000014番地はIMEM Dataレジスタ37である。DMAプロセッサ2がインストラクションメモリ書き換え可能な停止状態にある時に、プロセッサ1がIMEM Dataレジスタ37に値を書き込むことで、インストラクションメモリのIMEM Addressレジスタ36で指定された番地にDMAプロセッサ2の命令として書き込むことができる。
The 0xe0000014 address is the IMEM Data register 37. When the
次に、上記構成を有する本実施の形態のデータ処理装置の画像処理における動作例を図4乃至図7を参照しながら説明する。 Next, an operation example in image processing of the data processing apparatus according to the present embodiment having the above-described configuration will be described with reference to FIGS.
図4は、画像処理の対象となる画像データを示す図である。 FIG. 4 is a diagram showing image data to be subjected to image processing.
図4において、画像データは、横2048ピクセル、縦1536ピクセルから構成されている。1ピクセルは256階調の1バイトで存在している。プロセッサ1は、画像データを横2048ピクセルの1ライン2Kbytes単位に分割し、誤差拡散法によって二値画像に変換する画像処理を行う。
In FIG. 4, the image data is composed of 2048 pixels wide and 1536 pixels vertically. One pixel exists in one byte of 256 gradations. The
誤差拡散法による二値化は、注目しているピクセルの値が0〜127の場合には結果に0を出力し、128〜255の場合には結果に1を出力する。それと同時に、結果に0を出力した場合にはピクセル値を、結果に1を出力した場合にはピクセル値から127を引いた値を誤差値とし、後に処理するピクセル値に加算する。対象としているピクセルの座標を(x,y)とすると、加算の配分は、座標(x+1,y)のピクセルに誤差値の1/2、座標(x-1,y+1)のピクセルに誤差値の1/4、座標(x,y+1)のピクセルに誤差値の1/8と誤差値を8で割った余り、座標(x+1,y+1)のピクセルに誤差値の1/8とする。 In the binarization by the error diffusion method, when the value of the pixel of interest is 0 to 127, 0 is output as the result, and when it is 128 to 255, 1 is output as the result. At the same time, if 0 is output as the result, the pixel value is set as an error value, and if 1 is output as the result, a value obtained by subtracting 127 from the pixel value is set as an error value and added to the pixel value to be processed later. If the coordinates of the target pixel are (x, y), the distribution of the addition is 1/2 of the error value to the pixel of coordinates (x + 1, y) and the pixel of coordinates (x-1, y + 1) The error value is 1/4, the pixel of coordinates (x, y + 1) is the remainder of dividing the error value of 1/8 and the error value by 8, and the pixel of coordinates (x + 1, y + 1) is the error value. 1/8.
ここで、画像処理対象とする画像データの中に横1ラインが白一色なものが存在していた場合には、上記の誤差拡散法による二値化の処理を簡略化することが可能となる。例えば白地に横に文字が表示されているような画像データが画像処理対象であった場合には、文字の上下の余白及び行間は白一色のラインとなる。 Here, in the case where image data to be subjected to image processing includes a single horizontal line that is white, it is possible to simplify the binarization processing by the error diffusion method. . For example, when image data in which characters are displayed horizontally on a white background is an image processing target, the upper and lower margins and line spacing of the characters are white lines.
そこで、一回の処理単位とする横1ラインをメインメモリ6からローカルメモリ3(または4)にDMAプロセッサ2が転送する際に、DMAプロセッサ2は、転送した画像データの1バイト単位での最小値を同時に求めておく。プロセッサ1は、DMAプロセッサ2により算出された最小値が既定値よりも大きい場合は、ローカルメモリ側から画像データを読むこと無く出力結果を全て1とし、次のラインへの誤差値を0として画像処理を簡略化する。これは、画像処理の高速化につながる。プロセッサ1における上記最小値に関わる画像処理については下記の動作説明で詳述する。
Therefore, when the
図5は、DMAプロセッサ用プログラムを示す図である。 FIG. 5 shows a DMA processor program.
図5において、DMAプロセッサ用プログラムは、DMAプロセッサ2上で動作し、メインメモリ6とローカルメモリ3(または4)との間のデータの転送及び各データの最小値の計算を行うものであり、図7のフローチャートに示す処理を実行する。図5におけるar0 、ar1、ar7レジスタ、lp0レジスタ、ofst0レジスタ、gpr0、gpr1レジスタは、DMAプロセッサ2内のレジスタである。
In FIG. 5, the DMA processor program runs on the
まず、プロセッサ1は、DMAプロセッサ2のインストラクションメモリに対してDMAプロセッサ用プログラムの書き込みを行うために、DMAプロセッサインタフェース7のレジスタ(図3)にアクセスし、以下の処理を行う。
First, in order to write a DMA processor program to the instruction memory of the
(1)DMAプロセッサインタフェース7のmodeレジスタである0xe000000c番地に1を書き込み、DMAプロセッサ2をインストラクションメモリ書き換え可能な状態とする。
(1)
(2)resetレジスタである0xe0000000番地に0を書き込み、DMAプロセッサ2のリセットを解除する。
(2)
(3)IMEM Addressレジスタである0xe0000010番地に図5の命令に対応したインストラクションメモリ内の番地を書き込む。 (3) The address in the instruction memory corresponding to the instruction of FIG. 5 is written to the address 0xe0000010 which is the IMEM Address register.
(4)IMEM Dataレジスタである0xe0000014番地に(3)で指定した図5のオペレーションコードを書き込む。 (4) Write the operation code of FIG. 5 specified in (3) to address 0xe0000014 which is the IMEM Data register.
(5)図5の命令数分だけ(3)〜(4)を繰り返す。 (5) Repeat (3) to (4) for the number of instructions in FIG.
(6)modeレジスタである0xe000000c番地に0を書き込み、DMAプロセッサ2を命令実行状態にする。
(6)
上記の処理により、DMAプロセッサ2は、そのインストラクションメモリの0番地から順に命令を実行し、画像データの転送と各画像データの最小値を求める。
Through the above processing, the
図6は、ローカルメモリ側の詳細なアドレスマップを示す図である。 FIG. 6 is a diagram showing a detailed address map on the local memory side.
図6において、アドレスマップは、画像データのnライン目の画像処理を行う場合のデータの配置を示したものである。プロセッサ1は、nライン目の画像処理を開始する前に、まず、DMAプロセッサ2のデータ転送動作を開始するために以下の処理を行う。
In FIG. 6, the address map shows the data arrangement when performing image processing on the nth line of the image data. The
プロセッサ1は、DMAプロセッサインタフェース7のresetレジスタである0xc0000000番地に0xc0000900を、trigger emitレジスタである0xc0000004番地に0x02000400を、trigger statusレジスタである0xc0000008番地に0x00000100をそれぞれ書き込み、画像処理の完了した画像データをローカルメモリ3(または4)からメインメモリ6に対して転送するアドレス範囲を指定する。更に、プロセッサ1は、0xc0000010番地に0x01002000を、0xc0000014番地に0xc0000100を、0xc0000018番地に0x00000800をそれぞれ書き込み、次の画像処理対象の画像データをメインメモリ6からローカルメモリ3(または4)に対して転送するアドレス範囲を指定する。
次に、プロセッサ1は、nライン目のデータ転送と同時にDMAプロセッサ2が計算した最小値を0xc0000020番地から読み込んでおく。そして、プロセッサ1は、0xe0000004番地に1を書き込むことで、triggerイベントをDMAプロセッサ2に伝達し、DMAプロセッサ2のインストラクションメモリの2番地の「WAIT」命令によって一時停止していた命令の実行を3番地から再開する。
Next, the
図7は、DMAプロセッサ2の処理を示すフローチャートである。
FIG. 7 is a flowchart showing the processing of the
図7において、DMAプロセッサ2は、そのインストラクションメモリの3〜5番地で、画像処理の完了したn-1ライン目の画像データをローカルメモリ3(または4)からメインメモリ6に対して転送するアドレス範囲と転送サイズを得て、8〜9番地を転送サイズ分繰り返すことでデータ転送を行う(ステップS1)。
In FIG. 7, the
該処理が完了したら、DMAプロセッサ2は、インストラクションメモリの0xa〜0xc 番地で、n+1ライン目の画像処理対象の画像データをメインメモリ6からローカルメモリ3(または4)に対して転送するアドレス範囲を得て、0x10〜0x12番地を転送サイズ分繰り返すことでデータ転送と最小値の計算を行う(ステップS2)。
When the processing is completed, the
該処理も完了したら、DMAプロセッサ2は、インストラクションメモリの0x13番地で計算した最小値をローカルメモリ3(または4)の0xc0000020番地に書き込み、処理が完了した合図としてプロセッサ1に対してtriggerイベントを通知し、インストラクションメモリの0x15番地で2番地にジャンプし、次の転送指示が来るまで待つ(ステップS3)。
When the processing is completed, the
DMAプロセッサ2が上記の処理を実行している間、プロセッサ1は、まず、DMAプロセッサ2が計算したnライン目の画像データの最小値を調べる。最小値が0xf0以上であった場合には、プロセッサ1は、nラインは全部白一色のラインであると判断し、ローカルメモリ3(または4)の0xc0002900〜0xc0002a00番地に判断結果を書き込む。最小値が0xf0より小さかった場合には、プロセッサ1は、ローカルメモリ3(または4)の0xc0002100〜0xc00028ffのnライン目の画像データを読み込み、上記誤差拡散法による画像処理を行い、ローカルメモリ3(または4)の0xc0002900〜0xc0002a00番地に画像処理結果を書き込む。
While the
プロセッサ1は、上記の画像処理が完了した後、DMAプロセッサインタフェース7のtrigger statusレジスタである0xe0000008番地を読み込む。プロセッサ1は、0が読み込めた場合には1が読み込めるようになるまで待ち、1が読み込めた場合には0xe0000008番地に0を書き込んでtriggerイベントをクリアし、nライン目の処理を完了とする。
The
プロセッサ1は、以上のような処理を画像データの縦1536ライン分について行い、最終的に横2048ピクセル及び縦1536ピクセルからなる画像データの画像処理を完了する。
The
以上説明したように、本実施の形態によれば、プロセッサ1は、DMAプロセッサ用の複数の命令列の中から、対象とする画像処理の種類に応じた命令を選択し、DMAプロセッサ2のインストラクションメモリに書き込みを行い、画像処理を開始する。DMAプロセッサ2は、プロセッサ1の画像処理と時間的に並列に、メインメモリ6から画像処理対象の画像データを幾つかに分割したうちのひとかたまりをローカルメモリ3(または4)に転送し、ローカルメモリ上の画像処理済みの画像データをメインメモリ6に転送する。プロセッサ1は、DMAプロセッサ2が行った補佐的な処理を利用しながらローカルメモリ上の画像データに対して画像処理を行う。
As described above, according to the present embodiment, the
これにより、従来のように専用機能を有するハードウェアを追加しなくとも(同一のハードウェア構成を用いながら)、DMAプロセッサ2が、プロセッサ側の複数の画像処理の内容それぞれに適したDMA転送と、プロセッサ側の画像処理を補佐する処理を行うことができ、画像処理の高速化と処理内容の柔軟性を実現することが可能となる。
As a result, the
[第2の実施の形態]
本発明の第2の実施の形態は、上述した第1の実施の形態に対して、画像処理対象の画像データ及びDMAプロセッサ2の動作が下記の点において相違する。本実施の形態のその他の要素は、上述した第1の実施の形態(図1〜図3)の対応するものと同一なので、説明を省略する。
[Second Embodiment]
The second embodiment of the present invention is different from the first embodiment described above in the image data to be processed and the operation of the
次に、上記構成を有する本実施の形態のデータ処理装置の画像処理における動作例を図8乃至図11を参照しながら説明する。 Next, an operation example in image processing of the data processing apparatus according to the present embodiment having the above-described configuration will be described with reference to FIGS.
図8は、画像処理の対象となる画像データを示す図である。 FIG. 8 is a diagram showing image data to be subjected to image processing.
図8において、画像データは、横2048ピクセル、縦1536ピクセルから構成されている。1ピクセルはRGB各色256階調の3バイトで構成されており、メインメモリ6上には1バイトずつRGBRGBRGB・・・という順番で存在している。プロセッサ1は、画像データの横2048ピクセルの1ライン6Kbytes単位に分割し、誤差拡散法によって二値画像に変換する画像処理を行う。
In FIG. 8, the image data is composed of 2048 pixels wide and 1536 pixels vertically. One pixel is composed of 3 bytes of 256 tones for each color of RGB, and exists on the
図9及び図10は、DMAプロセッサ用プログラムを示す図である。 9 and 10 are diagrams showing a DMA processor program.
図9及び図10において、DMAプロセッサ用プログラムは、DMAプロセッサ2上で動作し、図11のフローチャートに示す処理を実行する。尚、DMAプロセッサ用プログラムは、図示の都合上、図9及び図10に分割して図示している。
9 and 10, the DMA processor program runs on the
図11は、DMAプロセッサ2の処理を示すフローチャートである。
FIG. 11 is a flowchart showing the processing of the
図11において、DMAプロセッサ2は、画像処理対象が図8に示す画像データである場合に、プロセッサ1の画像処理を補佐するために、メインメモリ及びローカルメモリ間のデータ転送を行う(ステップS11)。これと同時に、DMAプロセッサ2は、RGBの各色データ毎の最小値の計算を行い(ステップS12)、1ピクセル3バイト単位のものに対して3バイトおきに1バイトの空きをつくり、1ピクセル4バイト単位の形式に変換する(ステップS13)。
In FIG. 11, when the image processing target is the image data shown in FIG. 8, the
プロセッサ1が、第1の実施の形態と同様に、DMAプロセッサ用プログラムをDMAプロセッサインタフェース7を用いてDMAプロセッサ2のインストラクションメモリに書き込むことで、DMAプロセッサ2は上記の動作を開始することができる。
As in the first embodiment, the
以上説明したように、本実施の形態によれば、第1の実施の形態と同様に、従来のように専用機能を有するハードウェアを追加しなくとも(同一のハードウェア構成を用いながら)、DMAプロセッサ2が、プロセッサ側の複数の画像処理の内容それぞれに適したDMA転送と、プロセッサ側の画像処理を補佐する処理を行うことができ、画像処理の高速化と処理内容の柔軟性を実現することが可能となる。
As described above, according to the present embodiment, similarly to the first embodiment, it is possible to add hardware having a dedicated function as in the past (using the same hardware configuration). The
[他の実施の形態]
上記第1及び第2の実施の形態では、図1に示す構成を有するデータ処理装置単体について説明したが、本発明は、データ処理装置単体のみへの適用に限定されるものではなく、データ処理装置を搭載した各種の画像形成装置(プリンタ、複写機、複合機、ファクシミリ等)に適用することができる。
[Other embodiments]
In the first and second embodiments, the single data processing apparatus having the configuration shown in FIG. 1 has been described. However, the present invention is not limited to application only to the single data processing apparatus. The present invention can be applied to various image forming apparatuses (printers, copiers, multifunction machines, facsimiles, etc.) equipped with the apparatus.
上記第1及び第2の実施の形態では、DMAプロセッサ2にDMAプロセッサインタフェース7を接続した構成を例に挙げたが、本発明は、これに限定されるものではなく、DMAプロセッサ2にDMAプロセッサインタフェースの機能を内蔵する構成としてもよい。
In the first and second embodiments, the configuration in which the DMA processor interface 7 is connected to the
本発明は、上述した実施の形態の機能を実現するソフトウェアのプログラム(図7、図11のフローチャート)をコンピュータ又はCPUに供給し、そのコンピュータ又はCPUが該供給されたプログラムを読出して実行することによって、達成することができる。 The present invention supplies a software program (flowcharts in FIGS. 7 and 11) for realizing the functions of the above-described embodiments to a computer or CPU, and the computer or CPU reads and executes the supplied program. Can be achieved.
この場合、上記プログラムは、該プログラムを記録した記憶媒体から直接供給されるか、又はインターネット、商用ネットワーク、若しくはローカルエリアネットワーク等に接続される不図示の他のコンピュータやデータベース等からダウンロードすることにより供給される。 In this case, the program is directly supplied from a storage medium storing the program, or downloaded from another computer or database (not shown) connected to the Internet, a commercial network, a local area network, or the like. Supplied.
上記プログラムの形態は、オブジェクトコード、インタプリタにより実行されるプログラムコード、OS(オペレーティングシステム)に供給されるスクリプトデータ等の形態から成ってもよい。 The form of the program may be in the form of object code, program code executed by an interpreter, script data supplied to an OS (operating system), and the like.
また、本発明は、上述した実施の形態の機能を実現するソフトウェアのプログラムを記憶した記憶媒体をコンピュータ又はCPUに供給し、そのコンピュータ又はCPUが記憶媒体に記憶されたプログラムを読出して実行することによっても、達成することができる。 The present invention also supplies a computer or CPU with a storage medium storing a software program that implements the functions of the above-described embodiments, and the computer or CPU reads and executes the program stored in the storage medium. Can also be achieved.
この場合、格納媒体から読出されたプログラムコード自体が上述した各実施の形態の機能を実現すると共に、そのプログラムコードを記憶した記憶媒体は本発明を構成する。 In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention.
プログラムコードを記憶する記憶媒体としては、例えば、ROM、RAM、NV−RAM、フロッピー(登録商標)ディスク、ハードディスク、光ディスク(登録商標)、光磁気ディスク、CD−ROM、MO、CD−R、CD−RW、DVD−ROM、DVD−RAM、DVD−RW、DVD+RW、磁気テープ、不揮発性のメモリカード等がある。 As a storage medium for storing the program code, for example, ROM, RAM, NV-RAM, floppy (registered trademark) disk, hard disk, optical disk (registered trademark), magneto-optical disk, CD-ROM, MO, CD-R, CD -RW, DVD-ROM, DVD-RAM, DVD-RW, DVD + RW, magnetic tape, nonvolatile memory card, etc.
上述した実施の形態の機能は、コンピュータから読出されたプログラムコードを実行することによるばかりでなく、コンピュータ上で稼動するOS等がプログラムコードの指示に基づいて実際の処理の一部又は全部を行うことによっても実現することができる。 The function of the above-described embodiment is not only by executing the program code read from the computer, but the OS or the like running on the computer performs part or all of the actual processing based on the instruction of the program code. Can also be realized.
1 プロセッサ
2 DMAプロセッサ
3、4 ローカルメモリ
6 メインメモリ
7 DMAプロセッサインタフェース
1 processor <br/> 2 DMA processor <br/> 3, 4
Claims (13)
前記保持手段の保持する命令列の解釈に従って、前記画像処理手段が行う画像処理と時間的に並列に、第1の記憶手段に記憶された画像処理対象の画像データの一部から前記画像処理手段の画像処理の内容を決定する値を取得し、前記画像データの一部と前記値とを第2の記憶手段に転送する転送手段とを備えることを特徴とするデータ転送制御装置。 Holding means for holding instruction string which is output from the image processing unit,
Accordance interpretation of the instruction sequence to retain the holding means, said image processing image processing temporally parallel to means performs the said image processing means from a portion of the image data of the stored image processing target in the first storage means image processing Gets a value that determines the contents of the data transfer control device, characterized in that it comprises a transfer means for transferring said value as part of the image data in the second storage means.
前記転送手段は、前記第1の記憶手段が保持する画像処理対象の画像データを所定単位ごとに分割しながら前記第2の記憶手段に転送し、 The transfer means transfers the image processing target image data held by the first storage means to the second storage means while dividing the image data into predetermined units,
前記転送手段は、所定単位ごとに前記画像処理手段の画像処理の内容を決定する値を取得して前記第2の記憶手段に転送することを特徴とする請求項1乃至3のいずれか1項に記載のデータ転送制御装置。 4. The transfer device according to claim 1, wherein the transfer unit acquires a value that determines the content of the image processing of the image processing unit for each predetermined unit and transfers the acquired value to the second storage unit. 5. The data transfer control device according to 1.
前記画像処理手段は、前記転送手段により取得した前記値に応じて決定される画像処理を、前記転送手段が前記第2の記憶手段へ転送した画像データの一部に実行することを特徴とするデータ処理装置。 Comprising the data transfer control device as defined in any one of 請 Motomeko 1 to 8, said image processing means, said first memory means and said second storage means,
The image processing unit executes image processing determined according to the value acquired by the transfer unit, on a part of the image data transferred by the transfer unit to the second storage unit. Data processing device.
前記画像処理手段は、前記値が分割した画像データが白一色であることを示す場合に2値化処理を簡略化することを特徴とする請求項9又は10に記載のデータ処理装置。 11. The data processing apparatus according to claim 9, wherein the image processing means simplifies the binarization processing when the image data obtained by dividing the value indicates that the color is white.
前記保持手段の保持する命令列の解釈に従って、前記画像処理手段が行う画像処理と時間的に並列に、第1の記憶手段に記憶された画像処理対象の画像データを分割し、前記分割した画像データから前記画像処理手段の画像処理の内容を決定する値を取得し、前記分割した画像データと前記値とを第2の記憶手段に転送する転送工程を備えることを特徴とする制御方法。 A control method for a data transfer control device having holding means for holding a command sequence output from an image processing means ,
Accordance interpretation of the instruction sequence to retain the holding means, said image processing image processing temporally parallel to means performs, the image data of the first image processing which is stored in the storage means is divided, the divided images Gets a value that determines the contents of the image processing of the image processing unit from the data, wherein the to that control method further comprising a transfer step of transferring the said value and the divided image data in the second storage means .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004170292A JP4845351B2 (en) | 2004-06-08 | 2004-06-08 | Data transfer control device, data processing device, and control method for data transfer control device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004170292A JP4845351B2 (en) | 2004-06-08 | 2004-06-08 | Data transfer control device, data processing device, and control method for data transfer control device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2005352592A JP2005352592A (en) | 2005-12-22 |
| JP4845351B2 true JP4845351B2 (en) | 2011-12-28 |
Family
ID=35587051
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2004170292A Expired - Fee Related JP4845351B2 (en) | 2004-06-08 | 2004-06-08 | Data transfer control device, data processing device, and control method for data transfer control device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4845351B2 (en) |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3492761B2 (en) * | 1994-04-07 | 2004-02-03 | 株式会社ソニー・コンピュータエンタテインメント | Image generation method and apparatus |
| JPH0981720A (en) * | 1995-09-11 | 1997-03-28 | Toshiba Corp | Image processing device |
| JPH11120119A (en) * | 1997-10-16 | 1999-04-30 | Mitsubishi Electric Corp | Information transfer device with arithmetic function |
| JP3781634B2 (en) * | 2001-04-26 | 2006-05-31 | シャープ株式会社 | Image processing apparatus, image processing method, and portable video device |
| JP3790703B2 (en) * | 2001-11-30 | 2006-06-28 | 株式会社東芝 | Display control apparatus and display control method |
| JP2003316714A (en) * | 2002-04-19 | 2003-11-07 | Canon Inc | Apparatus and method for information processing |
-
2004
- 2004-06-08 JP JP2004170292A patent/JP4845351B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2005352592A (en) | 2005-12-22 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3289661B2 (en) | Cache memory system | |
| US11269796B2 (en) | Acceleration control system based on binarization algorithm, chip, and robot | |
| US7659904B2 (en) | System and method for processing high priority data elements | |
| JP2000181857A (en) | Method and device for implementing direct access transfer related to nonsequential address designable storage place | |
| US6927776B2 (en) | Data transfer device and method | |
| US6563505B1 (en) | Method and apparatus for executing commands in a graphics controller chip | |
| JP4845351B2 (en) | Data transfer control device, data processing device, and control method for data transfer control device | |
| JP7081477B2 (en) | Image processing device, control method of image processing device, and program | |
| US10977184B2 (en) | Managing memory access for convolutional neural networks | |
| US20050275665A1 (en) | System and method for efficiently supporting image rotation modes by utilizing a display controller | |
| JP2000163313A (en) | Program read control device and system | |
| JP4350470B2 (en) | Image processing apparatus, image processing method, and program | |
| JPH10149312A (en) | How to use video memory | |
| US6950201B2 (en) | Generating images quickly in raster image processing | |
| JP4612352B2 (en) | Labeling processing apparatus and labeling processing method | |
| JP2000293151A (en) | Graphics display device and graphics display method by means of display list | |
| JPH05250258A (en) | Cache control method | |
| JP4835872B2 (en) | Image processing device | |
| JPH11115258A (en) | Output control device and method | |
| JP2962209B2 (en) | In-circuit emulator | |
| JP2007185911A (en) | Printer controller and printer | |
| JPH0877367A (en) | Image processor and image data processing device using the same | |
| JP2009147439A (en) | Image forming apparatus | |
| JPH08292914A (en) | Data processing apparatus and method | |
| JP2006146368A (en) | Program writing apparatus, information processor, control method and control program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20060418 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070607 |
|
| RD05 | Notification of revocation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7425 Effective date: 20070626 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100323 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100330 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100527 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110217 |
|
| 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: 20111004 |
|
| 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: 20111011 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20141021 Year of fee payment: 3 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 4845351 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20141021 Year of fee payment: 3 |
|
| LAPS | Cancellation because of no payment of annual fees |