Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0668760B2 - DMA controller for image editing device - Google Patents
[go: Go Back, main page]

JPH0668760B2 - DMA controller for image editing device - Google Patents

DMA controller for image editing device

Info

Publication number
JPH0668760B2
JPH0668760B2 JP61196934A JP19693486A JPH0668760B2 JP H0668760 B2 JPH0668760 B2 JP H0668760B2 JP 61196934 A JP61196934 A JP 61196934A JP 19693486 A JP19693486 A JP 19693486A JP H0668760 B2 JPH0668760 B2 JP H0668760B2
Authority
JP
Japan
Prior art keywords
transfer
address
register
image
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP61196934A
Other languages
Japanese (ja)
Other versions
JPS6353681A (en
Inventor
淳一 大住
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP61196934A priority Critical patent/JPH0668760B2/en
Publication of JPS6353681A publication Critical patent/JPS6353681A/en
Publication of JPH0668760B2 publication Critical patent/JPH0668760B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Input (AREA)
  • Bus Control (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデジタル的に画像を合成、切り出し、回転、拡
大/縮小等を行う画像編集装置において、簡単な構成で
メモリデータの転送の高速化を図る画像編集装置用DM
Aコントローラに関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial field of application] The present invention relates to an image editing apparatus for digitally synthesizing, cutting out, rotating, enlarging / reducing images, etc., and speeding up the transfer of memory data with a simple configuration. For image editing equipment
Regarding the A controller.

〔従来の技術〕[Conventional technology]

従来の画像編集装置用DMAコントローラとして、例え
ば、情報処理学会第23回(昭和56年後期)全国大会の
「文書管理システムにおける文書イメージ処理方式」に
発表されたものがある。第9図はこのDMAコントロー
ラを示し、ホストCPU(図示せず)からのコマンドに
よってDMAコントローラの動作を決定して各部を制御
する制御回路1と、転送元および転送先の各アドレスを
セットするアドレスカウンタ31、32と、転送元および転
送先の各データ間隔(データの切り出し領域の1つのラ
インの最終ワードのアドレスから次ラインの先頭ワード
のアドレスまでのアドレス間隔)をセットするデータ間
隔レジスタ33、34と、転送元のアドレス計算を実施する
演算装置(ALU)37と、転送先のアドレス計算を実施
するALU38と、アドレスカウンタ31、32へアドレスを
セットするマルチプレクサ35、36と、転送ワード数をセ
ットするワードレジスタ11、13と、前記ワードレジスタ
11、13にセットされたワード数をロードして減算カウン
トするワードカウンタ12、14と、アドレスカウンタ31又
は、アドレスカウンタ32の内容をロードするメモリアド
レスレジスタ9(MAR)と、ホストCPUからコマン
ド、アドレス、カウント値等をDMAコントローラへ設
定する際に使用する制御データバス15と、MAR9のア
ドレスを画像メモリへ出力するアドレスバス16と、画像
メモリ17を有している。
As a conventional DMA controller for an image editing apparatus, there is, for example, one announced in "Document Image Processing Method in Document Management System" at the 23rd National Convention of Information Processing Society (late 1981). FIG. 9 shows this DMA controller. The control circuit 1 determines the operation of the DMA controller according to a command from a host CPU (not shown) and controls each unit, and the address for setting each address of the transfer source and the transfer destination. A data interval register 33 for setting the counters 31 and 32 and each data interval between the transfer source and the transfer destination (address interval from the address of the last word of one line of the data cutout area to the address of the first word of the next line) 34, an arithmetic unit (ALU) 37 for calculating the address of the transfer source, an ALU 38 for calculating the address of the transfer destination, multiplexers 35, 36 for setting addresses to the address counters 31, 32, and the number of transfer words. Word registers 11 and 13 to be set, and the word register
Word counters 12 and 14 that load the number of words set in 11 and 13 and count down, a memory address register 9 (MAR) that loads the contents of the address counter 31 or the address counter 32, a command from the host CPU, It has a control data bus 15 used for setting an address, a count value and the like to the DMA controller, an address bus 16 for outputting the address of the MAR 9 to an image memory, and an image memory 17.

以上の構成において、第10図(イ)の転送元のメモリ17a
(N×M)の矩形領域(W×H)を切り出して第10
図(ロ)の転送先のメモリ17b(N×M)へ転送する場
合を例にして作用を説明する。
In the above configuration, the transfer source memory 17a in FIG.
The (N 1 × M 1 ) rectangular area (W × H) is cut out and
The operation will be described by taking as an example the case of transferring to the transfer destination memory 17b (N 2 × M 2 ) in FIG.

まず初期値として次の6つのパラメータを指定する。First, the following six parameters are designated as initial values.

a)転送元スタートアドレス(S:3N+2) b)転送元データ間隔(I=N−W) c)転送先スタートアドレス(S:5N+5) d)転送元データ間隔(I=N−W) e)矩形領域の横ワード数(W) f)矩形領域の縦ワード数(H) パラメータは次の手順で設定される。転送元スタートア
ドレスS(3N+2)はマルチプレクサ35を介してアド
レスカウンタ31へセットされ、転送先スタートアドレス
(5N+5)はマルチプレクサ36を介してアドレスカ
ウンタ32へセットされる。転送元データ間隔Iがデー
タ間隔レジスタ33へ、転送先データ間隔Iがデータ間
隔レジスタ34へそれぞれセットされる。さらに画像の切
り出し幅Wがワードレジスタ11へ、画像の縦方向のライ
ン数Hがワードレジスタ13へセットされる。
a) the source start address (S 1: 3N + 2) b) the source data interval (I 1 = N 1 -W) c) destination start address (S 2: 5N + 5) d) the source data interval (I 2 = N 2- W) e) Number of horizontal words in rectangular area (W) f) Number of vertical words in rectangular area (H) Parameter is set by the following procedure. The transfer source start address S 1 (3N + 2) is set in the address counter 31 via the multiplexer 35, and the transfer destination start address S 2 (5N + 5) is set in the address counter 32 via the multiplexer 36. The transfer source data interval I 1 is set in the data interval register 33, and the transfer destination data interval I 2 is set in the data interval register 34. Further, the cutout width W of the image is set in the word register 11, and the number H of lines in the vertical direction of the image is set in the word register 13.

次に、CPUが制御回路1に転送モードを指定するコマ
ンドコードを送る。コマンドコードを受けた制御回路1
はDMA転送を開始する。手順は次のようになる。まず
ワードレジスタ11の内容W(切り出し幅)をワードカウ
ンタ12へロードし、ワードレジスタ13の内容H(縦のラ
イン数)をワードカウンタ14へロードする。アドレスカ
ウンタ31の内容(3N+2)をMAR9へロードし、メ
モリ17aをリードすると同時にアドレスカウンタ31(3
N+2)に+1をする。
Next, the CPU sends a command code designating the transfer mode to the control circuit 1. Control circuit 1 that received the command code
Starts a DMA transfer. The procedure is as follows. First, the content W (cutout width) of the word register 11 is loaded into the word counter 12, and the content H (vertical line number) of the word register 13 is loaded into the word counter 14. The content (3N + 2) of the address counter 31 is loaded into the MAR 9, and the memory 17a is read, and at the same time, the address counter 31 (3
Add +1 to N + 2).

リードデータはデータレジスタ(図示せず)に一時記録
する。更にワードカウンタ12の内容Wを−1する。次に
アドレスカウンタ32の内容(5N+5)をMAR9へロ
ードし、メモリレジスタの内容をメモリ17aへライトす
ると同時にアドレスカウンタ32(5N+5)を+1す
る。更にワードカウンタ12の出力が0かどうか判断す
る。0でないならば、もう一度アドレスカウンタ31の内
容(3N+3)をMAR9へロードし、操作を繰り返
す。ここでワードカウンタ12の内容が0であれば、換言
すれば1ラインの転送が終了していれば、ワードカウン
タ14の内容Hを−1する。ここでワードカウンタ14の内
容が0かどうか、全てのラインの転送が終了したかどう
か判定する。0でないならば、ALU37でアドレスカウ
ンタ31の内容(最初のラインの転送が終了した時点で3
N+5になっている)にデータ間隔レジスタ33の内容
(I)を加えて、マルチプレクサ35を介してアドレス
カウンタ31へセットする。同時にALU38でアドレスカ
ウンタ32の内容(この時点で5N+8)にデータ間隔レ
ジスタ34の内容(I)を加えて、マルチプレクサ36を
介してアドレスカウンタ32へセットする。
The read data is temporarily recorded in a data register (not shown). Further, the content W of the word counter 12 is decremented by one. Next, the content (5N + 5) of the address counter 32 is loaded into the MAR 9, the content of the memory register is written to the memory 17a, and at the same time, the address counter 32 (5N + 5) is incremented by one. Further, it is judged whether the output of the word counter 12 is 0 or not. If it is not 0, the content (3N + 3) of the address counter 31 is loaded into the MAR 9 again and the operation is repeated. If the content of the word counter 12 is 0, in other words, if the transfer of one line is completed, the content H of the word counter 14 is decremented by -1. Here, it is determined whether or not the content of the word counter 14 is 0, and whether or not the transfer of all lines is completed. If not 0, the contents of the address counter 31 in the ALU 37 (3 when the transfer of the first line is completed)
The content (I 1 ) of the data interval register 33 is added to (N + 5) and set in the address counter 31 via the multiplexer 35. At the same time, the contents (I 2 ) of the data interval register 34 are added to the contents of the address counter 32 (5N + 8 at this point) in the ALU 38, and the contents are set in the address counter 32 via the multiplexer 36.

この計算によって、アドレスカウンタ31とアドレスカウ
ンタ32には、それぞれ転送元、転送先の矩形領域の次の
ラインの先頭アドレスがセットされる。次のラインの先
頭アドレスがセットされるともう一度アドレスカウンタ
31(この次点で4N+2となっている)の内容をMAR
9へロードし、同様の操作を繰り返す。この操作の繰り
返しによってワードカウンタ14が0になると、いいかえ
ると全てのラインの処理が終了すると、転送操作を終了
する。
By this calculation, the start addresses of the lines next to the transfer source and transfer destination rectangular areas are set in the address counter 31 and the address counter 32, respectively. Address counter is set again when the start address of the next line is set
MAR of 31 (4N + 2 at this runner-up)
Load 9 and repeat the same operation. When the word counter 14 becomes 0 by repeating this operation, in other words, when the processing of all lines is completed, the transfer operation is ended.

このDMAコントローラでは、データ間隔レジスタを設
けているので、横方向アクセスだけでなく縦方向アクセ
ス又は両方を組み合せたアクセスが可能になり、また、
CPUによってメモリアクセスを行う方式に比較すると
メモリアクセスの高速化が図れる。
Since this DMA controller is provided with the data interval register, not only horizontal access but also vertical access or a combination of both access is possible.
The speed of memory access can be increased as compared with the method of performing memory access by the CPU.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

しかし、従来の画像編集装置用DMAコントローラによ
れば、転送元、転送先のアドレス計算を別回路で行って
いるため、ハード構成が複雑であり、切り出し領域の大
きさが変る度にデータ間隔が変化するため、その値を設
定しなければならないと言う不都合がある。また、水平
方向のアドレス計算をカウンタで行っているため、例え
ば、このカウンタにカウントアップカウンタを使用する
とアドレスが減少する方向でアクセスが行えず、更に、
カウントダウンカウンタを使用するとアドレスが増加す
る方向でのアクセスが行えないと言う不都合がある。更
に、1ラインごとにデータ転送をするため、拡大縮小等
の画像編集時間を短縮するのに限界があると言う欠点が
あった。
However, according to the conventional DMA controller for an image editing apparatus, since the address calculation of the transfer source and the transfer destination is performed by a separate circuit, the hardware configuration is complicated, and the data interval is changed every time the size of the cutout area changes. Since it changes, there is the inconvenience that the value must be set. Further, since the horizontal address calculation is performed by the counter, if a count-up counter is used for this counter, access cannot be performed in the direction in which the address decreases, and
The use of the countdown counter has a disadvantage that access cannot be performed in the direction of increasing addresses. Further, since data is transferred line by line, there is a drawback that there is a limit in shortening image editing time such as enlargement / reduction.

〔問題を解決するための手段〕[Means for solving problems]

本発明は上記に鑑みてなされたものであり、転送元,転
送先画像メモリの一方向のワード数を記憶した第1の記
憶手段と、画像データの転送元,及び転送先の転送ライ
ンの次の転送ラインの先頭アドレスを保持する第1のレ
ジスタと、転送する画像データの転送元,及び転送先の
転送アドレスを保持する第2のレジスタと、転送ライン
の先頭アドレスに一方向のワード数を加算,或いは減算
することにより次の転送ラインの先頭アドレスを求めて
第1のレジスタに保持させる第1の演算手段と、転送中
の画像データの転送元,及び転送先の転送アドレスに1
を加算,或いは減算することにより次に転送する転送ア
ドレスを求めて第2のレジスタに保持させる第2の演算
を行う演算手段と、第2のレジスタに保持される転送ア
ドレスに基づいて転送元の画像メモリ,及び転送先の画
像メモリをアクセスする制御手段を備えた画像編集装置
用DMAコントローラを提供するものである。
The present invention has been made in view of the above, and is provided next to the first storage unit that stores the number of words in one direction of the transfer source and transfer destination image memories, the transfer source of image data, and the transfer line of the transfer destination. First register for holding the start address of the transfer line, a second register for holding the transfer address of the transfer source and the transfer destination of the image data to be transferred, and the number of words in one direction for the start address of the transfer line. First arithmetic means for obtaining the start address of the next transfer line by addition or subtraction and holding it in the first register, and 1 for the transfer address of the transfer source and transfer destination of the image data being transferred.
Is added or subtracted to obtain a transfer address to be transferred next, and a calculation means for performing a second calculation to hold the transfer address in the second register; and a transfer source of the transfer source based on the transfer address held in the second register The present invention provides a DMA controller for an image editing apparatus, which includes an image memory and a control means for accessing the image memory of the transfer destination.

さらに、拡大縮小回路を並列に設けて並列処理すること
によって拡大縮小時間を短縮するために、複数ラインを
同時に高速DMA転送できるDMAコントローラを提供
するものである。
Further, the present invention provides a DMA controller capable of simultaneously performing high-speed DMA transfer of a plurality of lines in order to shorten the enlargement / reduction time by providing enlargement / reduction circuits in parallel and performing parallel processing.

以下、本発明の画像編集装置用DMAコントローラを説
明する。
The DMA controller for the image editing apparatus of the present invention will be described below.

〔実施例〕〔Example〕

第1図は本発明の第1の実施例を示すものである。本実
施例はホストCPU(図示せず)からのコマンドによっ
てDMAコントローラの動作を決定し各部を制御する制
御回路1と、画像メモリ上の横幅(第2図(イ)ではNに
相当する)を設定するMAPレジスタ(Memory Address Pi
tchレジスタ)2と、転送元および転送先のアドレス計
算をするALU10と、前記ALU10へゼロを入力するた
めのゼロドライバー3と、後述するアドレスをセットす
るためのアドレスレジスタ5〜8と、前記アドレスレジ
スタ5〜8へCPUからのアドレス情報をセットするゲ
ート4と、前記アドレスレジスタ5〜8のいずれかの情
報をアドレスバス16へ出力する際にロードするメモリア
ドレスレジスタ(MAR)9と、切り出し領域の横およ
び縦の転送ワード数をセットするワードレジスタ11及び
13と、前記ワードレジスタ11及びワードレジスタ13にセ
ットされた値をロードして減算カウントし、カウント値
が0になったか、ならないかを制御回路へ出力するワー
ドカウンタ12及び14と、ホストCPUからコマンド、ア
ドレス、カウント値等をDMAコントローラへ設定する
際に使用する制御データバス15(通常のデータバスと共
通にしてもよい)と、画像メモリ17を有する。前述した
ALU10の動作はインストラクションによって、クリア
ー、B+A、B−A等の演算を行う。即ち、A入力、キ
ャリー入力の制御によって最低次の演算が可能となって
いる。クリアー、−1、−MAP、+0、+
MAP、+1、これらは全て同一サイクルで行うこと
が可能であり、これによって画像編集の際に必要な全て
のアクセス方法が可能である。ALU10のBポートへの
アドレス入力はゲート4、アドレスレジスタ5〜8のい
ずれからも可能である。ALU10の出力は、アドレスレ
ジスタ5〜8のどれかにロードされる。
FIG. 1 shows a first embodiment of the present invention. In this embodiment, the control circuit 1 for controlling the operation of the DMA controller by controlling the operation of the DMA controller by a command from the host CPU (not shown) and the width on the image memory (corresponding to N in FIG. 2A) are set. MAP register to be set (Memory Address Pi
tch register) 2, ALU 10 for calculating source and destination addresses, zero driver 3 for inputting zero to the ALU 10, address registers 5-8 for setting an address described later, and the address A gate 4 for setting address information from the CPU in the registers 5-8, a memory address register (MAR) 9 for loading any of the information in the address registers 5-8 to the address bus 16, and a cutout area. Word register 11 for setting the number of horizontal and vertical transfer words of
13, the word register 11 and the word counters 12 and 14 for loading the values set in the word register 13 to perform subtraction counting and outputting to the control circuit whether or not the count value becomes 0, and from the host CPU It has a control data bus 15 (which may be common with a normal data bus) used when setting a command, an address, a count value, etc. in the DMA controller, and an image memory 17. The above-mentioned operation of the ALU 10 performs operations such as clear, B + A, B-A, etc. by instructions. That is, the lowest order calculation is possible by controlling the A input and the carry input. Clear, -1, -MAP, +0, +
MAP and +1 can be all performed in the same cycle, which enables all access methods necessary for image editing. An address can be input to the B port of the ALU 10 from any of the gate 4 and the address registers 5-8. The output of ALU 10 is loaded into any of address registers 5-8.

以上の構成において、第3図のフローチャートにより、
画像を切り出して別のメモリ領域に転送する場合を例に
動作を説明する。第2図(イ)の矩形領域の切り出しを例
とする。まず、転送元のスタートアドレスをアドレスレ
ジスタ5に、転送先のスタートアドレスをアドレスカウ
ンタ7にロードする。この場合データの流れは、データ
バス15からゲート4を通り、ALU10で+0の演算を受
け、アドレスレジスタ5、7に入力される。第2図の例
ではアドレスレジスタ5には2N+2が入り、アドレス
レジスタ7には10N+5(転送先スタートアドレス)が
入る。次に画像の切り出し幅(第2図(イ)では4)をワ
ードレジスタ11に、画像の縦方向のライン数(第2図
(イ)では5)をワードレジスタ13に設定する。次にCP
UはDMAコントローラの制御回路1に転送モードを指
定するコマンドコードを送る。コマンドコードを受けた
制御回路1はDMA転送を開始する。
With the above configuration, according to the flowchart of FIG.
The operation will be described by taking as an example the case where an image is cut out and transferred to another memory area. The cutout of the rectangular area in FIG. 2A is taken as an example. First, the start address of the transfer source is loaded into the address register 5, and the start address of the transfer destination is loaded into the address counter 7. In this case, the data flow passes from the data bus 15 through the gate 4 and is subjected to +0 operation by the ALU 10 and input to the address registers 5 and 7. In the example of FIG. 2, 2N + 2 is stored in the address register 5 and 10N + 5 (transfer destination start address) is stored in the address register 7. Next, the cut-out width of the image (4 in FIG. 2A) is stored in the word register 11 and the number of lines in the vertical direction of the image (see FIG. 2).
In (a), 5) is set in the word register 13. Next CP
U sends a command code designating the transfer mode to the control circuit 1 of the DMA controller. The control circuit 1 receiving the command code starts the DMA transfer.

まず、最初に、ワードレジスタ13の内容(5)をワードカ
ウンタ14へロードし、ワードレジスタ11の内容(4)をワ
ードカウンタ12へロードする。先頭アドレス2N+2を
アドレスレジスタ5からアドレスレジスタ6へ転送し、
ALU10でアドレスレジスタ5とMAPを計算し(ここ
では2N+2とN)、次のラインの先頭アドレス3N+
2としてアドレスレジスタ5へセットする。転送先の先
頭アドレス10N+5をアドレスレジスタ7からアドレス
レジスタ8へ転送し、ALU10でアドレスレジスタ7と
MAP(ここでは10N+5とN)を計算し、転送先の次
のラインの先頭アドレス11N+5をアドレスレジスタ7
へセットする。次にアドレスレジスタ6の内容をMAR
9へロードし、メモリをリードし、データレジスタ(図
示せず)に一時記録する。同時にALU10でアドレスレ
ジスタ6の内容に+1を行い、アドレスレジスタ6へセ
ットする。この時点でアドレスレジスタ6の内容は2N
+3となり、次のアドレスがセットされたことになる。
更にワードカウンタ12の内容を−1とする。次にアドレ
スレジスタ8の内容をMAR9へロードし、メモリにデ
ータレジスタの内容をライトすると同時にALU10でア
ドレスレジスタ8の内容に+1を行いアドレスレジスタ
8へセットする。この時点でアドレスレジスタ8の内容
は10N+6となり、次の転送先のアドレスがセットされ
たことになる。ここでワードカウンタ12の出力が0かど
うか判定する。0であれば矩形領域の横ワード数分の転
送(第2図(イ)では4)を行ったことになるので、1ラ
インの転送終了となる。一方、0でなければ、1ライン
の転送が終了していないので、アドレスレジスタ6の内
容(2N+3)をMAR9へロードし、メモリをリード
し、データレジスタに一時記録し、操作をくり返す。ワ
ードカウンタ12の出力が0になって1ラインの転送が終
了したら、ワードカウンタ14の内容を−1し、出力が0
かどうか判定する。0ならば矩形領域の縦のライン数
(第2図(イ)では5)を転送したことになり、操作を終
了する。一方、0でなければワードレジスタ11の内容を
ワードカウンタ12へロードし、アドレスレジスタ5の内
容3N+2をアドレスレジスタ6へコピーし、操作を繰
り返す。
First, the content (5) of the word register 13 is loaded into the word counter 14, and the content (4) of the word register 11 is loaded into the word counter 12. Transfer the start address 2N + 2 from the address register 5 to the address register 6,
The address register 5 and MAP are calculated by the ALU 10 (here, 2N + 2 and N), and the head address 3N + of the next line is calculated.
2 is set in the address register 5. The start address 10N + 5 of the transfer destination is transferred from the address register 7 to the address register 8, the address register 7 and MAP (here, 10N + 5 and N) are calculated by the ALU 10, and the start address 11N + 5 of the next line of the transfer destination is set to the address register 7
Set to. Next, the contents of the address register 6 are MAR
9, the memory is read, and the data is temporarily recorded in a data register (not shown). At the same time, the contents of the address register 6 are incremented by 1 by the ALU 10 and set in the address register 6. At this point, the content of address register 6 is 2N
It becomes +3, which means that the next address is set.
Further, the content of the word counter 12 is set to -1. Next, the contents of the address register 8 are loaded into the MAR 9, the contents of the data register are written to the memory, and at the same time, the contents of the address register 8 are incremented by 1 by the ALU 10 and set in the address register 8. At this time, the content of the address register 8 becomes 10N + 6, and the address of the next transfer destination is set. Here, it is determined whether the output of the word counter 12 is 0 or not. If it is 0, it means that the transfer has been performed for the number of horizontal words in the rectangular area (4 in FIG. 2A), so the transfer of one line is completed. On the other hand, if it is not 0, since the transfer of one line is not completed, the content (2N + 3) of the address register 6 is loaded into the MAR 9, the memory is read, the data is temporarily recorded in the data register, and the operation is repeated. When the output of the word counter 12 becomes 0 and the transfer of one line is completed, the content of the word counter 14 is decremented by 1 and the output becomes 0.
Determine whether or not. If it is 0, it means that the number of vertical lines in the rectangular area (5 in FIG. 2A) has been transferred, and the operation ends. On the other hand, if it is not 0, the contents of the word register 11 are loaded into the word counter 12, the contents 3N + 2 of the address register 5 are copied to the address register 6, and the operation is repeated.

以上のように、本実施例では全てのアドレス計算をAL
U10で行っている。また本実施例では、アドレスを増加
する場合のアクセスを用いているが、アドレスが減少す
る場合もスタートアドレスの設定を変え、ALU10にお
いて−1の減算を行うことにより実施することができ
る。更に、MAPレジスタを2個設けることで、横幅
(N)の異なる画像メモリ間の転送も当然可能である。
As described above, in the present embodiment, all address calculation is AL
I am going to U10. Further, in the present embodiment, the access is used when the address is increased. However, when the address is decreased, the setting of the start address is changed and the ALU 10 can be subtracted by -1. Furthermore, by providing two MAP registers, transfer between image memories having different widths (N) is naturally possible.

第4図は本発明の第2の実施例を示し、転送する複数ラ
インのアドレスを設定するRAM18と、RAM18の出力
をラッチするラッチ回路19と、RAM18のアドレスを発
生するカウンタ20を有する。このカウンタ20は、クリ
ア、カウントアップ等が可能である。その他の構成につ
いては第1図と同様につき説明を省略する。
FIG. 4 shows a second embodiment of the present invention, which has a RAM 18 for setting the addresses of a plurality of lines to be transferred, a latch circuit 19 for latching the output of the RAM 18, and a counter 20 for generating the address of the RAM 18. The counter 20 can be cleared and counted up. The other configurations are similar to those in FIG. 1 and will not be described.

以上の構成において、ALU10の動作はインストラクシ
ョンによって、クリア、B+A、B−A、その他が指定
できる。即ち、A入力、キャリー入力の制御により、
クリア、−1、−MAP、+0、+MAP、
+1の演算ができる。これらは全て同一サイクルで行う
ことが可能であり、画像編集の際に必要な全てのアドレ
ス演算が可能である。ALU10のBポートへは、アドレ
スレジスタ5、アドレスレジスタ6及びRAM18のいず
れの内容も入力可能である。ALU10の出力はアドレス
レジスタ5、アドレスレジスタ6及びRAM18のいずれ
にも出力可能である。また、RAM18はカウンタ20で示
されたアドレスがアクセスされる。RAM18は拡大縮小
処理される並列ライン数以上のワード数を有する。ここ
で拡大縮小回路は16ラインの並列処理ができる構成にな
っているものとすると、RAM18は16ワードの容量を有
し、カウンタ20は4bitカウンタ(0〜15までカウント
可能)になっている。
In the above configuration, the operation of the ALU 10 can be designated as clear, B + A, BA, etc. by an instruction. That is, by controlling A input and carry input,
Clear, -1, -MAP, +0, + MAP,
+1 can be calculated. All of these can be performed in the same cycle, and all the address operations necessary for image editing can be performed. The contents of any of the address register 5, the address register 6 and the RAM 18 can be input to the B port of the ALU 10. The output of the ALU 10 can be output to any of the address register 5, the address register 6 and the RAM 18. Further, the RAM 18 is accessed at the address indicated by the counter 20. The RAM 18 has the number of words equal to or larger than the number of parallel lines to be scaled. Assuming that the enlargement / reduction circuit has a configuration capable of parallel processing of 16 lines, the RAM 18 has a capacity of 16 words, and the counter 20 is a 4-bit counter (countable from 0 to 15).

ラッチ回路19は通常トランスペアレントになっており、
RAM18にデータを書き込む時のみデータをラッチする
ものとする。これはRAM18のデータにアドレス演算を
行い再度RAM18に書き込む時、元のデータが変わるの
を防ぐ為である。
The latch circuit 19 is normally transparent,
It is assumed that the data is latched only when the data is written in the RAM 18. This is to prevent the original data from changing when the address of the data in the RAM 18 is calculated and the data is written in the RAM 18 again.

以上の構成において、矩形領域の画像データを間引いて
拡大縮小回路へDMA転送する場合を例に取って動作を
説明する。まず、カウンタ20をクリアしておき、原画の
スタートアドレスをCPUからDMAコントローラのア
ドレスレジスタ5へロードする。データの流れは、デー
タバス15からゲート4を通りALU10で+0の演算を受
けアドレスレジスタ5に入力される。次に、CPUは縮
小率からそのラインを間引くか否か判定し、間引かない
場合はA5の内容をRAM18へコピーする。ここでカウ
ンタ20を+1とする。次にアドレスレジスタ5の内容に
MAP2の内容を加算してアドレスレジスタ5へロード
する(ここでアドレスレジスタ5には次のラインの先頭
アドレスが入っていることになる)。そして、このライ
ン(Aアドレスレジスタの示すアドレス)を間引くか否
かを判定する。間引く場合は、アドレスレジスタ5の内
容をRAM18へコピーしないで、アドレスレジスタ5の
内容にMAP2の内容を加算してアドレスレジスタ5へ
ロードする。この手順をカウンタ20が0になるまでくり
返す。第5図(イ)は縮小処理の対象となる2N+2、3
N+2…のラインを示し、第6図のフローチャートによ
る処理を受けることにより16ラインに間引かれて第5図
(ロ)のRAM18にコピーされる。この時点でカウンタ20
は0となる。一方、縮小する画像の横のワード数をワー
ドレジスタ13へ、RAM18のワード数をワードレジスタ
11へロードする。各制御パラメータの設定が終了した所
でCPUはDMAコントローラの制御回路へ転送モード
を指定するコマンドコードを送る。コマンドコードを受
けた制御回路1はDMA転送を開始する。手順は次の様
になる(第7図のフローを参照)。
In the above configuration, the operation will be described by taking as an example the case where the image data in the rectangular area is thinned out and DMA-transferred to the scaling circuit. First, the counter 20 is cleared and the start address of the original image is loaded from the CPU into the address register 5 of the DMA controller. The data flow is passed from the data bus 15 through the gate 4 to the ALU 10 to be operated by +0 and input to the address register 5. Next, the CPU determines from the reduction ratio whether or not to thin the line, and if it is not thinned, the contents of A5 are copied to the RAM 18. Here, the counter 20 is incremented by +1. Next, the contents of MAP2 are added to the contents of address register 5 and loaded into address register 5 (here, the start address of the next line is stored in address register 5). Then, it is determined whether or not to thin this line (address indicated by the A address register). When thinning out, the contents of the address register 5 are not copied to the RAM 18, but the contents of the MAP 2 are added to the contents of the address register 5 and loaded into the address register 5. This procedure is repeated until the counter 20 reaches 0. FIG. 5 (a) shows 2N + 2, 3 which is the target of reduction processing.
N + 2 ... line is shown, and it is thinned to 16 lines by receiving the processing according to the flowchart of FIG.
It is copied to the RAM 18 in (b). Counter 20 at this point
Is 0. On the other hand, the number of words beside the image to be reduced is stored in the word register 13, and the number of words in the RAM 18 is stored in the word register.
Load to 11. When the setting of each control parameter is completed, the CPU sends a command code designating the transfer mode to the control circuit of the DMA controller. The control circuit 1 receiving the command code starts the DMA transfer. The procedure is as follows (see the flow in FIG. 7).

まず、最初にワードレジスタ13の内容をワードカウンタ
14へロードし、ワードレジスタ11の内容をワードカウン
タ12へロードする。次にカウンタ20をクリアする。ここ
までの準備が出来たら、DMA転送が可能かどうか、21
0、211、……2115の16個の並列拡大縮小回路21(第5図
(ロ))が入力可能状態か否かのチェックをする。可能で
ないなら待つ。最初に、カウンタ20が示すライン0のR
AM18の内容をMAR9へロードすると同時に、ALU
10でそのRAM18の内容に+1を行ってRAM18へセッ
トする。前記MAR9の示すアドレスのメモリの内容を
並列拡大縮小回路へロードし、ワードカウンタ12を−1
する。つづいて、カウンタ20を+1して、ワードカウン
タ12の内容が0か否か判定する。0でないなら、RAM
18のワード数分(本実施例では16ワード)の転送が済ん
でいないことになり、再度カウンタ20の示すRAM18の
内容をMAR9へロードし、上記の操作をくり返す。0
であれば、RAM18にセットされた16個の先頭アドレス
がすべて転送済みであるため、縦1行の転送が終了した
ことになる。ここでワードカウンタ14を−1し、ワード
カウンタ14の出力が0か否か判定する。0でないならワ
ードレジスタ11の内容をワードカウンタ12へロードし、
カウンタ20をクリアして上記の操作を繰り返す。ワード
カウンタ14が0であれば、転送する矩形領域の横ワード
数の回数分、縦列の転送を行ったことになり、これで並
列処理可能なライン数のDMA転送を終了する。CPU
はDMAの終了を検知した時点でまだ全矩形エリアの処
理が終了していなければ再度転送ラインの先頭アドレス
を求めDMAコントローラに駆動を掛ければ良い。
First, the contents of word register 13 are
14 and loads the contents of the word register 11 into the word counter 12. Next, the counter 20 is cleared. If you are ready to do so, whether DMA transfer is possible, 21
16 parallel scaling circuits 21 of 0 , 21 1 , ... 21 15 (Fig. 5
Check whether (B)) is ready for input. Wait if not possible. First, R of line 0 indicated by counter 20
At the same time as loading the contents of AM18 into MAR9,
At 10, the contents of RAM 18 are incremented by 1 and set in RAM 18. The contents of the memory at the address indicated by MAR9 are loaded into the parallel scaling circuit, and the word counter 12 is decremented by -1.
To do. Then, the counter 20 is incremented by 1 to determine whether the content of the word counter 12 is 0 or not. RAM if not 0
Since the transfer of 18 words (16 words in this embodiment) has not been completed, the contents of the RAM 18 indicated by the counter 20 are loaded into the MAR 9 again, and the above operation is repeated. 0
In this case, since all 16 head addresses set in the RAM 18 have been transferred, the transfer of one vertical line is completed. Here, the word counter 14 is decremented by 1 and it is determined whether the output of the word counter 14 is 0 or not. If not 0, load the contents of word register 11 to word counter 12,
The counter 20 is cleared and the above operation is repeated. If the word counter 14 is 0, it means that the column transfer has been performed by the number of horizontal words of the rectangular area to be transferred, and thus the DMA transfer of the number of lines that can be processed in parallel is completed. CPU
If the processing of all rectangular areas is not completed at the time when the end of DMA is detected, the head address of the transfer line may be obtained again and the DMA controller may be driven.

本実施例では、画像編集のうち縮小についてのみ説明し
たが、他の編集、例えば、切り出し移動、回転、拡大
等、また画像処理のフィルタリング、補間等において数
ライン同時のデータが同時に必要な場合等にも使用可能
である。また、転送の方法に応じてアドレスレジスタ、
転送ワードレジスタ、カウンタ等の数を増減させること
により最適化することができる。
In the present embodiment, only the reduction of the image editing has been described, but in the case of other editing, for example, clipping movement, rotation, enlargement, filtering of image processing, interpolation, etc., when several lines of simultaneous data are required at the same time, etc. It can also be used for. Also, depending on the transfer method, the address register,
It can be optimized by increasing or decreasing the number of transfer word registers, counters and the like.

第8図は本発明の第3の実施例を示すものであり、共通
する部分は共通の引用数字で示したので重複する説明は
省略するが、第1の実施例と第2の実施例を併合したも
のであり、横方向のアクセス、縦方向のアクセス、及び
両方を組み合せたアクセスが可能である。
FIG. 8 shows a third embodiment of the present invention, and the common parts are indicated by common reference numerals, and thus duplicated description will be omitted, but the first embodiment and the second embodiment will be omitted. They are merged, and horizontal access, vertical access, and a combination of both are possible.

〔発明の効果〕〔The invention's effect〕

以上説明した通り、本発明の画像編集装置用DMAコン
トローラによると、転送中のラインの次のラインの先頭
アドレスを保持する第1のレジスタと、転送中のアドレ
スを保持する第2のレジスタを設けたため、全てのアド
レス計算を1つのALUで短時間で行うことができ、ハ
ード構成を簡単にして転送操作におけるデータ設定を容
易にすることができる。
As described above, according to the DMA controller for the image editing apparatus of the present invention, the first register for holding the start address of the line next to the line being transferred and the second register for holding the address being transferred are provided. Therefore, all address calculations can be performed in one ALU in a short time, the hardware configuration can be simplified, and the data setting in the transfer operation can be facilitated.

また、拡大縮小回路を並列に設けて並列処理するように
すると、複数ラインを同時に高速DMA転送でき、拡大
縮小時間を短縮することができる。
Further, by providing the scaling circuits in parallel and performing parallel processing, a plurality of lines can be simultaneously subjected to high-speed DMA transfer, and the scaling time can be shortened.

【図面の簡単な説明】[Brief description of drawings]

第1図より第3図は本発明の第1の実施例を示し、第1
図はブロック図、第2図(イ)、(ロ)はメモリの説明図、第
3図は制御用フローチャート図、第4図より第7図は本
発明の第2の実施例を示し、第4図はブロック図、第5
図(イ)、(ロ)はメモリの説明図、第6図および第7図は制
御用フローチャート図、第8図は本発明の第3の実施例
を示す説明図。第9図および第10図(イ)、(ロ)は従来の画
像編集装置用DMAコントローラを示し、第9図はブロ
ック図、第10図(イ)、(ロ)はメモリの説明図。 符号の説明 1……制御回路、2……MAPレジスタ 3……ゼロドライバー、4……ゲート 5……アドレスレジスタ(A5) 6……アドレスレジスタ(A6) 7……アドレスレジスタ(A7) 8……アドレスレジスタ(A8) 9……メモリアドレスレジスタ(MAR) 10……ALU 11……ワードレジスタ(WDREG11) 12……ワードカウンタ(WDCNT12) 13……ワードレジスタ(WDREG13) 14……ワードカウンタ(WDCNT14) 15……制御データバス 16……アドレスバス 17……画像メモリ(IMM) 18……RAM、19……ラッチ(LATCH) 20……カウンタ 31……アドレスカウンタ(A31) 32……アドレスカウンタ(A32) 33……データ間隔レジスタ(I33) 34……データ間隔レジスタ(I34) 35……マルチプレクサ、36……マルチプレクサ 37……ALU、38……ALU
1 to 3 show a first embodiment of the present invention.
FIG. 1 is a block diagram, FIGS. 2 (a) and 2 (b) are explanatory views of a memory, FIG. 3 is a control flowchart, and FIGS. 4 to 7 show a second embodiment of the present invention. Figure 4 is a block diagram, 5
FIGS. 6A and 6B are explanatory views of a memory, FIGS. 6 and 7 are control flowcharts, and FIG. 8 is an explanatory view showing a third embodiment of the present invention. 9 and 10 (a) and (b) show a conventional DMA controller for an image editing apparatus, FIG. 9 is a block diagram, and FIGS. 10 (a) and 10 (b) are explanatory views of a memory. Explanation of code 1 ... Control circuit, 2 ... MAP register, 3 ... Zero driver, 4 ... Gate, 5 ... Address register (A5), 6 ... Address register (A6), 7 ... Address register (A7), 8 ... Address register (A8) 9 Memory address register (MAR) 10 ALU 11 Word register (WDREG11) 12 Word counter (WDCNT12) 13 Word register (WDREG13) 14 Word counter (WDCNT14 ) 15 …… control data bus 16 …… address bus 17 …… image memory (IMM) 18 …… RAM, 19 …… latch (LATCH) 20 …… counter 31 …… address counter (A31) 32 …… address counter ( A32) 33 …… Data interval register (I33) 34 …… Data interval register (I34) 35 …… Multiplexer, 36 …… Multiplexer 37 …… ALU, 38 …… A U

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】転送元の画像メモリの指定された領域の画
像データに編集,加工等を施して転送先の画像メモリの
指定された領域へ転送するDMAコントローラにおい
て、 前記転送元,転送先画像メモリの一方向のワード数を記
憶した第1の記憶手段(2)と、 画像データの転送元,及び転送先の転送ラインの次の転
送ラインの先頭アドレスを保持する第1のレジスタ
(5),(7)と、 転送する画像データの転送元、及び転送先の転送アドレ
スを保持する第2のレジスタ(6),(8)と、 前記転送ラインの先頭アドレスに前記一方向のワード数
を加算,或いは減算することにより前記次の転送ライン
の先頭アドレスを求めて前記第1のレジスタ(5),
(7)に保持させる第1の演算と、転送中の画像データ
の転送元,及び転送先の転送アドレスに1を加算,或い
は減算することにより次に転送する転送アドレスを求め
て前記第2のレジスタ(6),(8)に保持させる第2
の演算を行う演算手段(10)と、 前記第2のレジスタ(6),(8)に保持される前記転
送アドレスに基づいて 前記転送元の画像メモリ及び前記転送先の画像メモリを
アクセスする制御手段(1)を備えたことを特徴とする
画像編集装置用DMAコントローラ。
1. A DMA controller that edits or processes image data in a specified area of a transfer source image memory and transfers the image data to a specified area of a transfer destination image memory, wherein the transfer source and transfer destination images A first storage means (2) for storing the number of words in one direction of the memory, and a first register (5) for holding a start address of a transfer line next to a transfer line of a transfer source and a transfer destination of image data. , (7), second registers (6) and (8) for holding the transfer addresses of the transfer source and transfer destination of the image data to be transferred, and the number of words in one direction in the start address of the transfer line. The first address (5) of the first register (5) is obtained by obtaining the start address of the next transfer line by adding or subtracting.
The first operation held in (7) and addition or subtraction of 1 to and from the transfer addresses of the transfer source and transfer destination of the image data being transferred are used to obtain the transfer address to be transferred next and the second operation is performed. Second to be held in registers (6) and (8)
And a control for accessing the transfer source image memory and the transfer destination image memory based on the transfer address held in the second registers (6) and (8). A DMA controller for an image editing apparatus, which is provided with means (1).
【請求項2】複数のデータの並列処理可能な画像編集処
理装置におけるDMAコントローラにおいて、 転送元の画像メモリの一方向のワード数を記憶した第1
の記憶手段(2)と、 画像データの転送元の転送ラインの次の転送ラインの先
頭アドレスを保持する第1のレジスタ(5)と、 前記第1のレジスタ(5)に順次保持される複数の先頭
アドレスを処理して得られる画像編集処理用の複数のア
ドレスを順次記憶する第2の記憶手段(18)と、 前記第1のレジスタ(5)に保持される転送ラインの先
頭アドレスに前記第1の記憶手段(2)に記憶した一方
向のワード数を加算,或いは減算することにより前記次
の転送ラインの先頭アドレスを求めて前記第1のレジス
タ(5)に保持させる第1の演算と、前記第2の記憶手
段(18)に記憶された前記複数の先頭アドレスに前記
画像編集処理の進行に応じて順次1を加算,或いは減算
した演算結果を前記画像編集処理用の複数のアドレスと
して前記第2の記憶手段(18)に記憶させる第2の演
算を行う演算手段(10)と、 前記第2の記憶手段(18)に記憶されている前記画像
編集処理用のアドレスに基づいて転送元のメモリをアク
セスして画像編集処理手段に該メモリの画像に編集処理
を実行させる制御手段(1)を備えたことを特徴とする
画像編集装置用DMAコントローラ。
2. A DMA controller in an image edit processing apparatus capable of parallel processing of a plurality of data, wherein a first number of words stored in one direction of an image memory of a transfer source is stored.
Storage means (2), a first register (5) for holding the start address of the transfer line next to the transfer line of the transfer source of the image data, and a plurality of sequentially stored in the first register (5) Second storage means (18) for sequentially storing a plurality of addresses for image editing processing obtained by processing the start address of the transfer address, and the start address of the transfer line held in the first register (5). A first operation for obtaining the start address of the next transfer line by adding or subtracting the number of words in one direction stored in the first storage means (2) and holding it in the first register (5) And a plurality of start addresses stored in the second storage means (18) are sequentially added or subtracted by 1 according to the progress of the image editing process to obtain a plurality of operation results for the image editing process. As The arithmetic means (10) for performing the second arithmetic operation to be stored in the second storage means (18), and the transfer based on the image editing processing address stored in the second storage means (18). A DMA controller for an image editing apparatus, comprising: a control unit (1) for accessing an original memory and causing an image editing processing unit to execute an editing process on an image in the memory.
JP61196934A 1986-08-22 1986-08-22 DMA controller for image editing device Expired - Fee Related JPH0668760B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61196934A JPH0668760B2 (en) 1986-08-22 1986-08-22 DMA controller for image editing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61196934A JPH0668760B2 (en) 1986-08-22 1986-08-22 DMA controller for image editing device

Publications (2)

Publication Number Publication Date
JPS6353681A JPS6353681A (en) 1988-03-07
JPH0668760B2 true JPH0668760B2 (en) 1994-08-31

Family

ID=16366087

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61196934A Expired - Fee Related JPH0668760B2 (en) 1986-08-22 1986-08-22 DMA controller for image editing device

Country Status (1)

Country Link
JP (1) JPH0668760B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2803258B2 (en) * 1989-01-27 1998-09-24 セイコーエプソン株式会社 Drive circuit for wire dot print head
JP3614714B2 (en) 1999-06-16 2005-01-26 Necマイクロシステム株式会社 DMA controller
JP4677581B2 (en) * 2000-12-15 2011-04-27 株式会社メガチップス Data transfer control device and data transfer method
JP5017601B2 (en) * 2010-11-29 2012-09-05 株式会社メガチップス Data transfer control device and data transfer method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62115563A (en) * 1985-11-14 1987-05-27 Sharp Corp Dma controller

Also Published As

Publication number Publication date
JPS6353681A (en) 1988-03-07

Similar Documents

Publication Publication Date Title
JPH0668760B2 (en) DMA controller for image editing device
JPS5971564A (en) Image data memory control method
JPH0572625B2 (en)
JPS647393Y2 (en)
JP2772027B2 (en) Image reconstruction method
JP2852050B2 (en) Image processing device
JP2854433B2 (en) Line memory control circuit
JPS62123571A (en) Picture signal processor
JP3088956B2 (en) Arithmetic unit
JP3069384B2 (en) Document processing apparatus and method
JPH06162067A (en) Device and method for controlling vector instruction
JP3304370B2 (en) Merge processing method
JP2549838B2 (en) Data control device
JPH04111149A (en) Circuit system for dma device
JPH01237766A (en) Data processing device and image data processing system using the same
JPH0520140U (en) Information processing equipment
JPH01195581A (en) Image data processing system
JPH036776A (en) Image rotation processor
JPS58109932A (en) Comparison and arithmetic device for electronic computer
JPH04205678A (en) Image information processor
WO1987007411A1 (en) System for saving image data
JPS58203562A (en) Method for controlling memory
JPH0465777A (en) Image data transfer system
JPH06110773A (en) Memory controller
JPH0540685A (en) Address decoder

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees