JP2002041447A - Printer - Google Patents

Printer

Info

Publication number
JP2002041447A
JP2002041447A JP2000223745A JP2000223745A JP2002041447A JP 2002041447 A JP2002041447 A JP 2002041447A JP 2000223745 A JP2000223745 A JP 2000223745A JP 2000223745 A JP2000223745 A JP 2000223745A JP 2002041447 A JP2002041447 A JP 2002041447A
Authority
JP
Japan
Prior art keywords
data
unit
buffer
dma
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.)
Pending
Application number
JP2000223745A
Other languages
Japanese (ja)
Inventor
Izumi Kusutaki
泉 楠滝
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2000223745A priority Critical patent/JP2002041447A/en
Publication of JP2002041447A publication Critical patent/JP2002041447A/en
Pending legal-status Critical Current

Links

Landscapes

  • Record Information Processing For Printing (AREA)
  • Bus Control (AREA)
  • Information Transfer Systems (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a printer capable of stably supplying data to an engine without causing reduction of a processing speed and increment in cost in a DMA. SOLUTION: A DMA part 108 performs burst transfer of printing data stored in a RAM 105, according to a transfer request signal (DMAREQ signal) outputted from a buffer part 109. Namely, the DMA part 108 is set so as to divide the printing data into unit data for each prescribed size (32 bytes in this printer) and transfers the unit data to the buffer part 109. A shift register converts parallel data outputted from the buffer part 109 into serial data. A printing control part 107 outputs a drive signal to the engine 102.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、プリントエンジン
に対してデータをバースト転送するタイプのプリンター
に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a printer that transfers data to a print engine in bursts.

【0002】[0002]

【従来の技術】従来、端末装置(パソコンやワークステ
ーション)とプリンターとをネットワーク接続してなる
印刷システムが利用されている。このようなシステムに
設置されているプリンターは、通常、CPU、RAM、
DMA部、バッファおよびプリントエンジンを備えてい
る。これらのうち、RAMは、端末装置から送信された
印刷データ(ビットマップデータ)の記憶に利用され
る。また、バッファは、印刷エンジンに印刷データを安
定供給するためのものである。
2. Description of the Related Art Conventionally, a printing system in which a terminal device (a personal computer or a workstation) and a printer are connected to a network has been used. Printers installed in such systems usually include a CPU, a RAM,
It has a DMA unit, a buffer and a print engine. Of these, the RAM is used for storing print data (bitmap data) transmitted from the terminal device. The buffer is for stably supplying print data to the print engine.

【0003】DMA部は、バッファの要求に応じて、R
AMの印刷データを、順次的にバッファに送り込むため
のものである。これにより、CPUを使用することな
く、RAMからバッファ・エンジンへのデータ転送を行
うことが可能となっている。また、DMA部からバッフ
ァへのデータ転送に、バースト転送を利用しているプリ
ンターもある。バースト転送では、出力にかかるライン
データ(1ライン分の印刷データ)を、バス幅によって
決まる所定サイズ(例えば32バイト)毎の単位データ
に区切るようになっている。そして、単位データ毎に、
特定の時間間隔で印刷データを転送するように設定され
ている。これにより、通常のシングルアクセス方式に比
して、転送速度を高速化することが可能となる。
[0003] In response to a request for a buffer, the DMA unit performs R
This is for sequentially sending the AM print data to the buffer. As a result, data can be transferred from the RAM to the buffer engine without using the CPU. Some printers use burst transfer for data transfer from the DMA unit to the buffer. In the burst transfer, line data (print data for one line) required for output is divided into unit data of a predetermined size (for example, 32 bytes) determined by a bus width. And for each unit data,
It is set to transfer print data at specific time intervals. This makes it possible to increase the transfer speed as compared with the normal single access method.

【0004】また、バースト転送では、ラインデータの
サイズが、単位データサイズの整数倍になっていない場
合もあり、図8及び図9にその例を示す。図8(a)及
び図9(a)は、DMA部がラインデータを単位データ
に区切った状態を示し、図8(b)及び図9(b)はバ
ッファへの記録状態を示す。従来では、図8に示すよう
に、単位データを構成できない余剰部分にNULLデー
タ(白色に応じたデータ)を付加することで、バースト
転送を実行するようになっていた。また、図9に示すよ
うに、ラインデータの余剰部分だけをシングルアクセス
方式で転送する方法も採用されていた。
In burst transfer, the line data size may not be an integral multiple of the unit data size, and examples thereof are shown in FIGS. FIGS. 8A and 9A show a state in which the DMA section divides line data into unit data, and FIGS. 8B and 9B show a state of recording in the buffer. Conventionally, as shown in FIG. 8, a burst transfer is performed by adding NULL data (data corresponding to white) to a surplus portion where unit data cannot be formed. Further, as shown in FIG. 9, a method of transferring only a surplus portion of line data by a single access method has been adopted.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、図8に
示す方法では、NULLデータを付加するために、DM
Aのソフト処理を複雑化する必要がある。このため、D
MAにおける処理速度(パフォーマンス)の低下を招い
ていた。また、NULLデータの分だけ、メモリ容量
(RAMおよびバッファメモリの容量)を余計に消費し
てしまうという問題もあった。
However, in the method shown in FIG. 8, the DM data is added in order to add NULL data.
The software processing of A needs to be complicated. For this reason, D
The processing speed (performance) in MA has been reduced. There is also a problem that the memory capacity (the capacity of the RAM and the buffer memory) is excessively consumed by the NULL data.

【0006】また、図9に示す方法では、シングルアク
セス方式の低速さ故に、余剰部分の転送に多量の時間が
消費されることとなる。このため、バッファからエンジ
ンに対するデータ供給を高速化すると、バッファ内のデ
ータが尽きてしまい、エンジンにデータを供給できなく
なるという問題があった。
Further, in the method shown in FIG. 9, a large amount of time is consumed for transferring the surplus part due to the low speed of the single access method. For this reason, when the speed of data supply from the buffer to the engine is increased, the data in the buffer runs out, and there is a problem that data cannot be supplied to the engine.

【0007】本発明は、上記のような従来の問題点を解
決するために成されたものであり、DMAにおける処理
速度の低下およびコストアップを招来することなく、エ
ンジンに対してデータを安定供給できるプリンターを提
供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned conventional problems, and provides a stable supply of data to an engine without causing a decrease in processing speed and an increase in cost in DMA. The purpose is to provide a printer that can.

【0008】[0008]

【課題を解決するための手段】本発明は、印刷データを
記憶するメモリと、該印刷データに基づいて用紙に印刷
を行うエンジン部と、前記メモリに記憶されている印刷
データを前記エンジン部に転送するバッファと、前記メ
モリに記憶されている印刷データを所定サイズ毎に区切
って単位データを生成し、前記バッファにバースト転送
するDMA部とを備えたプリンターである。前記DMA
部は、印刷データを先頭から順次単位データに区切り、
最後に残った印刷データの有効データが単位データより
も小さくなった場合には、単位データのサイズに足りな
い部分に不特定のデータを満たし、有効データと不特定
データからなる混成データを生成し、前記バッファは、
混成データから有効データを抽出し、前記エンジンに供
給することを特徴とするものである。
According to the present invention, there is provided a memory for storing print data, an engine unit for printing on paper based on the print data, and a print data stored in the memory for the engine unit. The printer includes a buffer for transferring, and a DMA unit for generating unit data by dividing print data stored in the memory for each predetermined size and performing burst transfer to the buffer. The DMA
The unit divides the print data into unit data sequentially from the top,
If the valid data of the last remaining print data is smaller than the unit data, the portion less than the size of the unit data is filled with unspecified data and mixed data consisting of valid data and unspecified data is generated. , The buffer
It is characterized in that valid data is extracted from the hybrid data and supplied to the engine.

【0009】本発明に係るプリンターは、前記DMA部
は、印刷データおよび単位データのサイズから、混成デ
ータを特定する混成データ情報を取得して前記バッファ
に伝達し、前記バッファは、印刷データおよび単位デー
タのサイズから、混成データに含まれている有効データ
のサイズを特定し、混成データ情報および有効データサ
イズに基づいて、混成データから有効データを抽出する
ことを特徴とするものである。
In the printer according to the present invention, the DMA unit acquires hybrid data information for specifying hybrid data from the size of the print data and the unit data, and transmits the hybrid data information to the buffer. The size of the valid data included in the hybrid data is specified from the size of the data, and the valid data is extracted from the hybrid data based on the hybrid data information and the valid data size.

【0010】本発明に係るプリンターは、前記バッファ
は、単位データを1つずつ記憶させるためのN段のバッ
ファメモリと、該N段のバッファメモリ内のデータを順
次移動させてエンジンに供給するとともに、混成データ
情報に基づいて、混成データを保持しているバッファメ
モリに特定のフラグを立てる制御部と、印刷データおよ
び単位データのサイズから混成データに含まれている有
効データのサイズを特定するともに、最終段のバッファ
メモリに上記のフラグが立った場合、このメモリ内の単
位データから有効データを抽出する有効データ抽出部と
を有することを特徴とするものである。
In the printer according to the present invention, the buffer includes an N-stage buffer memory for storing unit data one by one, and sequentially moves data in the N-stage buffer memory to supply the data to the engine. A control unit for setting a specific flag in the buffer memory holding the mixed data based on the mixed data information, and specifying the size of the valid data included in the mixed data from the size of the print data and the unit data. When the flag is set in the buffer memory at the last stage, a valid data extracting unit for extracting valid data from the unit data in the memory is provided.

【0011】本発明に係るプリンターは、前記制御部
は、N段のバッファメモリ内において、混成データとと
もに前記フラグを移動させることを特徴とするものであ
る。
The printer according to the present invention is characterized in that the control unit moves the flag together with the mixed data in the buffer memory of N stages.

【0012】本発明に係るプリンターは、前記制御部
は、N段のバッファメモリ内における単位データの移動
の際、移動先のバッファメモリが空であることを確認し
てから単位データを移動させることを特徴とするもので
ある。
In the printer according to the present invention, the control unit may move the unit data after confirming that the destination buffer memory is empty when moving the unit data in the N-stage buffer memory. It is characterized by the following.

【0013】本発明に係るプリンターは、前記制御部
は、最前段のバッファメモリが空となったときに、DM
A部に対して新たな単位データの転送を要求することを
特徴とするものである。
In the printer according to the present invention, when the buffer memory at the front stage becomes empty,
It is characterized by requesting the transfer of new unit data to the unit A.

【0014】本発明に係るプリンターは、前記DMA部
は、印刷データの先頭部から終端部にかけて連続して単
位データの生成を行い、作成した順に前記バッファに転
送することを特徴とするものである。
The printer according to the present invention is characterized in that the DMA unit continuously generates unit data from the beginning to the end of the print data, and transfers the unit data to the buffer in the order of creation. .

【0015】本発明に係るプリンターは、前記DMA部
は、印刷データの先頭部から終端部にかけて連続して単
位データの生成を行い、作成順とは逆の順序でバッファ
に転送することを特徴とするものである。
The printer according to the present invention is characterized in that the DMA unit continuously generates unit data from the beginning to the end of the print data, and transfers the unit data to the buffer in the reverse order of the creation order. Is what you do.

【0016】本発明において、メモリの印刷データをバ
ッファ部に転送するために、印刷データを単位データ毎
にバッファ部にバースト転送を利用する。そして、印刷
データを単位データサイズに区切って、最終的に有効デ
ータが少なくなった場合でも、他のデータ(不特定デー
タ)と組み合わせて単位データ(混成データ)を作成
し、バースト転送を行うようになっている。これによ
り、常にバースト転送が可能になり、転送速度を常に高
く保つことが可能となる。また、有効データと組み合わ
せて混成データを作成するために、従来のように、NU
LLデータではなく、メモリ内にある不特定のデータ
(例えば、未転送の印刷データに隣接して格納されてい
る他のデータ)を利用するようになっている。これによ
り、NULLデータを付加する等の複雑な処理を行う必
要がないため、DMAの処理能力を減じることなく、バ
ースト転送を行える。また、NULLデータのためのメ
モリを用意する必要がないので、メモリにおける消費量
を抑制できる。
In the present invention, in order to transfer the print data in the memory to the buffer unit, burst transfer of the print data to the buffer unit for each unit data is used. Then, the print data is divided into unit data sizes, and even when the effective data finally decreases, unit data (mixed data) is created in combination with other data (unspecified data) and burst transfer is performed. It has become. As a result, the burst transfer can be always performed, and the transfer speed can always be kept high. In addition, in order to create hybrid data in combination with valid data, NU
Instead of LL data, unspecified data in a memory (for example, other data stored adjacent to untransferred print data) is used. Accordingly, since there is no need to perform complicated processing such as adding NULL data, burst transfer can be performed without reducing the processing capacity of the DMA. Further, since there is no need to prepare a memory for NULL data, it is possible to suppress the amount of memory consumption.

【0017】[0017]

【発明の実施の形態】本発明の実施の形態について図面
を用いて説明する。図1は、本発明に係るプリンターの
一実施形態を示すブロック図である。このプリンター
は、端末装置(ホストPC;ノートパソコンやワークス
テーション)111とともにネットワークに接続され、
各端末装置から伝達される印刷データを印刷する機能を
有するものである。
Embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of the printer according to the present invention. This printer is connected to a network together with a terminal device (host PC; notebook computer or workstation) 111,
It has a function of printing print data transmitted from each terminal device.

【0018】図1に示すように、本プリンターは、プリ
ンターコントローラ101およびエンジン102を有し
ている。エンジン102は、入力された印刷データに基
づいて、所定のシート(記録用紙)にトナー像を形成す
るものである。また、プリンターコントローラ101
は、端末装置111から伝達される印刷データの蓄積、
および、エンジン102に対する印刷データの供給を実
行するものである。
As shown in FIG. 1, the printer has a printer controller 101 and an engine 102. The engine 102 forms a toner image on a predetermined sheet (recording paper) based on the input print data. Also, the printer controller 101
Is the accumulation of print data transmitted from the terminal device 111,
The print data is supplied to the engine 102.

【0019】図1に示すように、プリンターコントロー
ラ101は、CPU103、ROM104、RAM10
5、ホストI/F106、プリント制御部107、DM
A部108、バッファ部109、シフトレジスタ110
を備えている。ROM104は、CPU103の使用す
るプログラムを記憶しておくためのメモリである。ホス
トI/F106は、端末装置111からの印刷データの
送信を受け付けるためのインターフェースである。RA
M105は、送信された印刷データを記憶させておくた
めのメモリである。バッファ部109は、印刷データ
(ビットマップ形式のパラレルデータ)を蓄積するため
のバッファメモリを備えている。なお、このバッファ部
109の詳細な構成については後述する。
As shown in FIG. 1, the printer controller 101 includes a CPU 103, a ROM 104, a RAM 10
5, host I / F 106, print control unit 107, DM
A section 108, buffer section 109, shift register 110
It has. The ROM 104 is a memory for storing a program used by the CPU 103. The host I / F 106 is an interface for receiving transmission of print data from the terminal device 111. RA
M105 is a memory for storing the transmitted print data. The buffer unit 109 includes a buffer memory for storing print data (parallel data in a bitmap format). The detailed configuration of the buffer unit 109 will be described later.

【0020】DMA部108は、バッファ部109の転
送要求信号(DMAREQ信号)に応じて、RAM10
5に記憶されている印刷データをバースト転送するため
のものである。すなわち、DMA部108は、印刷デー
タを、所定サイズ(本プリンターでは32バイト)毎の
単位データに区切るようになっている。そして、バッフ
ァ部109に対し、単位データを転送するように設定さ
れている。なお、DMA部108における単位データの
生成方法については後述する。
The DMA unit 108 responds to a transfer request signal (DMAREQ signal) from the buffer unit 109 by
5 for burst transfer of the print data stored in the storage unit 5. That is, the DMA unit 108 divides the print data into unit data for each predetermined size (32 bytes in this printer). Then, the setting is made so that the unit data is transferred to the buffer unit 109. The method of generating the unit data in the DMA unit 108 will be described later.

【0021】シフトレジスタ110は、バッファ部10
9から出力されたパラレルデータをシリアルデータに変
換するものである。プリント制御部107は、エンジン
102に対して駆動信号を出力するものである。なお、
エンジン102は、駆動信号に応じて同期信号を出力す
るように設定されている。そして、上のプリント制御部
107は、同期信号と同期クロックに応じて、シフトレ
ジスタ110にシフト要求し、パラレルデータをシリア
ルデータに変換し、エンジン102に送信するととも
に、バッファ部109からパラレルデータをシフトレジ
スタ110に送信させるLOAD信号をバッファ部10
9に送出する機能を有している。すなわち、LOAD信
号は、シフトレジスタ110のデータロード信号であ
り、この信号に同期してデータを貯える。さらに、SI
FTEN信号は、シフトレジスタ110のイネーブル信
号であり、この信号が有効である期間パラレルデータを
シフトする。
The shift register 110 includes a buffer unit 10
9 is for converting the parallel data output from 9 into serial data. The print control unit 107 outputs a drive signal to the engine 102. In addition,
The engine 102 is set to output a synchronization signal according to the drive signal. Then, the upper print control unit 107 issues a shift request to the shift register 110 in accordance with the synchronization signal and the synchronization clock, converts the parallel data into serial data, transmits the serial data to the engine 102, and transmits the parallel data from the buffer unit 109. A LOAD signal to be transmitted to the shift register 110 is transmitted to the buffer unit 10
9 is provided. That is, the LOAD signal is a data load signal for the shift register 110, and stores data in synchronization with this signal. Furthermore, SI
The FTEN signal is an enable signal for the shift register 110, and shifts the parallel data while the signal is valid.

【0022】CPU103は、CPUBUSを介して各
装置104〜110と接続されており、これら装置10
4〜110を用いて、外部から送信されてきた印刷デー
タをエンジン102に適切に伝達させる機能を有してい
る。
The CPU 103 is connected to each of the devices 104 to 110 via the CPU BUS.
4 to 110, a function of appropriately transmitting print data transmitted from the outside to the engine 102.

【0023】次に、DMA部108における単位データ
の処理方法について説明する。本プリンターのRAM1
05(図1参照)に記憶される印刷データは、所定バイ
ト数のラインデータを単位とするものである。そして、
DMA部108は、バースト転送を行うために、このラ
インデータを32バイトずつの単位データに分割するよ
うに設定されている。
Next, a method of processing the unit data in the DMA unit 108 will be described. RAM1 of this printer
The print data stored in 05 (see FIG. 1) is a unit of line data of a predetermined number of bytes. And
The DMA unit 108 is set to divide this line data into unit data of 32 bytes in order to perform burst transfer.

【0024】図2(a)は、DMA部がラインデータを
単位データに区切った状態を示し、図2(b)はバッフ
ァへの記録状態を示す。図2に示すように、120バイ
トのラインデータが複数集まって印刷データを構成して
いる場合、DMA部108は、まず、1番目のラインデ
ータから3つの単位データ(32バイト)を作成する。
3×32=96バイトとなるから、1番目のラインデー
タに残った24バイトのデータを、2番目のラインデー
タにおける先頭の8バイトと組み合わせて単位データ
(32バイト)を構成する。そして、2番目のラインデ
ータに残る112バイトのデータから3つの単位データ
をとり、残りの16バイトを3番目のラインデータにお
ける先頭の16(112−3×32)バイトと組み合わ
せて単位データを構成する。
FIG. 2A shows a state in which the DMA section divides line data into unit data, and FIG. 2B shows a state of recording in a buffer. As shown in FIG. 2, when a plurality of 120-byte line data are collected to form print data, the DMA unit 108 first creates three unit data (32 bytes) from the first line data.
Since 3 × 32 = 96 bytes, the unit data (32 bytes) is formed by combining the remaining 24 bytes of data in the first line data with the first 8 bytes in the second line data. Then, three unit data are taken from the remaining 112 bytes of data in the second line data, and the remaining 16 bytes are combined with the first 16 (112−3 × 32) bytes of the third line data to form the unit data. I do.

【0025】このように、DMA部108は、ラインデ
ータ(120バイト)の余剰部分が32バイトより小さ
い場合、その余剰部分を、他のラインデータの一部と組
み合わせて単位データを作成するようになっている。そ
して、最後のラインデータ(図2ではLライン)におい
て、印刷データの余剰部分が32バイトより小さくなっ
た場合、DMA部108は、その余剰部分を、RAM1
05内において印刷データに隣接して記憶されている不
特定のデータ(不定データ)と組み合わせて単位データ
を作成するように設定されている。
As described above, when the surplus part of the line data (120 bytes) is smaller than 32 bytes, the DMA unit 108 combines the surplus part with another part of the line data to create unit data. Has become. If the surplus portion of the print data becomes smaller than 32 bytes in the last line data (L line in FIG. 2), the DMA unit 108 stores the surplus portion in the RAM 1
The unit data is set so as to be combined with unspecified data (undefined data) stored adjacent to the print data in the unit 05.

【0026】この不定データは、印刷データをバースト
転送するために用いられるものであり、最後に作成され
る単位データ(混成データ)だけに含まれているもので
ある。不定データとしては、例えば、印刷データの余剰
部分に隣接して格納されている他のデータを用いること
が可能である。なお、ここでは、混成データに含まれる
印刷データ部分(不定データではない部分)を、有効デ
ータと称する。
The indefinite data is used for burst transfer of the print data, and is included only in the unit data (mixed data) created last. As the indefinite data, for example, other data stored adjacent to the surplus portion of the print data can be used. Here, the print data portion (portion that is not indefinite data) included in the mixed data is referred to as valid data.

【0027】DMA部108は、上記のように作成した
単位データを、作成した順にバッファ部109に転送す
るように設定されている。従って、最後に転送される単
位データは、混成データとなる。こうして、BITMA
P DATA信号として、ビットマップされた印刷デー
タをバッファ部109に送出する。また、DMA部10
8は、最後に転送される混成データに対し、最後に転送
される単位データである。ことを示す情報(last−
flag)を付加するように設定されている。また、同
様に、DMA部108は、最初に転送される単位データ
に、最初に転送される単位データであることを示す情報
(first−flag)を付加するようになってい
る。さらに、DMA部108は、バッファ部109に対
し、印刷データ(有効データ)における下位5ビットを
示す情報(下位ビット情報)を伝達するように設定され
ている。BYTESIFT DATA信号は、DMA部
108からバッファ部109に送られる下位ビット情報
である。
The DMA unit 108 is set to transfer the unit data created as described above to the buffer unit 109 in the order of creation. Therefore, the unit data transferred last is mixed data. Thus, BITMA
The bit-mapped print data is sent to the buffer unit 109 as a P DATA signal. The DMA unit 10
Reference numeral 8 denotes unit data to be transferred last with respect to the mixed data to be transferred last. (Last-
flag). Similarly, the DMA unit 108 adds information (first-flag) indicating the unit data to be transferred first to the unit data to be transferred first. Further, the DMA unit 108 is set so as to transmit information (lower bit information) indicating the lower 5 bits in the print data (valid data) to the buffer unit 109. The BYTESIFT DATA signal is lower bit information sent from the DMA unit 108 to the buffer unit 109.

【0028】次に、バッファ部109の詳細な構成につ
いて説明する。図3に示すように、バッファ部109
は、多段バッファ301、セレクタ302、バッファ制
御部303、有効バイトバッファ405、判断部406
から構成されている。多段バッファ301は、直列に接
続されたN段のバッファメモリ403_0〜403_N
からなるものである。なお、各バッファメモリ403_
0〜403_Nには、32バイトの単位データが1つず
つ格納されるようになっている。また、図3に示すよう
に、各バッファメモリ403_0〜403_Nには、上
記したlast−flagおよびfirst−flag
を立てるためのファーストフラグ記憶部401_0〜4
01_Nおよびラストフラグ記憶部402_0〜402
_Nが備えられている。
Next, a detailed configuration of the buffer unit 109 will be described. As shown in FIG.
Are a multi-stage buffer 301, a selector 302, a buffer control unit 303, a valid byte buffer 405, and a determination unit 406.
It is composed of The multi-stage buffer 301 includes N stages of buffer memories 403_0 to 403_N connected in series.
It consists of Note that each buffer memory 403_
In 0 to 403_N, 32-byte unit data is stored one by one. Further, as shown in FIG. 3, each of the buffer memories 403_0 to 403_N has the last-flag and the first-flag described above.
Flag storage units 401_0 to 401_4 for setting
01_N and last flag storage units 402_0 to 402_402
_N are provided.

【0029】そして、最後に転送された混成データを格
納しているバッファメモリのラストフラグ記憶部402
_0〜402_Nにlast−flagが立つととも
に、最初に転送されてきた単位データを格納しているバ
ッファメモリのファーストフラグ記憶部401_0〜4
01_Nに、first−flagが立つように設定さ
れている。
Then, the last flag storage section 402 of the buffer memory storing the finally transferred hybrid data is stored.
_0 to 402_N have the last-flag, and the first flag storage units 401_0 to 401_4 of the buffer memory storing the unit data transferred first.
The first_flag is set to 01_N.

【0030】セレクタ302は、最後段のバッファメモ
リ403_Nからシフトレジスタ110(図1参照)に
転送する1バイトのデータをパラレルデータの中から選
択するものである。すなわち、セレクタ302は、バッ
ファメモリ403_Nから32バイト(64ビット×
4)の単位データ(パラレルデータ)を受け取り、これ
から8ビットのパラレルデータを選択するものである。
そして、プリント制御部107(図1参照)の制御によ
って、パラレルデータを、シフトレジスタ110に出力
するように設定されている。
The selector 302 selects 1-byte data to be transferred from the last buffer memory 403_N to the shift register 110 (see FIG. 1) from parallel data. That is, the selector 302 stores 32 bytes (64 bits ×
The unit data (parallel data) of 4) is received, and 8-bit parallel data is selected from the unit data.
Under the control of the print control unit 107 (see FIG. 1), the setting is made so that the parallel data is output to the shift register 110.

【0031】バッファ制御部303は、エンジン102
から出力される同期信号に応じて、セレクタ302に格
納されているシリアルデータをエンジン102に送信す
る。また、バッファ制御部303は、多段バッファ30
1内で、各バッファメモリ403_0〜403_N内の
単位データを、順次、後段のバッファメモリに移動させ
る。ここで、LATCH_0〜N信号は、各バッファメ
モリ403_0〜403_Nのラッチ信号である。さら
に、バッファ制御部303は、多段バッファ301のバ
ッファメモリ403_0に空きの生じた場合、DMA部
108に対してDMAREQ信号(データを要求する信
号)を出力し、次の単位データを要求する機能も有して
いる。
The buffer control unit 303 includes the engine 102
The serial data stored in the selector 302 is transmitted to the engine 102 according to the synchronization signal output from the. Further, the buffer control unit 303
In 1, the unit data in each of the buffer memories 403_0 to 403_N is sequentially moved to the subsequent buffer memory. Here, the LATCH_0 to LAT_N signals are latch signals of the respective buffer memories 403_0 to 403_N. Further, the buffer control unit 303 has a function of outputting a DMAREQ signal (a signal requesting data) to the DMA unit 108 and requesting the next unit data when the buffer memory 403_0 of the multi-stage buffer 301 becomes empty. Have.

【0032】バッファ制御部303は、last−fl
agあるいはfirst−flagの付加されている単
位データが転送されてきたときに、これらlast−f
lag、first−flagを、ファーストフラグ記
憶部401_0、ラストフラグ記憶部402_0に立て
るように設定されている。また、バッファ制御部303
−は、単位データの移動に応じて、ラストフラグ記憶部
402_0〜402_Nあるいはファーストフラグ記憶
部401_0〜402_N内で、last−flagあ
るいはfirst−flagも同様に移動させるように
なっている。
The buffer control unit 303 has a last-fl
When unit data to which ag or first-flag is added is transferred, the last-f
The flag and the first-flag are set in the first flag storage unit 401_0 and the last flag storage unit 402_0. Also, the buffer control unit 303
The symbol-indicates that the last-flag or the first-flag is similarly moved in the last flag storage units 402_0 to 402_N or the first flag storage units 401_0 to 402_N in accordance with the movement of the unit data.

【0033】図3に示す有効バイトバッファ405は、
DMA部108から送られる下位ビット情報を記憶する
ためのバッファである。BYTESIFT DATA信
号は、DMA部108から有効バイトバッファ405に
送られる下位ビット情報である。判断部406は、バッ
ファメモリ403_Nに混成データが格納されたとき
に、下位ビット情報に基づいて、混成データ内における
有効データのサイズ(バイト数)を判断するものであ
る。すなわち、有効データのサイズと下位ビット情報と
は、単位データのサイズに応じた一定の相関関係を有し
ている。そして、判断部406は、この相関関係から有
効データを抽出するようにセレクタ302にセレクトデ
ータを送出する。この中で下位ビットとは、DMA部1
08で転送する数の下位ビットに相当する。
The valid byte buffer 405 shown in FIG.
This is a buffer for storing lower-order bit information sent from the DMA unit 108. The BYTESIFT DATA signal is lower-order bit information sent from the DMA unit 108 to the valid byte buffer 405. The determination unit 406 determines the size (the number of bytes) of valid data in the mixed data based on the lower bit information when the mixed data is stored in the buffer memory 403_N. That is, the size of the effective data and the lower bit information have a certain correlation according to the size of the unit data. Then, the determination unit 406 sends select data to the selector 302 so as to extract valid data from the correlation. Among these, the lower bit is the DMA unit 1
08 corresponds to the lower bits of the number to be transferred.

【0034】ここで、セレクタ302における有効デー
タの抽出について説明する。図4(a)に示すように、
RAM105における0×1000〜0×1099番地
に、38バイトのラインデータが4つ集まって152バ
イトの印刷データを構成している。図4(b)に示すよ
うに、5番目にバースト転送される単位データは、32
−(152−32×4)=8バイトの不定データを含む
混成データとなる。
Here, extraction of valid data by the selector 302 will be described. As shown in FIG.
Four 38-byte line data are collected at addresses 0x1000 to 0x1099 in the RAM 105 to form 152-byte print data. As shown in FIG. 4B, the unit data to be burst-transferred fifth is 32 units.
− (152−32 × 4) = mixed data including undefined data of 8 bytes.

【0035】また、この場合、有効バイトバッファ40
5には、DMA部108から入力されたDMAの転送バ
イト数の下位ビットが記憶されている。本例の場合、D
MA転送バイト数は152バイトであり、単位データを
32バイトとすると、値“152”の下位5ビットとな
り、“24”が記憶される。つまり、“152”を単位
データ“32”で割り算した余りの部分が下位ビットと
して記憶される。判断部406は、有効バイトバッファ
405に記憶されている下位ビット情報に基づいて、有
効データサイズ(24バイト)を求め、セレクタ302
に伝達する。
In this case, the valid byte buffer 40
5 stores the lower bits of the number of transfer bytes of the DMA input from the DMA unit 108. In this example, D
The number of MA transfer bytes is 152 bytes. If the unit data is 32 bytes, the lower 5 bits of the value “152” are stored and “24” is stored. That is, the remainder after dividing "152" by the unit data "32" is stored as the lower bit. The determination unit 406 obtains the effective data size (24 bytes) based on the lower bit information stored in the effective byte buffer 405, and determines the effective data size (24 bytes).
To communicate.

【0036】判断部406は、バッファメモリ403_
Nに混成データが格納され、ラストフラグ記憶部402
_Nにlast−flagの立ったときに、伝達された
有効データサイズが24バイトであることを把握する。
そして、入力された混成データから、先頭の24バイト
分のデータを抽出するようにセレクタ302にセレクト
信号(SELDAT信号)を送出する。セレクタ302
ではこのセレクト信号から有効データ24バイト分をバ
イト毎に抽出し、シフトレジスタ110に出力する。S
IFTDAT信号は、シフトレジスタ110へのデータ
信号である。シフトレジスタ110では、7ビット(0
ビット)目からシリアルデータが出力されるようにパラ
レルデータをシフトする。この時、データフォーマット
上から、通常印字は7ビット目から、180度回転印字
では0ビット目からシリアルデータが出力されるように
シフトされる。
The judging unit 406 includes a buffer memory 403_
N is stored in the last flag storage unit 402.
When the last-flag is set to _N, it is determined that the transmitted effective data size is 24 bytes.
Then, a select signal (SELDAT signal) is sent to the selector 302 so as to extract the first 24 bytes of data from the input mixed data. Selector 302
Then, 24 bytes of valid data are extracted for each byte from the select signal and output to the shift register 110. S
The IFTDAT signal is a data signal to the shift register 110. In the shift register 110, 7 bits (0
The parallel data is shifted so that serial data is output from the (bit) -th bit. At this time, from the data format, the shift is performed so that the serial data is output from the 7th bit in the normal printing and from the 0th bit in the 180 ° rotation printing.

【0037】なお、上記では、図2に示したように、D
MA部108による単位データの生成を、印刷データの
先頭部から終端部にかけて連続して行っている。そし
て、DMA部108は、上記のように作成した単位デー
タを、作成した順にバッファ部109に転送するように
設定されている。従って、不定データを含む混成データ
は、バッファ部109に対して最後に転送されることに
なる。この方法では、単位データの生成および転送を同
時に行えるので、単位データの生成・転送処理の速度を
向上することが可能となる。しかしながら、印刷データ
を180度回転して印刷したい場合には、印刷データの
終端部から送信する必要がある。この場合、DMA部1
08は、作成順とは逆の順序で、各単位データをバッフ
ァ部109に転送するように設定される。従って、不定
データを含む混成データは、バッファ部109に対して
最初に転送されることなる。
In the above description, as shown in FIG.
The generation of unit data by the MA unit 108 is continuously performed from the head to the end of the print data. The DMA unit 108 is set so as to transfer the unit data created as described above to the buffer unit 109 in the order of creation. Therefore, mixed data including indefinite data is transferred to the buffer unit 109 last. According to this method, since the generation and transfer of the unit data can be performed at the same time, the speed of the generation and transfer processing of the unit data can be improved. However, when the print data is to be rotated by 180 degrees and printed, it is necessary to transmit the print data from the end portion. In this case, the DMA unit 1
08 is set so that each unit data is transferred to the buffer unit 109 in the reverse order of the creation order. Therefore, mixed data including indefinite data is transferred to the buffer unit 109 first.

【0038】この場合、図5に示すように、RAM10
5における0×1000〜0×1099番地に、38バ
イトのラインデータが4つ集まって152バイトの印刷
データを構成している場合、1番目にバースト転送され
る単位データは、8バイトの不定データを含む混成デー
タとなる。
In this case, as shown in FIG.
5, when four 38-byte line data are collected at addresses 0 × 1000 to 0 × 1099 to form 152-byte print data, the first burst-transferred unit data is 8-byte indefinite data Is mixed data.

【0039】この場合、有効バイトバッファ405は、
図4に示した例と同様に有効データサイズ(24バイ
ト)を求め、判断部406に伝達する。判断部406
は、バッファメモリ403Nに混成データが格納され、
ファーストフラグ記憶部401NにFirst−fla
gが立ったときに、有効データサイズが24バイトであ
ることを把握する。そして、入力された混成データから
後半の24バイト分のデータを抽出するようにセレクタ
302にセレクト信号を送出する。セレクタ302では
このセレクト信号から有効データの後半24バイト分を
バイト毎に抽出し、シフトレジスタ110に出力する。
In this case, the valid byte buffer 405
The effective data size (24 bytes) is obtained in the same manner as in the example shown in FIG. Judgment unit 406
Indicates that mixed data is stored in the buffer memory 403N,
First-flat is stored in the first flag storage unit 401N.
When g stands, it is determined that the effective data size is 24 bytes. Then, a select signal is sent to the selector 302 so as to extract the latter 24 bytes of data from the input mixed data. The selector 302 extracts the latter 24 bytes of the valid data from this select signal for each byte, and outputs it to the shift register 110.

【0040】図6は、上記した判断部406における有
効データの抽出処理を示すフローチャートである。この
図に示すように、判断部406は、印刷データを回転し
ない場合、有効データのサイズ(A)を把握した後、l
ast−flagの付加された混成データが入力された
ときに、混成データにおける先頭の1バイトデータか
ら、シフトレジスタ110に送信するようにセレクタ3
02で混成データをバイト毎にセレクトする(S0〜S
5)。そして、Aバイト分のデータを出力した後、処理
を終了する(S4〜S8)。
FIG. 6 is a flowchart showing the process of extracting valid data in the judgment section 406 described above. As shown in this figure, when the print data is not rotated, the determination unit 406 determines the size (A) of the effective data and then
When mixed data to which the “ast-flag” is added is input, the selector 3 transmits data from the first byte data of the mixed data to the shift register 110.
02 selects mixed data for each byte (S0 to S
5). Then, after outputting A bytes of data, the process is terminated (S4 to S8).

【0041】また、判断部406は、印刷データを18
0度回転する場合、有効データのサイズ(A)を把握し
た後、First−flagの付加された混成データが
入力されたときに、混成データにおける(単位データサ
イズ−A)番目の1バイトデータから、シフトレジスタ
110に送信するようにセレクタ302で混成データを
バイト毎にセレクトする(S0,S9〜S13)。そし
て、Aバイト分のデータを出力した後、処理を終了する
(S12〜S15,S8)。
The determination unit 406 determines that the print data is 18
In the case of rotation by 0 degrees, after the size (A) of valid data is grasped, when hybrid data to which First-flag is added is input, (unit data size-A) -th 1-byte data in the hybrid data Then, the selector 302 selects mixed data for each byte so as to transmit the mixed data to the shift register 110 (S0, S9 to S13). Then, after outputting A bytes of data, the process is terminated (S12 to S15, S8).

【0042】この中でBUF[BYTE_SIFTCN
T]とは、図4及び図5で記載の32バイトバッファ図
中に記述されているBUF[0]、BUF[24]、B
UF[31]等のことであり、32バイトバッファ内の
バイト毎の位置関係を示している。つまり、SIFTC
NT_BUF[BYTE_SIFTCNT]とは、BY
TE_SIFTCNTで示された位置の1バイトをSI
FTDATとして、セレクトすることを示している。
BUF [BYTE_SIFTCN]
T] are BUF [0], BUF [24], B described in the 32-byte buffer diagrams shown in FIGS.
UF [31] and the like, which indicates the positional relationship of each byte in the 32-byte buffer. That is, SIFTC
NT_BUF [BYTE_SIFTCNT] is BY
1 byte at the position indicated by TE_SIFTCNT is set to SI
This indicates that FTDAT is selected.

【0043】尚、図中のS1、S9に記載の有効バイト
[4:0]はDMAの転送カウント数の下位5ビットを
示している。ここで、S8に示したEMPTY_Nと
は、バッファメモリ403_Nのデータがシフトレジス
タ110に移動したことを示す信号であり、判断部40
6からバッファ制御部303に送信されるものである。
The valid bytes [4: 0] described in S1 and S9 in the figure indicate the lower 5 bits of the DMA transfer count. Here, EMPTY_N shown in S8 is a signal indicating that the data in the buffer memory 403_N has moved to the shift register 110, and the determination unit 40
6 to the buffer control unit 303.

【0044】ここで、バッファ制御部303による単位
データの移動・格納処理について、図7のフローチャー
トを用いて説明する。この図に示すように、多段バッフ
ァ301のバッファメモリ403_0〜403_Nは、
CPU103からのリセット信号により、全て空になる
ように設定されている(S21)。その後、バッファ制
御部303は、バッファメモリ403_0〜403_N
内にデータが記憶されている否かを、下流側から(バッ
ファメモリ403_N側から)調べる。
Here, the process of moving and storing unit data by the buffer control unit 303 will be described with reference to the flowchart of FIG. As shown in this figure, the buffer memories 403_0 to 403_N of the multi-stage buffer 301
In response to the reset signal from the CPU 103, the setting is made so that all of them become empty (S21). After that, the buffer control unit 303 updates the buffer memories 403_0 to 403_N
It is checked from the downstream side (from the buffer memory 403_N side) whether or not data is stored in the memory.

【0045】そして、バッファメモリ403_0が空で
あること確認した後(S27)、バッファ制御部303
は、DMA部108に対してDMAREQ信号を出力す
る(S29)。そして、バッファ制御部303は、転送
された単位データをバッファメモリ403_0に格納す
るとともに、DMAREQ信号を停止する(S30,S
31)。その後、バッファ制御部303は、バッファメ
モリ403_1が空であることを確認した後、バッファ
メモリ403_0のデータをバッファメモリ403に伝
達する(S27,S28)。そして、再びDMAREQ
信号を出力して、バッファメモリ403_0に単位デー
タを格納する(S29,S30)。このように、バッフ
ァ制御部303は、下流側(後段)のバッファメモリが
空であることを確認した後、上流側(前段)のバッファ
メモリから単位データを順次的に移動させるようになっ
ている。そして、全単位データを移動させてバッファメ
モリ403_0を空にした後、DMAREQ信号を出力
して、バッファメモリ403_0に単位データを格納す
るように設定されている。
After confirming that the buffer memory 403_0 is empty (S27), the buffer controller 303
Outputs a DMAREQ signal to the DMA unit 108 (S29). Then, the buffer control unit 303 stores the transferred unit data in the buffer memory 403_0 and stops the DMAREQ signal (S30, S30).
31). Then, after confirming that the buffer memory 403_1 is empty, the buffer control unit 303 transmits the data in the buffer memory 403_0 to the buffer memory 403 (S27, S28). And again DMAREQ
A signal is output and the unit data is stored in the buffer memory 403_0 (S29, S30). As described above, after confirming that the downstream (later) buffer memory is empty, the buffer controller 303 sequentially moves the unit data from the upstream (previous) buffer memory. . Then, after the entire unit data is moved to empty the buffer memory 403_0, a DMAREQ signal is output to store the unit data in the buffer memory 403_0.

【0046】また、バッファ制御部303は、バッファ
メモリ403_Nまで単位データを格納した後、上記し
たEMPTY_N信号が判断部406から出力されるま
で、単位データの移動を停止する(S22)。そして、
EMPTY_N信号の出力に応じて、データの移動を再
開するようになっている。
After storing the unit data in the buffer memory 403_N, the buffer control unit 303 stops moving the unit data until the above-mentioned EMPTY_N signal is output from the determination unit 406 (S22). And
Data movement is resumed in response to the output of the EMPTY_N signal.

【0047】以上のように、本プリンターは、DMA部
108が、印刷データから単位データを生成する際、印
刷データ中における有効データが単位データよりも小さ
くなった場合に、有効データと不特定のデータとからな
る混成データを生成するように設定されている。そし
て、バッファ部109におけるセレクタ302が、混成
データから有効データを抽出し、シフトレジスタ110
を介してエンジン102に供給するように設定されてい
る。すなわち、本プリンターでは、印刷データの残りが
少なくなった場合でも、他の不定データと組み合わせて
単位データ(混成データ)を作成し、バースト転送を行
うようになっている。これにより、転送速度を常に高く
保つことが可能となる。
As described above, in the present printer, when the DMA unit 108 generates unit data from print data, if the valid data in the print data becomes smaller than the unit data, the DMA unit 108 It is set to generate hybrid data composed of data. Then, the selector 302 in the buffer unit 109 extracts valid data from the mixed data, and
Is set to be supplied to the engine 102 via the. That is, in the present printer, even when the remaining print data becomes small, unit data (mixed data) is created in combination with other undefined data, and burst transfer is performed. This makes it possible to keep the transfer speed high at all times.

【0048】また、有効データと組み合わせて混成デー
タを作成するために、従来のようなNULLデータでは
なく、メモリ内にある不特定のデータを利用するように
なっている。これにより、NULLデータを付加する等
の複雑な処理を行う必要がないため、DMA部108の
処理能力を減じることなく、バースト転送を行える。ま
た、NULLデータのためのメモリを用意する必要がな
いので、RAM105における消費量を抑制できる。
Further, in order to create hybrid data in combination with valid data, unspecified data in a memory is used instead of NULL data as in the related art. Thus, since there is no need to perform complicated processing such as adding NULL data, burst transfer can be performed without reducing the processing capacity of the DMA unit 108. Further, since it is not necessary to prepare a memory for NULL data, the amount of consumption in the RAM 105 can be suppressed.

【0049】また、本プリンターでは、判断部406
が、印刷データにおける下位ビット情報から、混成デー
タに含まれている有効データサイズを見積もるようにな
っている。従って、有効データサイズを算出するための
特別な演算を行うことを回避できるように設定されてい
る。また、バッファ部109におけるバッファ制御部3
03は、バッファメモリ403_0〜403_Nにおけ
る単位データの移動の際、移動先のバッファメモリが空
であることを確認してから単位データを移動させるよう
に設定されている。これにより、データの残っているバ
ッファメモリに新たにデータを書き込むことを防止でき
るので、データの損失を回避できる。なお、『バッファ
メモリが空であること』とは、このバッファメモリ内の
データが後段のバッファメモリに移動されたことを意味
し、必ずしもデータが消去されてことを示すわけではな
い。
In this printer, the judgment unit 406
However, the effective data size included in the mixed data is estimated from the lower bit information in the print data. Therefore, the setting is made so as to avoid performing a special operation for calculating the effective data size. The buffer control unit 3 in the buffer unit 109
Reference numeral 03 indicates that when the unit data is moved in the buffer memories 403_0 to 403_N, the unit data is moved after confirming that the destination buffer memory is empty. As a result, it is possible to prevent new data from being written in the buffer memory in which data remains, so that data loss can be avoided. Note that "the buffer memory is empty" means that the data in the buffer memory has been moved to the buffer memory at the subsequent stage, and does not necessarily indicate that the data has been erased.

【0050】さらに、バッファ制御部303は、最前段
のバッファメモリ403_0が空となったときに、DM
A部108に対して新たな単位データの転送を要求する
ように設定されている。これにより、複雑なタイミング
制御を用いることなく、無駄のない転送要求を行うこと
が可能となる。
Further, when the buffer memory 403_0 at the first stage becomes empty, the buffer control unit 303
The setting is made so as to request the A unit 108 to transfer new unit data. This makes it possible to perform a transfer request without waste without using complicated timing control.

【0051】また、本発明のプリンタは、ビットマップ
データを貯えるメモリと、転送バイト数を設定でき、数
バイトの幅でバースト転送できる。DMAと、該メモリ
からのデータを該DMA転送で書き込むN段のバッファ
と、該バッファからシフトレジスタにデータ転送し、シ
リアル印字データを出力するプリンタ制御部とを有す
る。そして、最後のバースト転送であることを示すフラ
グと、バースト幅内の有効バイト数を示すバッファと、
該フラグと該バッファから判断し、シフトレジスタに転
送するデータをバッファから選択する判断部を有するこ
とを特徴としている。この構成によれば、メモリの有効
バイト幅とバースト幅が異なる場合、DMAのバースト
転送を止めたり、ビットマップデータをバースト転送幅
にあわせて作成することなく、高速に印字データを出力
することを可能とする。
The printer of the present invention can set a memory for storing bitmap data and the number of transfer bytes, and can perform burst transfer with a width of several bytes. It has a DMA, an N-stage buffer for writing data from the memory by the DMA transfer, and a printer control unit for transferring data from the buffer to the shift register and outputting serial print data. And a flag indicating the last burst transfer, a buffer indicating the number of valid bytes in the burst width,
It is characterized by having a judging unit which judges from the flag and the buffer and selects data to be transferred to the shift register from the buffer. According to this configuration, when the effective byte width and the burst width of the memory are different, it is possible to output the print data at a high speed without stopping the DMA burst transfer or creating the bitmap data according to the burst transfer width. Make it possible.

【0052】また、本発明のプリンターにおいて、最後
のバースト転送であることを示すフラグは、N段バッフ
ァが次段バッファに移動するのと同様にフラグを移動さ
せる制御部を有することを特徴としている。これによれ
ば、N段バッファのどのバッファが最後のバースト転送
であるかを、特別な制御を持つことなく、N段バッファ
の制御部と同じように制御できることを可能とする。
Further, the printer of the present invention is characterized in that the flag indicating the last burst transfer has a control unit for moving the flag in the same manner as the N-stage buffer moves to the next-stage buffer. . According to this, it is possible to control which buffer of the N-stage buffer is the last burst transfer in the same manner as the control unit of the N-stage buffer without special control.

【0053】また、本発明のプリンターにおいて、有効
バイト数を示すバッファは、DMAで設定される転送バ
イト数の下位数ビットのデータを使用する。これによれ
ば、DMA内で特別な計算をすることなく、有効バイト
数を判断できる。
In the printer of the present invention, the buffer indicating the number of valid bytes uses data of several lower bits of the number of transfer bytes set by DMA. According to this, the number of valid bytes can be determined without special calculation in the DMA.

【0054】また、本発明のプリンターにおいて、第1
のプリント装置の構成において、N段バッファの次段へ
の移動は、バッファが空であるかを判断して前段への転
送要求及び次段への書き込みを行うバッファ制御部を有
することを特徴としている。これによれば、前段にデー
タがあること及び次段のバッファが空であることを確認
することによって、データ損失を防ぐことが可能とな
る。
In the printer of the present invention, the first
In the configuration of the printing apparatus, the movement of the N-stage buffer to the next stage includes a buffer control unit that determines whether the buffer is empty, and performs a transfer request to the previous stage and a write to the next stage. I have. According to this, it is possible to prevent data loss by confirming that there is data at the previous stage and that the buffer at the next stage is empty.

【0055】また、本発明のプリンターにおいて、最前
段のバッファが空であることにより、DMAへの要求信
号を生成することを特徴としている。これにより、複雑
なタイ、ミング制御をすることなく、バッファの状態管
理だけで無駄なく、転送要求が可能となる。
Further, the printer of the present invention is characterized in that a request signal to the DMA is generated when the first buffer is empty. As a result, a transfer request can be made without waste by only managing the state of the buffer without performing complicated timing and timing control.

【0056】また、本発明のプリンターにおいて、有効
バイト数を示すバッファは、最終段に最後のバースト転
送であることを示すフラグが移動した時にだけ使用する
判断部を有することを特徴としている。これによれば、
有効バイト数を示すバッファはN段分必要でなく、1段
のみで判断することを可能とする。
Further, in the printer according to the present invention, the buffer indicating the number of valid bytes has a determination unit which is used only when a flag indicating the last burst transfer is moved to the last stage. According to this,
A buffer indicating the number of valid bytes is not required for N stages, and it is possible to make a determination with only one stage.

【0057】また、本発明のプリンターは、ビットマッ
プデータを貯えるメモリと、転送バイト数を設定でき、
数バイトの幅でバースト転送できるDMAと、該メモリ
からのデータを該DMA転送で書き込むN段のバッファ
と、両面印字等で画像データを180度回転して印刷す
る場合は、作成されたビットマップデータをDMAのア
ドレスデクリメントにより、該バッファからシフトレジ
スタにデータ転送し、シリアル印字データを出力するプ
リンタ制御部を有する。そして、バースト転送であるこ
とを示すフラグと、バースト幅内の有効バイト数を示す
バッファと、該フラグと該バッファから判断し、シフト
レジスタに転送するデータをバッファから選択する判断
部を有することを特徴としている。この構成によれば、
メモリの有効バイト幅とバースト幅が異なる場合、両面
印字等で画像データを180度回転して印刷する場合に
おいても、DMAのバースト転送を止めたり、ビットマ
ップデータをバースト転送暗にあわせて作成することな
く、高速に印字データを出力することを可能とする。
The printer of the present invention can set a memory for storing bitmap data and the number of transfer bytes.
A DMA capable of burst transfer with a width of several bytes, an N-stage buffer for writing data from the memory by the DMA transfer, and a bit map created when image data is rotated by 180 degrees for double-sided printing or the like. The printer control unit transfers data from the buffer to the shift register by DMA address decrement and outputs serial print data. A flag indicating a burst transfer, a buffer indicating the number of valid bytes within the burst width, and a determination unit that determines from the flag and the buffer and selects data to be transferred to the shift register from the buffer. Features. According to this configuration,
If the effective byte width of the memory is different from the burst width, the DMA burst transfer is stopped or the bitmap data is created in accordance with the burst transfer darkness even when the image data is rotated by 180 degrees for double-sided printing or the like. This makes it possible to output print data at a high speed without any problem.

【0058】[0058]

【発明の効果】本発明によれば、メモリの印刷データを
バッファ部に転送するために、印刷データを単位データ
毎にバッファ部に転送する、いわゆるバースト転送を利
用するようになっている。そして、特に、上記の構成で
は、有効データが少なくなった場合でも、他のデータと
組み合わせて単位データ(混成データ)を作成し、バー
スト転送を行うようになっている。これにより、転送速
度を常に高く保つことが可能となる。また、有効データ
と組み合わせて混成データを作成するために、従来のよ
うに、NULLデータではなく、メモリ内にある不特定
のデータ(例えば、未転送の印刷データに隣接して格納
されている他のデータ)を利用するようになっている。
これにより、NULLデータを付加する等の複雑な処理
を行う必要がないため、DMAの処理能力を減じること
なく、バースト転送を行える。また、NULLデータの
ためのメモリを用意する必要がないので、メモリにおけ
る消費量を抑制できる。
According to the present invention, in order to transfer the print data in the memory to the buffer unit, so-called burst transfer in which the print data is transferred to the buffer unit for each unit data is used. In particular, in the above configuration, even when the effective data becomes small, unit data (hybrid data) is created in combination with other data, and burst transfer is performed. This makes it possible to keep the transfer speed high at all times. Further, in order to create hybrid data in combination with valid data, unlike in the related art, instead of NULL data, unspecified data (for example, data stored adjacent to untransferred print data) Data).
Accordingly, since there is no need to perform complicated processing such as adding NULL data, burst transfer can be performed without reducing the processing capacity of the DMA. Further, since there is no need to prepare a memory for NULL data, it is possible to suppress the amount of memory consumption.

【0059】また、本発明によれば、バッファは、DM
A部から混成データ情報を伝達されるので、印刷データ
中で何番目に生成される単位データが混成データとなる
のか、および、混成データ中における有効データのサイ
ズは、どのくらいになるのかを求めることができる。有
効データのサイズは、例えば、印刷データのサイズを単
位データのサイズによって割り算することで求められ
る。すなわち、この割り算における商が混成データの生
成順序を、同じく余りが有効データサイズをそれぞれ示
すこととなる。従って、バッファにおいて、このような
簡単な計算を行うことで、混成データの特定と有効デー
タの抽出とを容易に行うことが可能となる。
Also, according to the present invention, the buffer is
Since the hybrid data information is transmitted from the section A, it is necessary to determine in what order the unit data generated in the print data will be the hybrid data and the size of the effective data in the hybrid data. Can be. The size of the valid data is obtained, for example, by dividing the size of the print data by the size of the unit data. In other words, the quotient in the division indicates the generation order of the mixed data, and the remainder indicates the effective data size. Therefore, by performing such a simple calculation in the buffer, it becomes possible to easily specify the mixed data and extract the valid data.

【0060】また、本発明によれば、最終段のバッファ
メモリにフラグが立った場合、このメモリ内の単位デー
タから有効データを抽出する有効データ抽出部を有して
いるので、N段のバッファメモリ内において、有効デー
タサイズを示す情報を混成データとともに移動させる必
要がない。これにより、バッファの複雑化を抑制でき
る。
Further, according to the present invention, when a flag is set in the buffer memory of the last stage, the buffer memory of the N stage is provided because it has a valid data extracting unit for extracting valid data from the unit data in this memory. There is no need to move information indicating the effective data size together with the mixed data in the memory. Thereby, the complexity of the buffer can be suppressed.

【0061】また、本発明によれば、N段のバッファメ
モリ内において、混成データとともに前記フラグを移動
させるので、混成データを保持しているバッファメモリ
を容易に特定できる。
According to the present invention, the flag is moved together with the mixed data in the buffer memory of N stages, so that the buffer memory holding the mixed data can be easily specified.

【0062】また、本発明によれば、N段のバッファメ
モリ内における単位データの移動の際、移動先のバッフ
ァメモリが空であることを確認してから単位データを移
動させるので、データの残っているバッファメモリに新
たにデータを書き込むことを防止でき、データの損失を
回避できる。
Further, according to the present invention, when the unit data is moved in the N-stage buffer memory, the unit data is moved after confirming that the destination buffer memory is empty. New data can be prevented from being written to the buffer memory, and data loss can be avoided.

【0063】また、本発明によれば、バッファメモリの
状態に応じて単位データの転送を要求するようになって
いる。これにより、複雑なタイミング制御をすることな
く、無駄のない転送要求を行うことが可能となる。ここ
で、複雑なタイミング制御とは、エンジン部では、メカ
動作が一定の為、データ転送も一定周期で行われるが、
プリンタコントローラでは、CPU、DMAのバス状況
においては、一定周期でデータ転送できない。その為、
エンジンでのデータ転送タイミングを管理し、DMA制
御を行う必要があることを示している。
Further, according to the present invention, the transfer of unit data is requested according to the state of the buffer memory. This makes it possible to make a transfer request without waste without performing complicated timing control. Here, complicated timing control means that, in the engine section, data transfer is also performed at a fixed cycle because mechanical operation is constant.
In the printer controller, data cannot be transferred in a fixed cycle under the bus conditions of CPU and DMA. For that reason,
It indicates that it is necessary to manage data transfer timing in the engine and perform DMA control.

【0064】また、本発明によれば、作成した単位デー
タを順に前記バッファに転送するので、単位データの生
成および転送を同時に行い、単位データの生成・転送処
理の速度を向上できる。
Further, according to the present invention, since the created unit data is sequentially transferred to the buffer, the generation and transfer of the unit data can be performed simultaneously, and the speed of the generation and transfer processing of the unit data can be improved.

【0065】また、本発明によれば、作成順とは逆の順
序で単位データをバッファに転送するので、印刷データ
を180度回転させた状態で印刷できる。
Further, according to the present invention, since the unit data is transferred to the buffer in the reverse order of the creation order, the print data can be printed while being rotated by 180 degrees.

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

【図1】本発明に係るプリンターの一実施形態を示すブ
ロック図である。
FIG. 1 is a block diagram illustrating an embodiment of a printer according to the invention.

【図2】DMA部がラインデータを単位データに区切っ
た状態とデータの配置を示す説明図である。
FIG. 2 is an explanatory diagram showing a state in which a DMA unit divides line data into unit data and an arrangement of data.

【図3】バッファ部を示すブロック図である。FIG. 3 is a block diagram illustrating a buffer unit.

【図4】152バイトの印刷データを順に区切って、順
次バースト転送される単位データを示す説明図である。
FIG. 4 is an explanatory diagram showing unit data that is sequentially burst-transferred by sequentially dividing print data of 152 bytes.

【図5】152バイトの印刷データを順に区切って、反
転バースト転送される単位データを示す説明図である。
FIG. 5 is an explanatory diagram showing unit data subjected to inversion burst transfer by sequentially dividing print data of 152 bytes.

【図6】判断部における有効データの抽出処理を示すフ
ローチャートである。
FIG. 6 is a flowchart illustrating a process of extracting valid data in a determination unit.

【図7】バッファ制御部による単位データの移動・格納
処理を示すフローチャートである。
FIG. 7 is a flowchart illustrating unit data movement / storage processing by a buffer control unit;

【図8】従来のプリンタのDMA部がラインデータを単
位データに区切った状態とデータの配置を示す説明図で
ある。
FIG. 8 is an explanatory diagram showing a state in which a DMA unit of a conventional printer divides line data into unit data and an arrangement of data.

【図9】従来のプリンターのDMA部がラインデータを
単位データに区切った他の状態とデータの他の配置を示
す説明図である。
FIG. 9 is an explanatory diagram showing another state in which a DMA unit of a conventional printer divides line data into unit data and another arrangement of data.

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

101:プリンタコントローラ 102:プリンタエンジン 103:CPU 104:ROM 105:RAM 106:ホストI/F 107:プリント制御部 108:DMA 109:バッファ部 110:シフトレジスタ CPUBUS:CPUからのシステムバス FIRSTFLAG:DMAへの最初の転送を示す信号 LASTFLAG:DMAへの最後の転送を示す信号 BYTESIFTDATA:バースト転送内の有効バイ
ト数を示すデータ BITMAPDATA:ビットマップされたプリントデ
ータ DMAREQ:DMA要求信号 LOAD:シフトレジスタへの転送信号 SIFTEN:シフトレジスタのイネーブル信号
101: Printer controller 102: Printer engine 103: CPU 104: ROM 105: RAM 106: Host I / F 107: Print control unit 108: DMA 109: Buffer unit 110: Shift register CPUBUS: System bus from CPU FIRSTFLAG: To DMA LASTFLAG: Signal indicating the last transfer to DMA BYTESIFTDATA: Data indicating the number of valid bytes in burst transfer BITMAPDATA: Bit-mapped print data DMAREQ: DMA request signal LOAD: Transfer to shift register Signal SIFTEN: shift register enable signal

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 印刷データを記憶するメモリと、該印刷
データに基づいて用紙に印刷を行うエンジン部と、前記
メモリに記憶されている印刷データを前記エンジン部に
転送するバッファと、前記メモリに記憶されている印刷
データを所定サイズ毎に区切って単位データを生成し、
前記バッファにバースト転送するDMA部とを備えたプ
リンターにおいて、 前記DMA部は、印刷データを先頭から順次単位データ
に区切り、最後に残った印刷データの有効データが単位
データよりも小さくなった場合には、単位データのサイ
ズに足りない部分に不特定のデータを満たし、有効デー
タと不特定データからなる混成データを生成し、 前記バッファは、混成データから有効データを抽出し、
前記エンジンに供給することを特徴とするプリンター。
A memory for storing print data; an engine unit for printing on paper based on the print data; a buffer for transferring print data stored in the memory to the engine unit; Generates unit data by dividing the stored print data for each predetermined size,
A DMA unit for performing a burst transfer to the buffer, wherein the DMA unit sequentially divides the print data into unit data from the beginning, and when the valid data of the last remaining print data becomes smaller than the unit data. Is filled with unspecified data in a portion less than the size of the unit data, generates mixed data composed of valid data and unspecified data, the buffer extracts valid data from the mixed data,
A printer, wherein the printer is supplied to the engine.
【請求項2】 前記DMA部は、印刷データおよび単位
データのサイズから、混成データを特定する混成データ
情報を取得して前記バッファに伝達し、 前記バッファは、印刷データおよび単位データのサイズ
から、混成データに含まれている有効データのサイズを
特定し、混成データ情報および有効データサイズに基づ
いて、混成データから有効データを抽出することを特徴
とする請求項1に記載のプリンター。
2. The DMA unit obtains mixed data information for specifying mixed data from the size of print data and unit data, and transmits the mixed data information to the buffer. 2. The printer according to claim 1, wherein a size of valid data included in the hybrid data is specified, and valid data is extracted from the hybrid data based on the hybrid data information and the valid data size.
【請求項3】 前記バッファは、 単位データを1つずつ記憶させるためのN段のバッファ
メモリと、 該N段のバッファメモリ内のデータを順次移動させてエ
ンジンに供給するとともに、混成データ情報に基づい
て、混成データを保持しているバッファメモリに特定の
フラグを立てる制御部と、 印刷データおよび単位データのサイズから混成データに
含まれている有効データのサイズを特定するともに、最
終段のバッファメモリに上記のフラグが立った場合、こ
のメモリ内の単位データから有効データを抽出する有効
データ抽出部とを有することを特徴とする請求項2に記
載されているプリンター。
3. The buffer includes: an N-stage buffer memory for storing unit data one by one; and sequentially moving data in the N-stage buffer memory to supply the data to the engine. The control unit sets a specific flag in the buffer memory holding the hybrid data based on the size of the print data and the unit data, and specifies the size of the effective data included in the hybrid data, and the buffer at the last stage. 3. The printer according to claim 2, further comprising a valid data extracting unit that extracts valid data from the unit data in the memory when the flag is set in the memory.
【請求項4】 前記制御部は、N段のバッファメモリ内
において、混成データとともに前記フラグを移動させる
ことを特徴とする請求項3に記載のプリンター。
4. The printer according to claim 3, wherein the control unit moves the flag together with the mixed data in an N-stage buffer memory.
【請求項5】 前記制御部は、N段のバッファメモリ内
における単位データの移動の際、移動先のバッファメモ
リが空であることを確認してから単位データを移動させ
ることを特徴とする請求項3に記載のプリンター。
5. The method according to claim 1, wherein the control unit moves the unit data after confirming that the destination buffer memory is empty when moving the unit data in the N-stage buffer memory. Item 7. The printer according to Item 3.
【請求項6】 前記制御部は、最前段のバッファメモリ
が空となったときに、DMA部に対して新たな単位デー
タの転送を要求することを特徴とする請求項3に記載の
プリンター。
6. The printer according to claim 3, wherein the control unit requests the DMA unit to transfer new unit data when the buffer memory at the first stage becomes empty.
【請求項7】 前記DMA部は、印刷データの先頭部か
ら終端部にかけて連続して単位データの生成を行い、作
成した順に前記バッファに転送することを特徴とする請
求項1に記載のプリンター。
7. The printer according to claim 1, wherein the DMA unit continuously generates the unit data from the head to the end of the print data, and transfers the generated data to the buffer in the order of generation.
【請求項8】 前記DMA部は、印刷データの先頭部か
ら終端部にかけて連続して単位データの生成を行い、作
成順とは逆の順序でバッファに転送することを特徴とす
る請求項1に記載のプリンター。
8. The method according to claim 1, wherein the DMA unit continuously generates the unit data from the beginning to the end of the print data, and transfers the unit data to the buffer in the reverse order of the creation order. The printer as described.
JP2000223745A 2000-07-25 2000-07-25 Printer Pending JP2002041447A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000223745A JP2002041447A (en) 2000-07-25 2000-07-25 Printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000223745A JP2002041447A (en) 2000-07-25 2000-07-25 Printer

Publications (1)

Publication Number Publication Date
JP2002041447A true JP2002041447A (en) 2002-02-08

Family

ID=18717796

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000223745A Pending JP2002041447A (en) 2000-07-25 2000-07-25 Printer

Country Status (1)

Country Link
JP (1) JP2002041447A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008001433A1 (en) * 2006-06-28 2008-01-03 Mitsubishi Electric Corporation Data communication apparatus
JP2009232371A (en) * 2008-03-25 2009-10-08 Seiko Epson Corp Image reader

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008001433A1 (en) * 2006-06-28 2008-01-03 Mitsubishi Electric Corporation Data communication apparatus
JP2009232371A (en) * 2008-03-25 2009-10-08 Seiko Epson Corp Image reader

Similar Documents

Publication Publication Date Title
US6381664B1 (en) System for multisized bus coupling in a packet-switched computer system
JP2000158724A (en) Image-processing apparatus, image processing method and recording medium
US6618157B2 (en) Interface card for coupling a computer to an external device
JP2002544585A (en) FIFO system with variable width interface to host processor
JP2000335022A (en) Printer control device
JP2002041447A (en) Printer
JP2005332316A (en) Data distribution device, data transfer device and image processing device
EP2040410A1 (en) Data transmission method and system
JPH11238034A (en) Data transfer system
JPH11167548A (en) Data transmission system
CN115586974B (en) Memory controller, system, device and electronic equipment
JPH09265367A (en) Device and method for printer control
JP2000137674A (en) Burst transfer memory mapped register
JP2002215563A (en) Dma controller
JPH08197788A (en) Image data reading circuit of printer control device
JP2000255125A (en) Printing processing device and method
JP2000137676A (en) Buffer control system
JP2003330871A (en) Data transfer device
JP2001167046A (en) Image processor
CN113709061A (en) Message forwarding method and circuit
CN109885508A (en) High-speed peripheral component interconnection bus system and its data transmission method, device
JP2005128753A (en) Device and method for data transfer
JP2001277607A (en) Image processing controller for electronic printer and electronic printer with the same
JP2008140042A (en) Image processor and program
JPS58109915A (en) Data transfer controlling system of bus coupling system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040914

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040921

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041122

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050107

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060131

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060330

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060509