JPH1091365A - Printer controller - Google Patents

Printer controller

Info

Publication number
JPH1091365A
JPH1091365A JP8266636A JP26663696A JPH1091365A JP H1091365 A JPH1091365 A JP H1091365A JP 8266636 A JP8266636 A JP 8266636A JP 26663696 A JP26663696 A JP 26663696A JP H1091365 A JPH1091365 A JP H1091365A
Authority
JP
Japan
Prior art keywords
address
image data
line
data
dma
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.)
Pending
Application number
JP8266636A
Other languages
Japanese (ja)
Inventor
Yuuichi Araumi
雄一 荒海
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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP8266636A priority Critical patent/JPH1091365A/en
Publication of JPH1091365A publication Critical patent/JPH1091365A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a printer controller which can print an image without disturbing a part of image and also can evade an increase in cost even when the image data size is larger or smaller than the form size by holding the line width of the image data to obtain the head address of the next line and stopping temporarily the DMA transfer when the head address is matched with the value of an address counter. SOLUTION: The image data to be printed are expanded into a main memory 101, and the head address of the image data is set at an address register 111. At the same time, the line width of the main scan direction of the image data is set at a line register 112. Then the value of the register 112 is added to the register 111 simultaneously with the DMA transfer and the address of the next line head address is obtained. The value of an address counter 110 is compared with the next line head address held by the register 111. When they are matched with each other, it means that the DMA transfer is over. Thus, the DMA transfer is temporarily stopped.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明が属する技術分野】本発明は,メインメモリ上に
展開されたイメージデータに対し,DMA転送を行わな
いプリンタに出力するプリンタ制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a printer control device for outputting image data developed on a main memory to a printer that does not perform DMA transfer.

【0002】[0002]

【従来の技術】従来より,メインメモリ上に展開された
イメージデータを順次読み出し,プリンタに出力するプ
リンタ制御装置において,イメージデータと用紙サイズ
とが合わない状態であっても印刷を強行することがあ
る。すなわち,プリンタにイメージデータのサイズより
小さいサイズの用紙しかない場合,あるいは,その反対
に,イメージサイズが用紙サイズよりもはるかに小さい
場合である。用紙サイズが合わない状態で印刷された場
合であっても,どのようなイメージデータが印刷された
かの判別はできるようにしておく必要がある。
2. Description of the Related Art Conventionally, in a printer control device for sequentially reading image data developed on a main memory and outputting the image data to a printer, it is possible to force printing even when the image data and the paper size do not match. is there. That is, the case where the printer has only paper of a size smaller than the size of the image data, or conversely, the case where the image size is much smaller than the paper size. It is necessary to be able to determine what image data has been printed, even when printing is performed in a state where the paper size does not match.

【0003】ここで,イメージデータのサイズよりも小
さいサイズの用紙に印刷する場合,たとえば,イメージ
データは左上隅を用紙左上隅に一致させて印刷する(図
4参照)。
Here, when printing on a sheet of paper smaller than the size of the image data, for example, the image data is printed with the upper left corner coincident with the upper left corner of the sheet (see FIG. 4).

【0004】この場合,イメージデータを判別できるよ
うに印刷する方法として,イメージデータを用紙サイズ
に縮小してイメージ全体を印刷する方法や,イメージデ
ータの中で用紙サイズで切り取られる部分だけをそのま
まの状態で印刷する方法がとられる。用紙サイズに縮小
する方法は,処理が面倒であり,その処理時間も長くな
る。一方,用紙サイズ部分だけをそのまま印刷する方法
は,処理も簡単で,かつ処理時間も短い。
In this case, as a method of printing the image data so that the image data can be discriminated, a method of reducing the image data to a paper size and printing the entire image, or a method in which only a portion of the image data cut out by the paper size is used as it is. A method of printing in a state is adopted. The method of reducing the paper size is cumbersome and the processing time is long. On the other hand, the method of printing only the paper size portion as it is has simple processing and a short processing time.

【0005】ここでイメージデータのうち用紙サイズの
部分だけをそのまま印刷する従来例について説明する。
画像が乱れることなくそのまま印刷するためには,ライ
ンの無効データを印刷に使わないように処理し,次のラ
インの有効データの印刷が行われるようにする必要があ
る。
Here, a conventional example in which only the paper size portion of the image data is printed as it is will be described.
In order to print the image as it is without disturbing, it is necessary to process the invalid data of the line so as not to be used for the printing and to print the valid data of the next line.

【0006】この有効データか無効データかの判別を行
うため,たとえば,特開平4−83674号公報では印
刷サイズをカウンタで保持し,用紙からはみ出すデータ
はプリンタへ出力しない方法が開示されている。
In order to determine whether the data is valid data or invalid data, for example, Japanese Patent Application Laid-Open No. Hei 4-83674 discloses a method in which a print size is held by a counter and data that runs off the paper is not output to a printer.

【0007】また,特開平7−9708号公報に開示さ
れている『プリンタ制御装置』では,プリンタ制御装置
内のDMA制御装置にイメージデータの各ライン毎に未
転送データ量をカウントするカウンタ部を設け,各ライ
ンの用紙幅印刷終了後に,カウンタ部の値だけDMA転
送のためのアドレスを変更し,用紙幅からはみ出すデー
タを飛び越えた位置に先頭アドレスを移してDMAを再
開している。そして,用紙幅の印刷終了時にはプリンタ
制御装置内のFIFOにバッファリングしたイメージデ
ータをFIFOクリアにより消滅させることで,次ライ
ンにおけるDMA転送では用紙幅に入るだけのデータが
転送される。
In the "printer control device" disclosed in Japanese Patent Application Laid-Open No. 7-9708, a DMA control device in the printer control device includes a counter unit for counting the amount of untransferred data for each line of image data. After the printing of the paper width of each line is completed, the address for DMA transfer is changed by the value of the counter section, and the head address is moved to a position that jumps over the data exceeding the paper width to restart the DMA. Then, at the end of the printing of the paper width, the image data buffered in the FIFO in the printer control device is erased by the FIFO clear, so that in the DMA transfer on the next line, the data that can fit in the paper width is transferred.

【0008】一方,イメージデータのサイズよりもはる
かに大きいサイズの用紙に印刷する場合(図6参照),
1ライン分のイメージデータをFIFOから出力し終え
た後でも主走査方向の同期信号はアクティブのままであ
るため,この間,次ラインのデータを出力しないように
制御する必要がある。このため,従来ではイメージデー
タのラインサイズを保持するラインカウンタを設け,D
MA転送する毎にカウントダウンし,イメージデータの
サイズ以上のデータを出力しないようにしている。
[0008] On the other hand, when printing on paper of a size much larger than the size of the image data (see FIG. 6),
Since the synchronization signal in the main scanning direction remains active even after one line of image data has been output from the FIFO, it is necessary to control not to output the data of the next line during this period. For this reason, conventionally, a line counter for holding the line size of the image data is provided,
Each time the MA transfer is performed, the countdown is performed so that data larger than the size of the image data is not output.

【0009】[0009]

【発明が解決しようとする課題】しかしながら,上記特
開平7−9708号公報や特開平7−9708号公報に
示されるような従来の技術にあっては,データサイズの
カウンタやラインサイズのカウンタをもつため,プリン
タの解像度が上がったり,用紙サイズが大きなものとな
った場合に1ラインに占めるデータ量が膨大となり,デ
ータをカウントするためのカウンタは非常に大きなもの
を必要とし,この結果,コストアップを招来させてしま
うという問題点があった。
However, in the prior art as disclosed in the above-mentioned Japanese Patent Application Laid-Open Nos. 7-9708 and 7-9708, a data size counter and a line size counter are used. Therefore, when the resolution of the printer increases or the paper size becomes large, the amount of data occupying one line becomes enormous, and a very large counter is required to count the data. As a result, the cost increases. There was a problem that would be invited.

【0010】また,イメージサイズが用紙サイズより大
きい場合と,イメージサイズが用紙サイズより小さい場
合の両方に対応するためには,それぞれ別々にカウンタ
をもたせる必要があるため,大規模なカウンタが複数個
必要になり,ここでもコストアップを招来させてしまう
という問題点があった。
In order to cope with both the case where the image size is larger than the paper size and the case where the image size is smaller than the paper size, it is necessary to provide separate counters for each. However, there is a problem that the cost is increased here as well.

【0011】本発明は,上記に鑑みてなされたものであ
って,メインメモリからイメージデータを読み出し,プ
リンタに出力して印刷するプリンタ制御装置において,
イメージデータのサイズが用紙サイズより大きい場合で
も小さい場合であっても,画像の一部を乱すことなく印
刷可能とし,かつコストアップせずに実現することを目
的とする。
The present invention has been made in view of the above, and a printer control device for reading image data from a main memory, outputting the image data to a printer, and printing the data.
It is an object of the present invention to enable printing without disturbing a part of an image even if the size of the image data is larger or smaller than the paper size, and to realize the cost without increasing the cost.

【0012】[0012]

【課題を解決するための手段】上記の目的を達成するた
めに,請求項1に係るプリンタ制御装置にあっては,メ
インメモリ上に展開したイメージデータをライン毎に読
み出し,プリンタへのデータ出力を制御するプリンタ制
御装置において,前記メインメモリからDMA転送され
るイメージデータを一時格納する一時格納手段と,前記
一時格納手段へのデータ書き込みおよびデータの消去を
制御するメモリ制御手段と,前記一時格納手段からのデ
ータをプリントするのに適合した形式およびタイミング
でプリンタに出力する出力制御手段と,DMA転送の開
始アドレスを記憶するアドレスレジスタと,DMA転送
毎にアドレスをカウントするアドレスカウンタ,ライン
幅を保持するラインレジスタ,前記ラインレジスタの値
を用いて前記アドレスレジスタの値を変更するアドレス
変更部,前記ラインレジスタを用いて次ラインの先頭ア
ドレスを求め,前記アドレスカウンタが次ライン先頭ア
ドレスと一致した時点でDMA転送を一時停止させる制
御手段により構成されるDMA制御手段と,を備えたも
のである。
According to a first aspect of the present invention, there is provided a printer control apparatus for reading out image data developed on a main memory line by line and outputting data to a printer. A temporary control means for temporarily storing image data DMA-transferred from the main memory; a memory control means for controlling writing of data to the temporary storage means and erasure of data; Output control means for outputting data from the means to the printer in a format and timing suitable for printing, an address register for storing a DMA transfer start address, an address counter for counting addresses for each DMA transfer, and a line width. The line register to be held, and the address An address changing unit for changing the value of the register, a control unit for obtaining the start address of the next line using the line register, and suspending the DMA transfer when the address counter matches the start address of the next line. And control means.

【0013】すなわち,イメージデータのライン幅を保
持して次ラインの先頭アドレスを求め,アドレスカウン
タの値が一致した時点でDMA転送を一時停止させるこ
とにより,用紙幅に合わせたデータ出力が行えるので画
像の乱れを排除でき,しかも大規模なイメージデータサ
イズになるのが回避されるので,コストダウンを図るこ
とができる。
That is, the line width of the image data is held, the head address of the next line is obtained, and the DMA transfer is temporarily stopped when the value of the address counter matches, so that data output according to the paper width can be performed. Since image disturbance can be eliminated and a large-scale image data size can be avoided, cost can be reduced.

【0014】また,請求項2に係るプリンタ制御装置に
あっては,前記DMA制御手段に,1ページ分のライン
数を保持するページカウンタを備え,1ライン毎にDM
A転送が終了した時点で前記ページカウンタをカウント
ダウンし,前記メインメモリからの1ページ分のイメー
ジデータの転送が終了した時点でDMA転送を終了させ
るものである。
According to a second aspect of the present invention, in the printer control apparatus, the DMA control means includes a page counter for holding the number of lines for one page, and the DMA control means is provided for each line.
When the A transfer is completed, the page counter is counted down, and when the transfer of one page of image data from the main memory is completed, the DMA transfer is completed.

【0015】すなわち,1ページ分のライン数を保持
し,ラインの先頭アドレスを求める毎にデクリメントす
ることにより,大規模なイメージデータのサイズのカウ
ンタを用いないので,そのコストダウンを図ることがで
きる。
That is, by holding the number of lines for one page and decrementing each time the head address of the line is obtained, the cost can be reduced because a large-scale image data size counter is not used. .

【0016】また,請求項3に係るプリンタ制御装置に
あっては,前記メモリ制御手段は,前記一時格納手段に
格納されたイメージデータが用紙幅に対して大きい場合
は,用紙幅のイメージデータが出力された後に前記一時
格納手段のデータを消去し,前記一時格納手段に格納さ
れたイメージデータが用紙幅に対して小さい場合は,前
記一時格納手段のデータが空になり次第,次ラインのD
MA転送の開始を要求して前記一時格納手段への書き込
みを行うものである。
According to a third aspect of the present invention, in the printer control device, when the image data stored in the temporary storage unit is larger than the sheet width, the memory control unit may change the image data of the sheet width. After the data is output, the data in the temporary storage unit is erased. If the image data stored in the temporary storage unit is smaller than the paper width, as soon as the data in the temporary storage unit becomes empty, the D in the next line becomes empty.
It requests the start of MA transfer and performs writing to the temporary storage means.

【0017】すなわち,一時格納手段に無効データが存
在する場合には消去して次ラインの先頭イメージデータ
から格納し,1ラインのデータが全て出力されて空にな
った場合はすぐに次ラインのデータのDMA転送を開始
することにより,イメージデータが用紙サイズより大き
い場合や,小さい場合であっても画像を乱すことなくプ
リント出力を行うことができる。
That is, if invalid data exists in the temporary storage means, it is erased and stored from the head image data of the next line. If all data of one line is output and becomes empty, the next line is immediately deleted. By starting the DMA transfer of data, print output can be performed without disturbing the image even when the image data is larger or smaller than the paper size.

【0018】[0018]

【発明の実施の形態】以下,本発明のプリンタ制御装置
について添付図面を参照し,詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, a printer control device according to the present invention will be described in detail with reference to the accompanying drawings.

【0019】〔実施の形態〕 (実施の形態の構成)図1は,実施の形態に係るプリン
タ制御装置を用いたシステム構成を示すブロック図であ
る。図において,このプリンタ制御装置は,システムバ
ス100上にイメージデータを展開・記憶するメインメ
モリ101と,CPU102と,メインメモリ101上
に展開したイメージデータをDMA転送するプリンタI
/F装置103と,プリンタ装置104とから構成され
ている。
[Embodiment] (Structure of Embodiment) FIG. 1 is a block diagram showing a system structure using a printer control device according to an embodiment. In FIG. 1, the printer control device includes a main memory 101 for developing and storing image data on a system bus 100, a CPU 102, and a printer I for transferring the image data developed on the main memory 101 by DMA.
/ F device 103 and a printer device 104.

【0020】また,プリンタI/F装置103は,DM
A制御手段としてのDMA制御部105と,イメージデ
ータを一時格納する一時格納手段としてのFIFO部1
06と,FIFO部106への読み書きおよびFIFO
部106内のデータの消去を制御するメモリ制御手段と
してのFIFO制御部107と,FIFO部106から
のデータをプリントするのに適合した形式およびタイミ
ングでプリンタ装置104に出力する出力制御手段とし
ての出力制御部108とから構成されている。
The printer I / F device 103 is provided with a DM
DMA control unit 105 as A control means, and FIFO unit 1 as temporary storage means for temporarily storing image data
06, read / write to / from FIFO unit 106 and FIFO
A FIFO control unit 107 as a memory control unit for controlling the erasure of data in the unit 106, and an output as an output control unit for outputting data from the FIFO unit 106 to the printer device 104 in a format and timing suitable for printing. And a control unit 108.

【0021】さらに,DMA制御部105は,制御手段
としての制御部109と,DMA転送毎にアドレスをカ
ウントするアドレスカウンタ110と,1ラインの先頭
アドレスを保持するアドレスレジスタ111と,ライン
幅を保持するラインレジスタ112と,アドレスレジス
タ111の値を変更するアドレス変更部113と,アド
レスカウンタ110の値が次ラインの先頭アドレスと一
致する毎にカウントダウンするページカウンタ114と
から構成されている。
Further, the DMA control unit 105 includes a control unit 109 as control means, an address counter 110 for counting addresses for each DMA transfer, an address register 111 for holding a head address of one line, and a line width. And a page counter 114 that counts down each time the value of the address counter 110 matches the start address of the next line.

【0022】(実施の形態の動作)次に,以上のように
構成されたプリンタ制御装置の動作について説明する。
なお,ここでは,アドレスが増加する順にメインメモリ
からイメージデータを読み出して転送する場合について
述べる。
(Operation of the Embodiment) Next, the operation of the printer control device configured as described above will be described.
Here, a case in which image data is read from the main memory and transferred in the order of increasing addresses will be described.

【0023】図1において,まず,メインメモリ101
上にプリント対象のイメージデータを展開する。次い
で,上記展開されたイメージデータの先頭アドレスを,
DMA制御部105内のアドレスレジスタ111に設定
する。また,ラインレジスタ112にはイメージデータ
の主走査方向のデータ量(ライン幅)を設定する。
In FIG. 1, first, the main memory 101
Expand the image data to be printed on top. Next, the head address of the developed image data is
This is set in the address register 111 in the DMA control unit 105. In the line register 112, the data amount (line width) of the image data in the main scanning direction is set.

【0024】イメージ出力の開始をプリンタ制御装置に
対して与えることにより,プリント要求がCPU102
からプリンタI/F装置103に対して出力される。プ
リンタI/F装置103では,プリンタ装置104に対
してプリントスタート信号を出力する前にFIFO部1
06にデータを先詰めしておくためにDMA転送を起動
する。
By giving the start of image output to the printer controller, a print request is issued to the CPU 102.
To the printer I / F device 103. In the printer I / F device 103, before outputting a print start signal to the printer device 104, the FIFO unit 1
A DMA transfer is started in order to put data at 06 first.

【0025】次に,図2および図3を用いてDMAアド
レスの生成方法について説明する。図2はDMAアドレ
スの生成方法を示す説明図,図3はDMA制御部105
の制御動作を示すフローチャートである。なお,図2に
おいて,201はイメージデータの先頭アドレス,20
2は次ラインの先頭アドレス,203はイメージデータ
である。
Next, a method of generating a DMA address will be described with reference to FIGS. FIG. 2 is an explanatory diagram showing a method of generating a DMA address, and FIG.
5 is a flowchart showing the control operation of the first embodiment. In FIG. 2, reference numeral 201 denotes the head address of the image data;
2 is the start address of the next line, and 203 is image data.

【0026】図3において,まず,ステップS301で
CPU102からのプリント要求によってアドレスレジ
スタ111,ラインレジスタ112,およびページカウ
ンタ114の値をセットする。続いて,ステップS30
2でイメージデータの先頭アドレス201がアドレスカ
ウンタ110にロードされ,メインメモリ101からイ
メージデータのDMA転送を開始し,同時にラインレジ
スタ112の値をアドレスレジスタ111に加算して,
次ラインの先頭アドレス202を求める。
In FIG. 3, first, in step S301, the values of an address register 111, a line register 112, and a page counter 114 are set in response to a print request from the CPU 102. Subsequently, step S30
In step 2, the head address 201 of the image data is loaded into the address counter 110, the DMA transfer of the image data from the main memory 101 is started, and at the same time, the value of the line register 112 is added to the address register 111.
The start address 202 of the next line is obtained.

【0027】また,FIFO部106にある一定量(ハ
ーフフルなど)のデータが入力されるとDMA転送を一
時停止する。プリンタ装置104の印字タイミングに合
わせて出力される同期信号(lgate_/fgate
_信号など)に合わせてFIFO部106からデータを
読み出し,出力制御部108でプリンタ装置104の印
字形式を変更し,出力する。なお,lgate_は主走
査方向同期(水平同期)信号,fgate_は副走査方
向同期(垂直同期)信号である。
When a certain amount of data (half full or the like) is input to the FIFO unit 106, the DMA transfer is temporarily stopped. A synchronization signal (lgate_ / fgate) output according to the print timing of the printer device 104
_ Signal, etc.), the data is read from the FIFO unit 106, the output control unit 108 changes the print format of the printer device 104, and outputs it. Note that lgate_ is a main scanning direction synchronization (horizontal synchronization) signal, and fgate_ is a sub-scanning direction synchronization (vertical synchronization) signal.

【0028】ステップS304でアドレスカウンタ11
0内のDMAアドレスは,バスの一回の転送サイクル毎
に加算される。ステップS305でアドレスカウンタ1
10の値とアドレスレジスタ111の保持する次ライン
の先頭アドレス202とを比較する。
At step S304, the address counter 11
The DMA address in 0 is added every one transfer cycle of the bus. In step S305, the address counter 1
The value of 10 is compared with the start address 202 of the next line held in the address register 111.

【0029】上記ステップS305で一致した場合,1
ライン分のDMA転送が終了したことを意味するためス
テップS306へ進み,DMA転送を一時停止する。一
方,上記ステップS305において,一致しない場合,
ステップS303に戻る。
If the values match in step S305, 1
The process proceeds to step S306 to indicate that the DMA transfer for the line has been completed, and the DMA transfer is temporarily stopped. On the other hand, if there is no match in step S305,
It returns to step S303.

【0030】イメージデータのサイズが用紙サイズより
大きい場合,ステップS303においてアドレスカウン
タ110の値がアドレスレジスタ111の値に一致する
前に,lgate_信号がHighになり1ラインのプ
リント出力が終了する。この場合,lgate_信号が
LowからHighに変わった時点で即座にステップS
306に進み,DMA転送を停止させる。
If the size of the image data is larger than the paper size, before the value of the address counter 110 matches the value of the address register 111 in step S303, the lgate_ signal becomes High and the print output of one line is completed. In this case, when the lgate_ signal changes from Low to High, step S is immediately performed.
Proceeding to 306, the DMA transfer is stopped.

【0031】次に,ステップS307でページカウンタ
114をカウントダウンし,未転送のライン数を示す。
さらにステップS308でページカウンタ114が0で
あるか否かを判断し,0でないと判断した場合ステップ
S302へ戻り,次ラインのDMA転送を開始する。一
方,上記ステップS308において,0であると判断し
た場合,1ページ分のイメージデータの転送終了を表す
ため,DMA転送を終了させる。
Next, in step S307, the page counter 114 is counted down to indicate the number of untransferred lines.
Further, it is determined in step S308 whether or not the page counter 114 is 0. If it is not 0, the process returns to step S302 to start the DMA transfer of the next line. On the other hand, if it is determined in step S308 that the value is 0, the DMA transfer is terminated to indicate that the transfer of the image data for one page has been completed.

【0032】(動作例1)ここでは,イメージデータが
用紙サイズより大きい場合の動作について説明する。
(Operation Example 1) Here, the operation when the image data is larger than the paper size will be described.

【0033】図4はイメージデータが用紙サイズより大
きい場合の動作を示す説明図,図5はプリンタ制御装置
の動作例1を示すタイミングチャート,図8はプリンタ
制御装置の状態遷移図である。
FIG. 4 is an explanatory diagram showing an operation when the image data is larger than the paper size, FIG. 5 is a timing chart showing an operation example 1 of the printer control device, and FIG. 8 is a state transition diagram of the printer control device.

【0034】図4において,401は実際に印字される
有効データ,402はメモリに用意されたが実際には印
字されない無効データ,403はFIFO部106内の
無効データ,404はメモリ内の無効データ,405は
イメージデータのライン幅,406は第1ラインの先頭
アドレス,407は第2ラインの先頭アドレス,408
は第3ラインの先頭アドレス,409は有効データの末
端のアドレス,410は無効データのアドレスである。
In FIG. 4, reference numeral 401 denotes valid data to be actually printed, 402 denotes invalid data prepared in the memory but not actually printed, 403 denotes invalid data in the FIFO unit 106, and 404 denotes invalid data in the memory. , 405 is the line width of the image data, 406 is the first address of the first line, 407 is the first address of the second line, 408
Is the start address of the third line, 409 is the end address of valid data, and 410 is the address of invalid data.

【0035】また,図5に示す501はプリンタ制御装
置の動作状態を示すステートである。さらに,図8にお
いて,801はDMA転送中で,かつFIFO出力を行
わないステート[DMA],802はDMA転送中で,
かつFIFO出力であるステート[DMA&PRIN
T],803はFIFOクリア中にDMA転送を行わ
ず,かつFIFO出力を行わないステート[CLEA
R],804はFIFO出力中で,かつDMA転送を行
わないステート[PRINT]である。
Reference numeral 501 shown in FIG. 5 denotes an operation state of the printer control device. Further, in FIG. 8, reference numeral 801 denotes a state [DMA] during DMA transfer and no FIFO output is performed, and 802 denotes a state during DMA transfer.
And the state of the FIFO output [DMA & PRIN
T], 803 is a state [CLEA] in which no DMA transfer is performed during FIFO clear and no FIFO output is performed.
R], 804 is a state [PRINT] in which the FIFO is being output and no DMA transfer is performed.

【0036】lgate_/fgate_信号は,プリ
ンタ装置104が用紙のサイズを検出することにより出
力され,それぞれLowのときに印字有効領域を示す。
プリンタ装置104への出力は,fgate_信号がL
owで,かつlgate_信号がLowのときに行われ
る。また,lgate_信号がHighになると1ライ
ンにおけるプリントが終了する。
The lgate_ / fgate_ signal is output when the printer device 104 detects the size of the sheet, and indicates an effective printing area when each signal is low.
The output to the printer device 104 is such that the fgate_ signal is L
This is performed when the signal is low and the lgate_ signal is low. Also, when the lgate_ signal becomes High, printing on one line is completed.

【0037】lgate 信号がLowになるとステー
ト[DMA]801からステート[DMA&PRIN
T]802に遷移し,プリンタ装置104への出力を開
始する(タイミングT1)。
Lgate When the signal becomes low, the state [DMA] 801 changes to the state [DMA & PRIN].
[T] 802, and starts output to the printer device 104 (timing T1).

【0038】また,ステート[DMA&PRINT]8
02においてlgate_信号がHighになった場
合,ステートを[CLEAR]803へ遷移させ,出力
制御部108がプリンタ装置104への出力を停止する
(タイミングT2)
Further, the state [DMA & PRINT] 8
When the lgate_ signal becomes High in 02, the state is transited to [CLEAR] 803, and the output control unit 108 stops outputting to the printer device 104 (timing T2).

【0039】上記タイミングT2でアドレス409のデ
ータ(有効データ401の末端のデータ)まで用紙に印
刷され,それ以降のデータが無効データ402となる。
この場合,アドレスカウンタ110は無効データのアド
レス410までカウントしてDMA転送を行っていると
すると,無効データ402は既にFIFO部106内に
転送されている無効データ403と,まだ転送されない
でメモリ内に残っている無効データ404とに分けられ
る。
At the timing T2, the data up to the data at the address 409 (the data at the end of the valid data 401) is printed on the paper, and the data thereafter becomes the invalid data 402.
In this case, assuming that the address counter 110 performs the DMA transfer by counting up to the address 410 of the invalid data, the invalid data 402 is the same as the invalid data 403 already transferred in the FIFO unit 106 and the invalid data 403 in the memory not yet transferred. And invalid data 404 remaining.

【0040】ここで,ステート[CLEAR]803で
のFIFO部106のクリアにより,FIFO部106
内の無効データが消去される。
Here, by clearing the FIFO unit 106 in the state [CLEAR] 803, the FIFO unit 106
Invalid data in is erased.

【0041】上記FIFOクリアが終了次第,ステート
[DMA]801に遷移し(タイミングT3),DMA
制御部105内では次ラインの先頭アドレス406をア
ドレスレジスタ111からアドレスカウンタ110に転
送し,同時にラインレジスタ112の値をアドレスレジ
スタの値に加算し,次々ラインの先頭アドレス408を
求める。
Upon completion of the FIFO clearing, the state transits to the state [DMA] 801 (timing T3), and the DMA
In the control unit 105, the start address 406 of the next line is transferred from the address register 111 to the address counter 110, and at the same time, the value of the line register 112 is added to the value of the address register to obtain the start address 408 of the next line.

【0042】アドレスカウンタ110に値をセットした
時点からDMA転送を開始し,lgate_信号がLo
wになった時点で出力制御部108がプリンタ装置10
4への出力を開始する。
The DMA transfer starts when the value is set in the address counter 110, and the lgate_ signal becomes Lo.
w, the output control unit 108
Output to 4 starts.

【0043】したがって,上記によりメインメモリ10
1内の無効データを飛ばし,次ラインの有効データのD
MA転送を開始することができる。以下,同様に2ライ
ン目以降も,乱れのない画像をプリントすることができ
る。
Therefore, the main memory 10
Skip invalid data in 1 and D of valid data in the next line
MA transfer can be initiated. Hereinafter, similarly, an image without disturbance can be printed on the second and subsequent lines.

【0044】(動作例2)ここでは,イメージデータが
用紙サイズより小さい場合の動作について説明する。
(Operation Example 2) Here, the operation when the image data is smaller than the paper size will be described.

【0045】図6はイメージデータが用紙サイズより小
さい場合の動作を示す説明図,図7はプリンタ制御装置
の動作例2を示すタイミングチャート,図8はプリンタ
制御装置の状態遷移図である。
FIG. 6 is an explanatory diagram showing an operation when the image data is smaller than the paper size, FIG. 7 is a timing chart showing an operation example 2 of the printer control device, and FIG. 8 is a state transition diagram of the printer control device.

【0046】図6において,601はイメージデータの
ライン幅,602は1ラインにおける印字しない領域,
603は用紙幅,604は第1ラインの先頭アドレス,
605は第2ラインの先頭アドレス,606は第3ライ
ンの先頭アドレス,607はイメージデータ最後のアド
レスである。また,図7に示す701はプリンタ制御装
置の動作状態を示すステートである。
In FIG. 6, reference numeral 601 denotes a line width of image data, 602 denotes a non-printing area in one line,
603 is the paper width, 604 is the first address of the first line,
605 is the start address of the second line, 606 is the start address of the third line, and 607 is the last address of the image data. Reference numeral 701 shown in FIG. 7 denotes a state indicating an operation state of the printer control device.

【0047】lgate_/fgate_信号は,プリ
ンタ装置104が用紙のサイズを検出することにより出
力され,それぞれLowのときに印字有効領域を示す。
プリンタ装置104への出力は,fgate_信号がL
owで,かつlgate_信号がLowのときに行われ
る。また,lgate_信号がHighになると1ライ
ンにおけるプリントが終了する。
The lgate_ / fgate_ signal is output when the printer device 104 detects the size of the sheet, and indicates an effective printing area when each signal is low.
The output to the printer device 104 is such that the fgate_ signal is L
This is performed when the signal is low and the lgate_ signal is low. Also, when the lgate_ signal becomes High, printing on one line is completed.

【0048】lgate 信号がLowになるとステー
ト[DMA]801からステート[DMA&PRIN
T]802に遷移し,プリンタ装置104への出力を開
始する(タイミングT4)。
Lgate When the signal becomes low, the state [DMA] 801 changes to the state [DMA & PRIN].
[T] 802, and starts output to the printer device 104 (timing T4).

【0049】イメージデータのサイズが小さいので,l
gate 信号がHighになる前にアドレスカウンタ
110が次ラインの先頭アドレス605をカウントす
る。DMA制御部105内の制御部109は,アドレス
カウンタ110とアドレスレジスタ111との値を一致
を検知すると,アドレスカウンタ110のカウントアッ
プを停止する。また,FIFO制御部107はFIFO
部106への書き込みを停止する。
Since the size of the image data is small, l
gate Before the signal becomes High, the address counter 110 counts the start address 605 of the next line. When the control unit 109 in the DMA control unit 105 detects that the values of the address counter 110 and the address register 111 match, the control unit 109 stops counting up the address counter 110. In addition, the FIFO control unit 107
The writing to the unit 106 is stopped.

【0050】lgate_信号がHighになる前にD
MA転送が終了するので,ステートは[PRINT]8
04へと遷移する(タイミングT5)。FIFO部10
6にはアドレス607のデータまで格納される。
D before the lgate_ signal goes high
Since the MA transfer is completed, the state is [PRINT] 8
04 (timing T5). FIFO section 10
6 stores data up to the address 607.

【0051】アドレス607のデータがFIFO部10
6から出力され,FIFO部106が空になるとステー
ト[DMA]801へ遷移する(タイミングT6)。こ
のとき,DMA制御部105内では次ラインの先頭アド
レス605をアドレスレジスタ111からアドレスカウ
ンタ110に転送し,同時にラインレジスタ112の値
をアドレスレジスタ111の値に加算し,次々ラインの
先頭アドレス606を求める。
The data of the address 607 is stored in the FIFO 10
6 and the state transits to the state [DMA] 801 when the FIFO unit 106 becomes empty (timing T6). At this time, in the DMA control unit 105, the start address 605 of the next line is transferred from the address register 111 to the address counter 110, and at the same time, the value of the line register 112 is added to the value of the address register 111. Ask.

【0052】そして,アドレスカウンタ110の値にセ
ットした時点からDMA転送が始まる。また,lgat
e_信号がHighからLowに変化した時点(タイミ
ングT7)から,FIFO部106からの読み出しを開
始する。
Then, the DMA transfer starts from the time when the value of the address counter 110 is set. Also, lgat
Reading from the FIFO unit 106 is started from the point in time when the e_ signal changes from High to Low (timing T7).

【0053】これにより,用紙の印字しない領域に出力
することなく,次ラインのDMA転送が可能となる。以
下同様に2ランイ目以降も,乱れのない画像をプリント
することができる。
As a result, the DMA transfer of the next line can be performed without outputting to the non-printing area of the sheet. In the same manner, an image without disturbance can be printed after the second run.

【0054】[0054]

【発明の効果】以上説明したように,本発明に係るプリ
ンタ制御装置(請求項1)によれば,イメージデータの
ライン幅を保持して次ラインの先頭アドレスを求め,ア
ドレスカウンタの値が一致した時点でDMA転送を一時
停止させることにより,用紙幅に合わせたデータ出力が
行えるため,画像の乱れを排除でき,しかも大規模なイ
メージデータサイズになるのが回避されるため,コスト
ダウンを図ることができる。
As described above, according to the printer controller of the present invention (claim 1), the head address of the next line is obtained while maintaining the line width of the image data, and the value of the address counter matches. By temporarily stopping the DMA transfer at the point of time, data output according to the paper width can be performed, so that image disturbance can be eliminated and a large-scale image data size can be avoided, thereby reducing costs. be able to.

【0055】また,本発明に係るプリンタ制御装置(請
求項2)によれば,1ページ分のライン数を保持し,ラ
インの先頭アドレスを求める毎にデクリメントすること
により,大規模なイメージデータのサイズのカウンタを
用いないため,そのコストダウンを図ることができる。
Further, according to the printer control apparatus of the present invention, the number of lines for one page is held and decremented every time the head address of the line is obtained. Since a size counter is not used, the cost can be reduced.

【0056】また,本発明に係るプリンタ制御装置(請
求項3)によれば,一時格納手段に無効データが存在す
る場合には消去して次ラインの先頭イメージデータから
格納し,1ラインのデータが全て出力されて空になった
場合はすぐに次ラインのデータのDMA転送を開始する
ため,イメージデータが用紙サイズより大きい場合や,
小さい場合であっても画像を乱すことなくプリント出力
を行うことができる。
According to the printer control device of the present invention, when invalid data is present in the temporary storage means, it is deleted and stored from the first image data of the next line, and the data of one line is stored. Is output, the DMA transfer of the data of the next line is started immediately. Therefore, when the image data is larger than the paper size,
Even in a small case, print output can be performed without disturbing the image.

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

【図1】実施の形態に係るプリンタ制御装置を用いたシ
ステム構成を示すブロック図である。
FIG. 1 is a block diagram showing a system configuration using a printer control device according to an embodiment.

【図2】実施の形態に係るDMAアドレスの生成方法を
示す説明図である。
FIG. 2 is an explanatory diagram showing a method of generating a DMA address according to the embodiment;

【図3】図1に示すDMA制御部の制御動作を示すフロ
ーチャートである。
FIG. 3 is a flowchart showing a control operation of a DMA control unit shown in FIG.

【図4】動作例1に係るイメージデータが用紙サイズよ
り大きい場合の動作を示す説明図である。
FIG. 4 is an explanatory diagram showing an operation when image data according to an operation example 1 is larger than a sheet size.

【図5】プリンタ制御装置の動作例1を示すタイミング
チャートである。
FIG. 5 is a timing chart illustrating an operation example 1 of the printer control device.

【図6】動作例2に係るイメージデータが用紙サイズよ
り大きい場合の動作を示す説明図である。
FIG. 6 is an explanatory diagram illustrating an operation when image data according to an operation example 2 is larger than a sheet size.

【図7】プリンタ制御装置の動作例1を示すタイミング
チャートである。
FIG. 7 is a timing chart illustrating an operation example 1 of the printer control device.

【図8】実施の形態に係るプリンタ制御装置の状態遷移
図である。
FIG. 8 is a state transition diagram of the printer control device according to the embodiment.

【符号の説明】[Explanation of symbols]

101 メインメモリ 103 プリンタI/F装置 104 プリンタ装置 105 DMA制御部 106 FIFO部 107 FIFO制御部 108 出力制御部 109 制御部 110 アドレスカウンタ 111 アドレスレジスタ 112 ラインレジスタ 113 アドレス変更部 114 ページカウンタ 101 Main Memory 103 Printer I / F Device 104 Printer Device 105 DMA Control Unit 106 FIFO Unit 107 FIFO Control Unit 108 Output Control Unit 109 Control Unit 110 Address Counter 111 Address Register 112 Line Register 113 Address Change Unit 114 Page Counter

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 メインメモリ上に展開したイメージデー
タをライン毎に読み出し,プリンタへのデータ出力を制
御するプリンタ制御装置において,前記メインメモリか
らDMA転送されるイメージデータを一時格納する一時
格納手段と,前記一時格納手段へのデータ書き込みおよ
びデータの消去を制御するメモリ制御手段と,前記一時
格納手段からのデータをプリントするのに適合した形式
およびタイミングでプリンタに出力する出力制御手段
と,DMA転送の開始アドレスを記憶するアドレスレジ
スタ,DMA転送毎にアドレスをカウントするアドレス
カウンタ,ライン幅を保持するラインレジスタ,前記ラ
インレジスタの値を用いて前記アドレスレジスタの値を
変更するアドレス変更部,前記ラインレジスタを用いて
次ラインの先頭アドレスを求め,前記アドレスカウンタ
が次ライン先頭アドレスと一致した時点でDMA転送を
一時停止させる制御手段により構成されるDMA制御手
段と,を備えたことを特徴とするプリンタ制御装置。
1. A printer control device for reading out image data developed on a main memory line by line and controlling data output to a printer, a temporary storage means for temporarily storing image data DMA-transferred from the main memory. Memory control means for controlling writing and erasing of data in the temporary storage means, output control means for outputting data from the temporary storage means to a printer in a format and timing suitable for printing, and DMA transfer Address register for storing the start address of each line, an address counter for counting addresses for each DMA transfer, a line register for holding a line width, an address changing unit for changing the value of the address register using the value of the line register, Use the register to set the start address of the next line. And a DMA controller configured to suspend DMA transfer when the address counter matches the next line head address.
【請求項2】 前記DMA制御手段に,1ページ分のラ
イン数を保持するページカウンタを備え,1ライン毎に
DMA転送が終了した時点で前記ページカウンタをカウ
ントダウンし,前記メインメモリからの1ページ分のイ
メージデータの転送が終了した時点でDMA転送を終了
させることを特徴とする請求項1に記載のプリンタ制御
装置。
2. The system according to claim 1, wherein the DMA control means includes a page counter for holding the number of lines for one page. When the DMA transfer is completed for each line, the page counter is counted down, and one page from the main memory is deleted. 2. The printer control device according to claim 1, wherein the DMA transfer is terminated when the transfer of the image data for the minute is completed.
【請求項3】 前記メモリ制御手段は,前記一時格納手
段に格納されたイメージデータが用紙幅に対して大きい
場合は,用紙幅のイメージデータが出力された後に前記
一時格納手段のデータを消去し,前記一時格納手段に格
納されたイメージデータが用紙幅に対して小さい場合
は,前記一時格納手段のデータが空になり次第,次ライ
ンのDMA転送の開始を要求して前記一時格納手段への
書き込みを行うことを特徴とする請求項1に記載のプリ
ンタ制御装置。
3. If the image data stored in the temporary storage means is larger than the paper width, the memory control means erases the data in the temporary storage means after outputting the image data of the paper width. If the image data stored in the temporary storage means is smaller than the paper width, as soon as the data in the temporary storage means becomes empty, a request to start DMA transfer of the next line is issued to the temporary storage means. The printer control device according to claim 1, wherein writing is performed.
JP8266636A 1996-09-18 1996-09-18 Printer controller Pending JPH1091365A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8266636A JPH1091365A (en) 1996-09-18 1996-09-18 Printer controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8266636A JPH1091365A (en) 1996-09-18 1996-09-18 Printer controller

Publications (1)

Publication Number Publication Date
JPH1091365A true JPH1091365A (en) 1998-04-10

Family

ID=17433590

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8266636A Pending JPH1091365A (en) 1996-09-18 1996-09-18 Printer controller

Country Status (1)

Country Link
JP (1) JPH1091365A (en)

Similar Documents

Publication Publication Date Title
JP2001341363A (en) Blank page printing method for printer controller
JPH1091365A (en) Printer controller
JP3595704B2 (en) Printer device and print output method
JPH0262267A (en) Printer
JP3268644B2 (en) DMA controller
JPH1027075A (en) Printer controller
JP2001134484A (en) Method and device for controlling memory
JP2712414B2 (en) Image storage circuit
JP3159855B2 (en) Access circuit for image memory in printing apparatus and printing apparatus
JP4313548B2 (en) Image forming apparatus
JPH08152978A (en) Controller for printer engine
JPH09288639A (en) Information processor
JPH07254061A (en) Dma transfer device for image processor
JPH1013601A (en) Image processor
JP2002307764A (en) Print controller, print control method, program and storage medium
JP2005182156A (en) Image transferring device and method
JPH1040026A (en) Data transfer device
JPH0567983B2 (en)
JPH082021A (en) Page printer device
JPH08310073A (en) Printer controller
JPH0239383A (en) Image processor
JPH01210991A (en) Busy control circuit for display device
JPH04261876A (en) Printer device
JPH047175A (en) Page printer controlling apparatus
JPH0347777A (en) Printing control system