JPH08221250A - Device, method, and system for receiving data - Google Patents

Device, method, and system for receiving data

Info

Publication number
JPH08221250A
JPH08221250A JP5191595A JP5191595A JPH08221250A JP H08221250 A JPH08221250 A JP H08221250A JP 5191595 A JP5191595 A JP 5191595A JP 5191595 A JP5191595 A JP 5191595A JP H08221250 A JPH08221250 A JP H08221250A
Authority
JP
Japan
Prior art keywords
pointer
data
register
buffer area
reception buffer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP5191595A
Other languages
Japanese (ja)
Other versions
JP3216965B2 (en
Inventor
Noriyuki Suzuki
範之 鈴木
Sohei Tanaka
壮平 田中
Yoshiaki Kamuragi
義明 冠木
Masafumi Wataya
雅文 綿谷
Hiroshi Uemura
寛 植村
Nobuyuki Tsukada
伸幸 塚田
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP05191595A priority Critical patent/JP3216965B2/en
Publication of JPH08221250A publication Critical patent/JPH08221250A/en
Application granted granted Critical
Publication of JP3216965B2 publication Critical patent/JP3216965B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Information Transfer Systems (AREA)

Abstract

PURPOSE: To speedily accept the transmitted data. CONSTITUTION: The transmitted data accepted through an interface is stored at the address position in a reception buffer area of a RAM 16 shown by a write pointer 17 to increase the write pointer 17 by a prescribed value. When reading access is made to a reception buffer read port by a CPU, the fetched state data showing the fetched state of the transmission data stored in the reception buffer area is outputted from an upper-order byte input/output circuit 29 according to the comparison result by a comparator 22. When the values of the write pointer 17 and a read pointer 18 are not equal, a read signal is outputted from the address position in the reception buffer area shown by the pointer 18 to the RAM 16 to increase the read pointer 18 by a prescribed value. The transmission data read out of the reception buffer area is outputted from a low-order byte input/output circuit 28.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、パーソナルコンピュー
タ等のホスト装置と周辺装置間などでデータ伝送を行う
際に利用されるデータ受信装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data receiving device used when data is transmitted between a host device such as a personal computer and peripheral devices.

【0002】[0002]

【従来の技術】パーソナルコンピュータ等のホスト装置
と周辺装置間でデータを伝送するのに、例えば周辺装置
がプリンタの場合は、セントロニクス社仕様のパラレル
I/F(以下、セントロニクスI/F)、モデムなどの
場合はRS−232C仕様のシリアルI/F(以下、R
S−232CI/F)が広く用いられているのは周知の
通りである。
2. Description of the Related Art For transmitting data between a host device such as a personal computer and a peripheral device, for example, when the peripheral device is a printer, a parallel I / F specified by Centronics (hereinafter, Centronics I / F), a modem In such cases, RS-232C serial I / F (hereinafter R
It is well known that S-232C I / F) is widely used.

【0003】プリンタの場合の構成例が特開昭58−1
17036号公報、特開平5−150914号公報に開
示されている。これら従来技術における伝送データの受
信動作を図8を用いて説明する。
A configuration example of a printer is disclosed in Japanese Patent Laid-Open No. 58-1.
17036 and JP-A-5-150914. The operation of receiving the transmission data in these conventional techniques will be described with reference to FIG.

【0004】図8において、1はCPU、2はROM、
3はRAM、4はセントロニクスI/FやRS−232
CI/F等の1バイト単位でデータ伝送を行うI/F
部、5はDMAコントローラ、6は印字部である。
In FIG. 8, 1 is a CPU, 2 is a ROM,
3 is RAM, 4 is Centronics I / F and RS-232
I / F such as CI / F that transmits data in 1-byte units
Reference numeral 5 is a DMA controller, and reference numeral 6 is a printing unit.

【0005】RAM3上には、受信バッファ、印字バッ
ファ、ライトポインタ、リードポインタとして用いられ
る領域が設定されている。ライトポインタおよびリード
ポインタ(それぞれをプットポインタ、ゲットポインタ
と呼ぶ場合もある。)は、それぞれ、受信バッファ領域
のオフセットアドレスを指定するものである。I/F4
に外部のホスト装置からデータが伝送されると、I/F
4はCPU1に対して割込をかける。CPU1は、当該
割込処理において、I/F4からデータを読み出して受
信バッファに格納すると共に、ライトポインタを“1”
だけ増加させる。一方、CPU1のメインのプログラム
部は、リードポインタが示す位置からデータを取込むと
共に、リードポインタを“1”だけ増加させる。ライト
ポインタおよびリードポインタは、初めに“0”に初期
化されているので、メインのプログラム部はライトポイ
ンタとリードポインタを比較することで、受信バッファ
に未取込みのデータがあるか否かを判定する。
Areas used as a reception buffer, a print buffer, a write pointer, and a read pointer are set on the RAM 3. The write pointer and the read pointer (which may also be called the put pointer and the get pointer, respectively) specify the offset address of the reception buffer area. I / F4
When data is transmitted from the external host device to the I / F
4 interrupts the CPU 1. In the interrupt process, the CPU 1 reads the data from the I / F 4 and stores it in the reception buffer, and sets the write pointer to “1”.
Only increase. On the other hand, the main program unit of the CPU 1 fetches data from the position indicated by the read pointer and increments the read pointer by "1". Since the write pointer and the read pointer are initially initialized to "0", the main program unit compares the write pointer and the read pointer to determine whether or not there is unacquired data in the reception buffer. To do.

【0006】上記割込プログラムのコーディング例が、
インターフェース誌(CQ出版社)1986年3月号の
210〜211頁に掲載されている。該コーディングリ
ストはRS−232CI/Fの場合であるが、基本的な
部分はセントロニクスI/Fの場合でも同様である。
A coding example of the interrupt program is
Interface magazine (CQ publisher) March 1986 issue, pages 210 to 211. The coding list is for RS-232C I / F, but the basic part is the same for Centronics I / F.

【0007】さて、受信バッファから取込んだデータ
は、フォント展開等の処理が行われた後、印字バッファ
に転送される。必要なだけのデータ(例えば1ページ分
のデータ)が印字バッファに揃ったら、DMAコントロ
ーラ5によって、印字バッファ内のデータを印字部6に
DMA転送して、印字を実行する。
The data fetched from the reception buffer is transferred to the print buffer after being subjected to processing such as font expansion. When the required amount of data (for example, data for one page) is prepared in the print buffer, the DMA controller 5 DMA-transfers the data in the print buffer to the printing unit 6 to execute printing.

【0008】上記の例では、I/F部から受信バッファ
へのデータ格納を割込処理で実現しているが、この部分
をDMA転送で行う場合でも、ライトポインタ、リード
ポインタを用いて受信バッファからデータを取込む基本
的な仕組は、全く同一である。
In the above example, the data storage from the I / F section to the reception buffer is realized by the interrupt processing, but even when this section is carried out by the DMA transfer, the reception buffer is used by using the write pointer and the read pointer. The basic mechanism for fetching data from is exactly the same.

【0009】[0009]

【発明が解決しようとする課題】さて、上記従来技術で
は受信バッファに格納したデータの取込みに関して、 リードポインタとライトポインタを読み込む。
In the above-mentioned conventional technique, the read pointer and the write pointer are read for fetching the data stored in the receive buffer.

【0010】両者を比較する。The two are compared.

【0011】リードポインタ≠ライトポインタの場合
に、リードポインタが示す受信バッファのアドレスから
データを取込み、次いでリードポインタを“1”だけ増
加させる。リードポインタ=ライトポインタの場合に
は、取込むべきデータがないので何もしない。
When the read pointer is not equal to the write pointer, data is fetched from the address of the receiving buffer indicated by the read pointer, and then the read pointer is incremented by "1". If the read pointer = write pointer, there is no data to be fetched and nothing is done.

【0012】という処理を、定期的に実行している。こ
の際、リードポインタやライトポインタといったレジス
タやメモリ中の受信バッファへのアクセスが多数回に及
んでしまうため、装置全体の高速動作を疎外する原因と
なっていた。
The above process is periodically executed. At this time, a register such as a read pointer or a write pointer and a reception buffer in the memory are accessed many times, which is a cause of reducing the high-speed operation of the entire device.

【0013】本発明は、このような背景の下になされた
もので、その目的は、伝送されてきたデータを高速に受
信できるようにすることにある。
The present invention has been made under such a background, and an object thereof is to make it possible to receive transmitted data at high speed.

【0014】[0014]

【課題を解決するための手段】上記目的を達成するた
め、請求項1記載の発明は、少なくとも中央演算処理装
置と、伝送データを受信するインターフェースと、受信
バッファ領域が形成されたメモリと、前記メモリの受信
バッファ領域の任意のアドレスを指し示す第1ポインタ
および第2ポインタと、前記インターフェースを介して
伝送データが受信された場合に、前記第1ポインタで示
される前記受信バッファ領域のアドレス位置に当該伝送
データを格納して該第1ポインタを所定値だけ増加させ
る格納制御手段と、前記中央演算処理装置のバス上の固
定的なアドレス位置に配置された所定ビット長のレジス
タとを有するデータ受信装置であって、該レジスタは、
前記第1ポインタと第2ポインタの値を比較するポイン
タ比較手段と、前記中央演算処理装置または他のバスマ
スタ装置により当該レジスタに対して読出アクセスがな
された場合、前記ポインタ比較手段による比較結果に応
じて、少なくとも前記メモリの受信バッファ領域に格納
された伝送データの取込状況を示す取込状況データを当
該レジスタの所定位置の複数ビットに出力する取込状況
データ出力手段と、前記ポインタ比較手段による比較の
結果、前記第1ポインタと第2ポインタの値が等しくな
い場合に、前記メモリに対して前記第2ポインタで示さ
れる前記受信バッファ領域のアドレス位置で読出信号を
出力して該第2ポインタを所定値だけ増加させる読出制
御と、該読出制御により前記メモリの受信バッファ領域
から読出された伝送データを当該レジスタの前記所定位
置とは異なる位置の複数ビットに出力する伝送データ出
力手段とを有している。
In order to achieve the above object, the present invention according to claim 1 provides at least a central processing unit, an interface for receiving transmission data, a memory in which a reception buffer area is formed, and A first pointer and a second pointer that point to an arbitrary address in the receive buffer area of the memory, and, when transmission data is received via the interface, the address position of the receive buffer area indicated by the first pointer. A data receiving device having storage control means for storing transmission data and increasing the first pointer by a predetermined value, and a register having a predetermined bit length arranged at a fixed address position on the bus of the central processing unit. And the register is
When a read access is made to the register by the pointer comparison means for comparing the values of the first pointer and the second pointer and the central processing unit or another bus master device, the pointer comparison means responds to the comparison result by the pointer comparison means. And at least the acquisition status data output means for outputting the acquisition status data indicating the acquisition status of the transmission data stored in the reception buffer area of the memory to a plurality of bits at a predetermined position of the register, and the pointer comparison means. As a result of the comparison, when the values of the first pointer and the second pointer are not equal, a read signal is output to the memory at the address position of the reception buffer area indicated by the second pointer, and the second pointer is output. Is increased by a predetermined value, and the transmission read from the reception buffer area of the memory by the read control. Data and a transmission data output means for outputting a plurality of bits of a position different from the predetermined position of the register.

【0015】上記目的を達成するため、請求項2記載の
発明では、請求項1記載の前記中央演算処理装置は、前
記レジスタのデータ長と同一のデータ長のデータ転送命
令により、当該レジスタに対して読出アクセスを行うよ
うに構成されている。
In order to achieve the above object, in the invention according to claim 2, the central processing unit according to claim 1 instructs the register by a data transfer instruction having the same data length as the data length of the register. Read access.

【0016】上記目的を達成するため、請求項3記載の
発明では、請求項1記載の前記他のバスマスタ装置とし
て、DMA転送装置を具備している。
In order to achieve the above object, the invention of claim 3 includes a DMA transfer device as the other bus master device of claim 1.

【0017】上記目的を達成するため、請求項4記載の
発明では、請求項1〜3記載の前記取込状況データ出力
手段は、前記ポインタ比較手段による比較の結果、前記
第1ポインタと第2ポインタの値が等しい場合は、前記
メモリの受信バッファ領域からの未取込みの伝送データ
が存在しない旨のデータを、等しくない場合は、前記メ
モリの受信バッファ領域からの未取込みの伝送データが
存在する旨のデータを、当該レジスタの所定位置の複数
ビットに出力するように構成されている。
In order to achieve the above object, in the invention according to claim 4, the acquisition status data output means according to claims 1 to 3 is the result of the comparison by the pointer comparison means, and the first pointer and the second pointer. If the pointer values are equal, data indicating that there is no unacquired transmission data from the reception buffer area of the memory is present, and if the values of the pointers are not equal, there is unacquisition transmission data from the reception buffer area of the memory. The data to that effect is output to a plurality of bits at a predetermined position of the register.

【0018】上記目的を達成するため、請求項5記載の
発明では、請求項1〜3記載の前記取込状況データ出力
手段は、前記取込状況データとして、前記ポインタ比較
手段での比較の結果、前記第1ポインタと第2ポインタ
の値が等しくない場合に、その値の差を前記メモリの受
信バッファ領域からの未取込みの伝送データの量を示す
データとして当該レジスタの所定位置の複数ビットに出
力するように構成されている。
In order to achieve the above object, in the invention according to claim 5, the acquisition status data output means according to claims 1 to 3 uses the result of comparison by the pointer comparison means as the acquisition status data. , When the values of the first pointer and the second pointer are not equal, the difference between the values is set to a plurality of bits at a predetermined position of the register as data indicating the amount of unacquired transmission data from the reception buffer area of the memory. It is configured to output.

【0019】上記目的を達成するため、請求項6記載の
発明では、請求項1〜5記載の前記伝送データ出力手段
は、前記ポインタ比較手段での比較の結果、前記第1ポ
インタと第2ポインタの値が等しくない場合は、前記読
出制御により前記メモリの受信バッファ領域から読出さ
れた伝送データを、等しい場合は、予め定められた特定
のデータを、それぞれ当該レジスタの前記所定位置とは
異なる位置の複数ビットに出力するように構成されてい
る。
In order to achieve the above-mentioned object, in the invention according to claim 6, the transmission data output means according to claims 1 to 5 are the result of the comparison by the pointer comparison means, and the first pointer and the second pointer. If the values are not equal, the transmission data read from the reception buffer area of the memory by the read control is set. If they are equal, predetermined specific data is set at a position different from the predetermined position of the register. Is configured to output to multiple bits of.

【0020】上記目的を達成するため、請求項7記載の
発明では、請求項1〜6記載の前記インターフェース
は、パラレルインターフェースとなっている。
In order to achieve the above object, in the invention according to claim 7, the interfaces according to claims 1 to 6 are parallel interfaces.

【0021】上記目的を達成するため、請求項8記載の
発明では、請求項1〜6記載の前記インターフェース
は、シリアルインターフェースとなっている。
In order to achieve the above object, in the invention according to claim 8, the interface according to claims 1 to 6 is a serial interface.

【0022】上記目的を達成するため、請求項9記載の
発明では、請求項1〜8記載の当該データ受信装置は、
プリンタ装置に内蔵されている。
In order to achieve the above object, in the invention according to claim 9, the data receiving device according to claims 1 to 8 is:
It is built into the printer.

【0023】上記目的を達成するため、請求項10記載
の発明では、請求項1〜8記載の当該データ受信装置
は、ホスト装置に内蔵されている。
In order to achieve the above object, in the invention according to claim 10, the data receiving device according to claims 1 to 8 is built in a host device.

【0024】上記目的を達成するため、請求項11記載
の発明は、少なくとも中央演算処理装置と、伝送データ
を受信するインターフェースと、受信バッファ領域が形
成されたメモリと、前記メモリの受信バッファ領域の任
意のアドレスを指し示す第1ポインタおよび第2ポイン
タと、前記インターフェースを介して伝送データが受信
された場合に、前記第1ポインタで示される前記受信バ
ッファ領域のアドレス位置に当該伝送データを格納して
該第1ポインタを所定値だけ増加させる格納制御手段
と、前記中央演算処理装置のバス上の固定的なアドレス
位置に配置された所定ビット長のレジスタとを有し、該
レジスタは、前記第1ポインタと第2ポインタの値を比
較し、前記中央演算処理装置または他のバスマスタ装置
により当該レジスタに対して読出アクセスがなされた場
合、その比較結果に応じて、少なくとも前記メモリの受
信バッファ領域に格納された伝送データの取込状況を示
す取込状況データを当該レジスタの所定位置の複数ビッ
トに出力し、比較の結果、前記第1ポインタと第2ポイ
ンタの値が等しくない場合に、前記メモリに対して前記
第2ポインタで示される前記受信バッファ領域のアドレ
ス位置で読出信号を出力して該第2ポインタを所定値だ
け増加させ、前記メモリの受信バッファ領域から読出さ
れた伝送データを当該レジスタの前記所定位置とは異な
る位置の複数ビットに出力するように構成されている。
In order to achieve the above object, the invention according to claim 11 has at least a central processing unit, an interface for receiving transmission data, a memory in which a reception buffer area is formed, and a reception buffer area of the memory. When the transmission data is received via the first pointer and the second pointer pointing to an arbitrary address and the interface, the transmission data is stored in the address position of the reception buffer area indicated by the first pointer. Storage control means for increasing the first pointer by a predetermined value and a register of a predetermined bit length arranged at a fixed address position on the bus of the central processing unit, the register being the first The values of the pointer and the second pointer are compared, and the register is registered by the central processing unit or another bus master device. When a read access is made to the memory, at least the fetch status data indicating the fetch status of the transmission data stored in the reception buffer area of the memory is output to a plurality of bits at a predetermined position of the register according to the comparison result. However, as a result of the comparison, if the values of the first pointer and the second pointer are not equal, a read signal is output to the memory at the address position of the reception buffer area indicated by the second pointer, and the read signal is output. The 2 pointer is incremented by a predetermined value and the transmission data read from the reception buffer area of the memory is output to a plurality of bits at a position different from the predetermined position of the register.

【0025】上記目的を達成するため、請求項12記載
の発明では、請求項11記載の前記中央演算処理装置
は、前記レジスタのデータ長と同一のデータ長のデータ
転送命令により、当該レジスタに対して読出アクセスを
行うように構成されている。
In order to achieve the above object, in the invention according to claim 12, the central processing unit according to claim 11 instructs the register by a data transfer instruction having the same data length as the data length of the register. Read access.

【0026】上記目的を達成するため、請求項13記載
の発明では、請求項11記載の前記他のバスマスタ装置
として、DMA転送装置を具備している。
In order to achieve the above object, the invention according to claim 13 includes a DMA transfer device as the other bus master device according to claim 11.

【0027】上記目的を達成するため、請求項14記載
の発明では、請求項11〜13記載の前記取込状況デー
タとしては、前記第1ポインタと第2ポインタの値が等
しい場合は、前記メモリの受信バッファ領域からの未取
込みの伝送データが存在しない旨のデータを、等しくな
い場合は、前記メモリの受信バッファ領域からの未取込
みの伝送データが存在する旨のデータを、当該レジスタ
の所定位置の複数ビットに出力するように構成されてい
る。
In order to achieve the above-mentioned object, in the invention described in claim 14, when the values of the first pointer and the second pointer are the same as the acquisition status data of claims 11 to 13, the memory is If the data indicating that there is no unacquired transmission data from the receiving buffer area is not equal to the data indicating that there is unacquired transmission data from the receiving buffer area of the memory, Is configured to output to multiple bits of.

【0028】上記目的を達成するため、請求項15記載
の発明では、請求項11〜13記載の前記取込状況デー
タとしては、前記第1ポインタと第2ポインタの値が等
しくない場合に、その値の差を前記メモリの受信バッフ
ァ領域からの未取込みの伝送データの量を示すデータと
して当該レジスタの所定位置の複数ビットに出力するよ
うに構成されている。
In order to achieve the above object, in the invention described in claim 15, as the acquisition status data according to claims 11 to 13, when the values of the first pointer and the second pointer are not equal, The difference between the values is output to a plurality of bits at a predetermined position of the register as data indicating the amount of unacquired transmission data from the reception buffer area of the memory.

【0029】上記目的を達成するため、請求項16記載
の発明では、請求項11〜15記載のデータ受信方法に
おいて、前記第1ポインタと第2ポインタの値が等しく
ない場合は、前記メモリの受信バッファ領域から読出さ
れた伝送データを、等しい場合は、予め定められた特定
のデータを、それぞれ当該レジスタの前記所定位置とは
異なる位置の複数ビットに出力するように構成されてい
る。
In order to achieve the above object, in the invention according to claim 16, in the data receiving method according to claims 11 to 15, when the values of the first pointer and the second pointer are not equal, the reception of the memory is performed. When the transmission data read from the buffer area is equal, predetermined specific data is output to a plurality of bits at positions different from the predetermined position of the register.

【0030】上記目的を達成するため、請求項17記載
の発明では、請求項11〜16記載の前記インターフェ
ースは、パラレルインターフェースとなっている。
In order to achieve the above object, in the invention according to claim 17, the interfaces according to claims 11 to 16 are parallel interfaces.

【0031】上記目的を達成するため、請求項18記載
の発明では、請求項11〜16記載の前記インターフェ
ースは、シリアルインターフェースとなっている。
In order to achieve the above object, in the invention described in claim 18, the interface according to claims 11 to 16 is a serial interface.

【0032】上記目的を達成するため、請求項19記載
の発明では、請求項11〜18記載のデータ受信方法
は、プリンタ装置に適用されている。
In order to achieve the above object, in the invention described in claim 19, the data receiving method according to claims 11 to 18 is applied to a printer device.

【0033】上記目的を達成するため、請求項20記載
の発明では、請求項11〜18記載のデータ受信方法
は、ホスト装置に適用されている。
In order to achieve the above object, in the invention described in claim 20, the data receiving method according to claims 11 to 18 is applied to a host device.

【0034】上記目的を達成するため、請求項21記載
の発明は、少なくとも中央演算処理装置と、他の情報処
理用の機器から伝送データを受信するインターフェース
と、受信バッファ領域が形成されたメモリと、前記メモ
リの受信バッファ領域の任意のアドレスを指し示す第1
ポインタおよび第2ポインタと、前記インターフェース
を介して伝送データが受信された場合に、前記第1ポイ
ンタで示される前記受信バッファ領域のアドレス位置に
当該伝送データを格納して該第1ポインタを所定値だけ
増加させる格納制御手段と、前記中央演算処理装置のバ
ス上の固定的なアドレス位置に配置された所定ビット長
のレジスタとを有するデータ受信シスステムであって、
該レジスタは、前記第1ポインタと第2ポインタの値を
比較するポインタ比較手段と、前記中央演算処理装置ま
たは他のバスマスタ装置により当該レジスタに対して読
出アクセスがなされた場合、前記ポインタ比較手段によ
る比較結果に応じて、少なくとも前記メモリの受信バッ
ファ領域に格納された伝送データの取込状況を示す取込
状況データを当該レジスタの所定位置の複数ビットに出
力する取込状況データ出力手段と、前記ポインタ比較手
段による比較の結果、前記第1ポインタと第2ポインタ
の値が等しくない場合に、前記メモリに対して前記第2
ポインタで示される前記受信バッファ領域のアドレス位
置で読出信号を出力して該第2ポインタを所定値だけ増
加させる読出制御と、該読出制御により前記メモリの受
信バッファ領域から読出された伝送データを当該レジス
タの前記所定位置とは異なる位置の複数ビットに出力す
る伝送データ出力手段とを有している。
In order to achieve the above object, the invention as claimed in claim 21 includes at least a central processing unit, an interface for receiving transmission data from other information processing equipment, and a memory in which a reception buffer area is formed. , A first pointing to any address in the receive buffer area of said memory
When the transmission data is received via the pointer and the second pointer and the interface, the transmission data is stored in the address position of the reception buffer area indicated by the first pointer, and the first pointer is set to a predetermined value. A data reception system having storage control means for increasing the number of bits and a register having a predetermined bit length arranged at a fixed address position on the bus of the central processing unit,
The register is provided by pointer comparison means for comparing the values of the first pointer and the second pointer, and by the pointer comparison means when read access is made to the register by the central processing unit or another bus master device. In accordance with a comparison result, at least acquisition status data output means for outputting acquisition status data indicating the acquisition status of the transmission data stored in the reception buffer area of the memory to a plurality of bits at a predetermined position of the register, As a result of comparison by the pointer comparison means, if the values of the first pointer and the second pointer are not equal, the second value is stored in the memory.
The read control for outputting a read signal at the address position of the reception buffer area indicated by the pointer to increase the second pointer by a predetermined value, and the transmission data read from the reception buffer area of the memory by the read control. And a transmission data output means for outputting a plurality of bits at a position different from the predetermined position of the register.

【0035】上記目的を達成するため、請求項22記載
の発明では、請求項21記載の前記中央演算処理装置
は、前記レジスタのデータ長と同一のデータ長のデータ
転送命令により、当該レジスタに対して読出アクセスを
行うように構成されている。
In order to achieve the above object, in the invention of claim 22, the central processing unit of claim 21 instructs the register by a data transfer instruction having the same data length as the data length of the register. Read access.

【0036】上記目的を達成するため、請求項23記載
の発明では、請求項21記載の前記他のバスマスタ装置
として、DMA転送装置を具備している。
In order to achieve the above object, the invention of claim 23 is provided with a DMA transfer device as the other bus master device of claim 21.

【0037】上記目的を達成するため、請求項24記載
の発明では、請求項21〜23記載の前記取込状況デー
タ出力手段は、前記ポインタ比較手段による比較の結
果、前記第1ポインタと第2ポインタの値が等しい場合
は、前記メモリの受信バッファ領域からの未取込みの伝
送データが存在しない旨のデータを、等しくない場合
は、前記メモリの受信バッファ領域からの未取込みの伝
送データが存在する旨のデータを、当該レジスタの所定
位置の複数ビットに出力するように構成されている。
In order to achieve the above object, in the invention described in claim 24, the acquisition status data output means according to claim 21 to claim 23, the result of the comparison by the pointer comparison means results in the first pointer and the second pointer. If the pointer values are equal, data indicating that there is no unacquired transmission data from the receive buffer area of the memory is present, and if they are not equal, there is unacquired transmission data from the receive buffer area of the memory. The data to that effect is output to a plurality of bits at a predetermined position of the register.

【0038】上記目的を達成するため、請求項25記載
の発明では、請求項21〜23記載の前記取込状況デー
タ出力手段は、前記取込状況データとして、前記ポイン
タ比較手段での比較の結果、前記第1ポインタと第2ポ
インタの値が等しくない場合に、その値の差を前記メモ
リの受信バッファ領域からの未取込みの伝送データの量
を示すデータとして当該レジスタの所定位置の複数ビッ
トに出力するように構成されている。
In order to achieve the above object, in the invention described in claim 25, the acquisition status data output means according to claims 21 to 23 uses the result of the comparison in the pointer comparison means as the acquisition status data. , When the values of the first pointer and the second pointer are not equal, the difference between the values is set to a plurality of bits at a predetermined position of the register as data indicating the amount of unacquired transmission data from the reception buffer area of the memory. It is configured to output.

【0039】上記目的を達成するため、請求項26記載
の発明では、請求項21〜25記載の前記伝送データ出
力手段は、前記ポインタ比較手段での比較の結果、前記
第1ポインタと第2ポインタの値が等しくない場合は、
前記読出制御により前記メモリの受信バッファ領域から
読出された伝送データを、等しい場合は、予め定められ
た特定のデータを、それぞれ当該レジスタの前記所定位
置とは異なる位置の複数ビットに出力するように構成さ
れている。
In order to achieve the above object, in the invention described in claim 26, the transmission data output means according to claims 21 to 25 has the first pointer and the second pointer as a result of the comparison by the pointer comparison means. If the values of are not equal,
When the transmission data read from the reception buffer area of the memory by the read control is equal, predetermined specific data is output to a plurality of bits at positions different from the predetermined position of the register. It is configured.

【0040】上記目的を達成するため、請求項27記載
の発明では、請求項21〜26記載の前記インターフェ
ースは、パラレルインターフェースとなっている。
In order to achieve the above object, in the invention of claim 27, the interface of claims 21 to 26 is a parallel interface.

【0041】上記目的を達成するため、請求項28記載
の発明では、請求項21〜26記載の前記インターフェ
ースは、シリアルインターフェースとなっている。
In order to achieve the above object, in the invention according to claim 28, the interface according to claims 21 to 26 is a serial interface.

【0042】上記目的を達成するため、請求項29記載
の発明では、請求項21〜28記載のデータ受信システ
ムは、プリンタ装置に内蔵されている。
In order to achieve the above object, in the invention of claim 29, the data receiving system of claims 21 to 28 is built in a printer device.

【0043】上記目的を達成するため、請求項30記載
の発明では、請求項21〜28記載のデータ受信システ
ムは、ホスト装置に内蔵されている。
In order to achieve the above object, in the invention according to claim 30, the data receiving system according to claims 21 to 28 is built in a host device.

【0044】[0044]

【作用】請求項1記載の発明では、前記格納制御手段
は、前記インターフェースを介して伝送データが受信さ
れた場合に、前記第1ポインタで示される前記受信バッ
ファ領域のアドレス位置に当該伝送データを格納して該
第1ポインタを所定値だけ増加させ、前記取込状況デー
タ出力手段は、前記中央演算処理装置または他のバスマ
スタ装置により当該レジスタに対して読出アクセスがな
された場合、前記ポインタ比較手段による比較結果に応
じて、少なくとも前記メモリの受信バッファ領域に格納
された伝送データの取込状況を示す取込状況データを当
該レジスタの所定位置の複数ビットに出力し、前記読出
制御は、前記ポインタ比較手段による比較の結果、前記
第1ポインタと第2ポインタの値が等しくない場合に、
前記メモリに対して前記第2ポインタで示される前記受
信バッファ領域のアドレス位置で読出信号を出力して該
第2ポインタを所定値だけ増加させ、前記伝送データ出
力手段は、前記読出制御により前記メモリの受信バッフ
ァ領域から読出された伝送データを当該レジスタの前記
所定位置とは異なる位置の複数ビットに出力する。
According to the present invention, when the transmission data is received via the interface, the storage control means stores the transmission data at the address position of the reception buffer area indicated by the first pointer. The first pointer is stored and incremented by a predetermined value, and the fetch status data output means, when the central processing unit or another bus master device makes a read access to the register, the pointer comparison means. According to the result of comparison by the above, at least the acquisition status data indicating the acquisition status of the transmission data stored in the reception buffer area of the memory is output to a plurality of bits at a predetermined position of the register, and the read control is performed by the pointer. When the values of the first pointer and the second pointer are not equal as a result of the comparison by the comparison means,
A read signal is output to the memory at the address position of the reception buffer area indicated by the second pointer to increase the second pointer by a predetermined value, and the transmission data output means causes the memory to perform the read control. The transmission data read from the reception buffer area is output to a plurality of bits at a position different from the predetermined position of the register.

【0045】従って、前記中央演算処理装置は、固定位
置に配置された当該レジスタをアクセスするだけで、換
言すれば1回のリード命令を実行するだけで、前記受信
バッファ領域に格納された伝送データを全て取込めるの
で、伝送されてきたデータを高速に受信できるようにな
る。
Therefore, the central processing unit only needs to access the register arranged at a fixed position, in other words, to execute the read command once, so that the transmission data stored in the reception buffer area can be obtained. Since all of the data can be captured, the transmitted data can be received at high speed.

【0046】請求項2記載の発明では、請求項1記載の
前記中央演算処理装置は、前記レジスタのデータ長と同
一のデータ長のデータ転送命令により、当該レジスタに
対して読出アクセスを行うことにより、請求項1と同様
の作用・効果が得られる。
According to a second aspect of the present invention, the central processing unit according to the first aspect performs a read access to the register by a data transfer instruction having the same data length as the data length of the register. The same action and effect as in claim 1 can be obtained.

【0047】請求項3記載の発明では、請求項1記載の
前記他のバスマスタ装置として、DMA転送装置を具備
しており、請求項1と同様の作用・効果が得られる。
According to the invention of claim 3, a DMA transfer device is provided as the other bus master device of claim 1, and the same operation and effect as in claim 1 can be obtained.

【0048】請求項4記載の発明では、請求項1〜3記
載の前記取込状況データ出力手段は、前記ポインタ比較
手段による比較の結果、前記第1ポインタと第2ポイン
タの値が等しい場合は、前記メモリの受信バッファ領域
からの未取込みの伝送データが存在しない旨のデータ
を、等しくない場合は、前記メモリの受信バッファ領域
からの未取込みの伝送データが存在する旨のデータを、
当該レジスタの所定位置の複数ビットに出力することに
より、請求項1と同様の作用・効果が得られる。
In the invention described in claim 4, when the result of the comparison by the pointer comparison means is that the values of the first pointer and the second pointer are equal, , Data indicating that there is no unacquired transmission data from the receiving buffer area of the memory, and if not equal, data indicating that there is unacquired transmission data from the receiving buffer area of the memory,
By outputting to a plurality of bits at a predetermined position of the register, the same operation and effect as in claim 1 can be obtained.

【0049】請求項5記載の発明では、請求項1〜3記
載の前記取込状況データ出力手段は、前記取込状況デー
タとして、前記ポインタ比較手段での比較の結果、前記
第1ポインタと第2ポインタの値が等しくない場合に、
その値の差を前記メモリの受信バッファ領域からの未取
込みの伝送データの量を示すデータとして当該レジスタ
の所定位置の複数ビットに出力することにより、請求項
1と同様の作用・効果が得られる。
In the invention according to claim 5, the acquisition status data output means according to claims 1 to 3 uses the first pointer and the first pointer as the acquisition status data as a result of the comparison in the pointer comparison means. If the values of 2 pointers are not equal,
By outputting the difference between the values to a plurality of bits at a predetermined position of the register as data indicating the amount of unacquired transmission data from the reception buffer area of the memory, the same operation and effect as in claim 1 can be obtained. .

【0050】請求項6記載の発明では、請求項1〜5記
載の前記伝送データ出力手段は、前記ポインタ比較手段
での比較の結果、前記第1ポインタと第2ポインタの値
が等しくない場合は、前記読出制御により前記メモリの
受信バッファ領域から読出された伝送データを、等しい
場合は、予め定められた特定のデータを、それぞれ当該
レジスタの前記所定位置とは異なる位置の複数ビットに
出力することにより、請求項1と同様の作用・効果が得
られる。
According to a sixth aspect of the present invention, in the transmission data output means according to the first to fifth aspects, when the values of the first pointer and the second pointer are not equal as a result of the comparison by the pointer comparison means. If the transmission data read from the reception buffer area of the memory by the read control is equal, predetermined specific data is output to a plurality of bits at a position different from the predetermined position of the register. As a result, the same action and effect as those of the first aspect can be obtained.

【0051】請求項7記載の発明では、請求項1〜6記
載の前記インターフェースは、パラレルインターフェー
スとなっており、請求項1と同様の作用・効果が得られ
る。
In the invention described in claim 7, the interface according to claims 1 to 6 is a parallel interface, and the same operation and effect as in claim 1 can be obtained.

【0052】請求項8記載の発明では、請求項1〜6記
載の前記インターフェースは、シリアルインターフェー
スとなっており、請求項1と同様の作用・効果が得られ
る。
In the invention described in claim 8, the interface according to claims 1 to 6 is a serial interface, and the same operation and effect as in claim 1 can be obtained.

【0053】請求項9記載の発明では、請求項1〜8記
載の当該データ受信装置は、プリンタ装置に内蔵されて
おり、請求項1と同様の作用・効果が得られる。
In the invention described in claim 9, the data receiving device according to any one of claims 1 to 8 is incorporated in the printer device, and the same operation and effect as in claim 1 can be obtained.

【0054】請求項10記載の発明では、請求項1〜8
記載の当該データ受信装置は、ホスト装置に内蔵されて
おり、請求項1と同様の作用・効果が得られる。
According to the invention of claim 10, claims 1 to 8 are provided.
The described data receiving device is built in the host device, and the same operation and effect as in claim 1 can be obtained.

【0055】なお、請求項11〜30記載の発明におい
ても、請求項1と同様の作用・効果が得られる。
Also in the inventions described in claims 11 to 30, the same operation and effect as in claim 1 can be obtained.

【0056】[0056]

【実施例】以下、本発明の実施例を図面を参照しながら
説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0057】[第1実施例]図1は、本発明の第1実施
例によるデータ受信装置を内蔵したプリンタ装置の概略
構成を示すブロック図である。
[First Embodiment] FIG. 1 is a block diagram showing the schematic arrangement of a printer apparatus incorporating a data receiving apparatus according to the first embodiment of the present invention.

【0058】図1において、10はCPUであり、装置
全体の制御を行うものである。CPU10は、16ビッ
ト(2バイト)のデータバスと、24ビット(16Mバ
イトのメモリ空間)のアドレスバスを有し、少なくとも
16ビット長のデータ転送命令が実行可能なものであ
る。16ビットのデータバスは、ワード(2バイト)ア
クセスのときはそのままであるが、バイトアクセスのと
きは、偶数アドレスが上位バイトに、また奇数アドレス
が下位バイトに配置される。11はROM/RAMであ
り、ROM部にはプログラム、フォントデータ等が記憶
されており、RAM部は各種作業領域として利用され
る。
In FIG. 1, reference numeral 10 denotes a CPU, which controls the entire apparatus. The CPU 10 has a 16-bit (2-byte) data bus and a 24-bit (16-Mbyte memory space) address bus, and is capable of executing a data transfer instruction of at least 16-bit length. The 16-bit data bus remains unchanged for word (2 bytes) access, but for byte access, even addresses are arranged in the upper byte and odd addresses are arranged in the lower byte. A ROM / RAM 11 stores programs, font data, and the like in the ROM section, and the RAM section is used as various work areas.

【0059】12は印字部であり、モータや印字ヘッ
ド、及びそれらを駆動する回路などから構成される。1
3はセントロニクスI/Fに準拠したパラレルI/Fで
ある。16は受信バッファとして用いるRAMである。
RAM16は、CPU10のバスには直結されずに、R
AMアクセス回路15を介して接続される。このRAM
アクセス回路15には、本発明に係わる受信バッファリ
ードポートが含まれている。
Reference numeral 12 denotes a printing section, which is composed of a motor, a print head, a circuit for driving them, and the like. 1
Reference numeral 3 is a parallel I / F conforming to the Centronics I / F. Reference numeral 16 is a RAM used as a reception buffer.
The RAM 16 is not directly connected to the bus of the CPU 10,
It is connected via the AM access circuit 15. This RAM
The access circuit 15 includes a reception buffer read port according to the present invention.

【0060】図1ではRAM素子としてROM/RAM
11とRAM16の双方に具備しているが、1ユニット
のRAM素子のみで、システムを構成する場合は、RO
M/RAM11にはRAM素子を具備せず、RAM16
だけを有するようにしてもよい。この場合は、RAM1
6の一部を受信バッファとして利用し、他の部分は各種
作業領域として用いる。
In FIG. 1, ROM / RAM is used as a RAM element.
11 and RAM 16 are provided, but if the system is configured with only one unit of RAM element, RO
The M / RAM 11 does not include a RAM element, and the RAM 16
You may have only. In this case, RAM1
Part of 6 is used as a receive buffer, and the other part is used as various work areas.

【0061】14はDMAコントローラであり、パラレ
ルI/F13に伝送データが到来したときに、RAM1
6に当該伝送データをDMA転送するものである。17
および18は、それぞれカウンタ回路などからなるライ
トポインタ、リードポインタである。上記DMA転送
は、DMAコントローラ14内に設定されるベースアド
レスにライトポインタ17がオフセットとして指し示す
アドレスに対して実施される。
Reference numeral 14 denotes a DMA controller, which when the transmission data arrives at the parallel I / F 13, the RAM 1
6, the transmission data is DMA-transferred. 17
Reference numerals 18 and 18 are a write pointer and a read pointer, respectively, which are composed of counter circuits and the like. The above-mentioned DMA transfer is carried out with respect to the address pointed by the write pointer 17 as an offset to the base address set in the DMA controller 14.

【0062】また、DMAコントローラ14が、伝送デ
ータをDMA転送する度毎にライトポインタ17のポイ
ンタ値が“1”だけ増加するように構成されている。一
方、リードポインタ18では、受信バッファをリードし
たときにポインタ値が“1”だけ増加するように構成さ
れている。すなわち、ライトポインタ17とリードポイ
ンタ18とで、受信バッファとしていわゆるリングバッ
ファを構成する。
Further, the DMA controller 14 is constructed so that the pointer value of the write pointer 17 is incremented by "1" every time the transmission data is DMA-transferred. On the other hand, the read pointer 18 is configured so that the pointer value is incremented by "1" when the reception buffer is read. That is, the write pointer 17 and the read pointer 18 form a so-called ring buffer as a reception buffer.

【0063】19はバッファフル判定回路であり、受信
バッファのオーバーフローを防止するために、ライトポ
インタ17とリードポインタ18のポインタ値を比較し
て一定値以上になったときに、パラレルI/F13のB
USY信号をアサートして、ホスト装置からのそれ以後
のデータ伝送を抑制する。受信バッファからのデータの
取込みが進行して、両ポインタの差が所定値以下になっ
たら、再びBUSY信号をネゲートする。なお、図1に
は不図示であるが、装置立上げ時等にCPU10からの
指示に基づいて、ライトポインタ17、リードポインタ
18を“0”に初期化できるようになっている。
Reference numeral 19 denotes a buffer full determination circuit, which compares the pointer values of the write pointer 17 and the read pointer 18 when the pointer values of the write pointer 17 and the read pointer 18 exceed a certain value in order to prevent the overflow of the receiving buffer. B
Assert the USY signal to suppress subsequent data transmission from the host device. When the data acquisition from the reception buffer progresses and the difference between the two pointers becomes less than a predetermined value, the BUSY signal is negated again. Although not shown in FIG. 1, the write pointer 17 and the read pointer 18 can be initialized to “0” based on an instruction from the CPU 10 when the device is started up.

【0064】図2は、RAMアクセス回路15の詳細な
構成を示すブロック図である。なお、受信バッファリー
ドポートは、主として後述する下位バイト入出力回路2
8、上位バイト入出力回路29により構成されるもので
あるが、図2に示した全ての構成要素をも含んだ概念的
なレジスタ(エントリ)として構成されている。
FIG. 2 is a block diagram showing a detailed structure of the RAM access circuit 15. The receive buffer read port is mainly used for the lower byte input / output circuit 2 described later.
8. The upper byte input / output circuit 29 is configured as a conceptual register (entry) including all the components shown in FIG.

【0065】図2において、20は受信バッファリード
ポートへのアクセスをデコードする受信バッファリード
ポートアドレスデコーダであり、当該ポートにリードア
クセスがあったときに“H”レベルの信号を出力する。
In FIG. 2, reference numeral 20 denotes a receive buffer read port address decoder for decoding access to the receive buffer read port, which outputs a signal of "H" level when there is a read access to the port.

【0066】22はライトポインタ17とリードポイン
タ18のポインタ値を比較するコンパレータであり、等
しくないときに“H”レベルの信号をAND素子21へ
出力する。AND素子21の出力はリードポインタ18
に接続されている。リードポインタ18では、該出力信
号の立上げエッジに同期してポインタ値が“1”だけ増
加するようになっている。従って、リードポインタ18
は、受信バッファに未取込みの受信データある場合に、
上記受信バッファリードポートへのアクセスの終了時点
でポインタ値が“1”増加し、受信バッファが空の場合
にはポインタ値は動かない。
Reference numeral 22 is a comparator for comparing the pointer values of the write pointer 17 and the read pointer 18, and outputs a signal of "H" level to the AND element 21 when they are not equal. The output of the AND element 21 is the read pointer 18
It is connected to the. In the read pointer 18, the pointer value is increased by "1" in synchronization with the rising edge of the output signal. Therefore, the read pointer 18
If there is unacquired receive data in the receive buffer,
The pointer value increases by "1" at the end of access to the reception buffer read port, and the pointer value does not move when the reception buffer is empty.

【0067】24はRAM16へのアドレス信号を生成
するアドレス生成回路であり、ベースアドレス設定回路
23とリードポインタ18の出力を繋ぎ合わせて24ビ
ットのアドレス信号を生成するものである。例えば、受
信バッファとして64Kバイトの容量を持つ場合に、リ
ードポインタ18(およびライトポインタ17)のビッ
ト数は16ビットであるから、ベースアドレス設定回路
23では、残りの上記8ビット分を設定し、アドレス生
成回路24にて両者を合成して24ビット分の信号を生
成する。上記8ビット分のアドレス情報は、前述したD
MAコントローラ14内に設定されるベースアドレスの
上位8ビット、および後述するRAM領域アドレスデコ
ーダ25でデコードするアドレス信号の上位8ビットと
同一のものである。
Reference numeral 24 is an address generation circuit for generating an address signal to the RAM 16, which connects the outputs of the base address setting circuit 23 and the read pointer 18 to generate a 24-bit address signal. For example, when the receiving buffer has a capacity of 64 Kbytes, the number of bits of the read pointer 18 (and the write pointer 17) is 16 bits, so the base address setting circuit 23 sets the remaining 8 bits, The address generation circuit 24 combines the two to generate a 24-bit signal. The 8-bit address information is the above-mentioned D
It is the same as the upper 8 bits of the base address set in the MA controller 14 and the upper 8 bits of the address signal decoded by the RAM area address decoder 25 described later.

【0068】ところで、ベースアドレス設定回路23に
設定するアドレス情報は、回路的に固定的なものであっ
てよいのであるが、RAM16のアドレス領域をはみ出
さない範囲において、CPU10から適宜設定できるよ
うにしてもよい。もちろん、DMAコントローラ14内
に設定されるベースアドレスと対応がとれていなければ
ならないことは言うまでもない。
By the way, the address information set in the base address setting circuit 23 may be fixed in terms of the circuit. However, the address information can be appropriately set by the CPU 10 within a range that does not extend beyond the address area of the RAM 16. May be. Of course, it goes without saying that it must correspond to the base address set in the DMA controller 14.

【0069】26はアドレスセレクタであり、上記アド
レス生成回路24からのアドレス信号とアドレスバスか
らのアドレス信号のどちらをRAM16へ出力するのか
を、前述受信バッファリードポートアドレスデコーダ2
0の出力に基づいて選択するためのセレクタ回路であ
る。具体的には、受信バッファリードポートにアクセス
があった場合には、アドレス生成回路24からのアドレ
ス信号が、そうでない場合には、アドレスバスからのア
ドレス信号がそのままRAM16に出力される。
Reference numeral 26 denotes an address selector which determines which of the address signal from the address generation circuit 24 and the address signal from the address bus is output to the RAM 16 by the reception buffer read port address decoder 2 described above.
It is a selector circuit for selecting based on the output of 0. Specifically, when the reception buffer read port is accessed, the address signal from the address generation circuit 24 is output to the RAM 16 as it is, while the address signal from the address bus is output as it is.

【0070】25はRAM16へのアクセスをデコード
するRAM領域アドレスデコーダであり、RAM16に
対してリード/ライトのアクセスがあったときに“H”
レベルの信号を出力する。該出力信号はNOR素子27
を介してイネーブル信号としてRAM16に出力され
る。NOR素子27の他方の入力端子には、AND素子
21の出力が接続されている。
Reference numeral 25 is a RAM area address decoder which decodes access to the RAM 16, and is "H" when there is a read / write access to the RAM 16.
Output level signal. The output signal is the NOR element 27.
Is output to the RAM 16 as an enable signal via. The output of the AND element 21 is connected to the other input terminal of the NOR element 27.

【0071】従って、RAM16はCPU10ないしは
DMAコントローラ14から普通にリード/ライトされ
るだけでなく、受信バッファに未取込みの受信データあ
る場合に、上記受信バッファリードポートがリードされ
た場合にもリードアクセスされる。RAM16には、こ
の他、CPUバスからリード/ライト信号、ワード/バ
イト指定信号が接続される。
Therefore, the RAM 16 is not only read / written normally by the CPU 10 or the DMA controller 14, but also when there is unacquired receive data in the receive buffer, read access is performed even if the receive buffer read port is read. To be done. In addition to this, a read / write signal and a word / byte designation signal are connected to the RAM 16 from the CPU bus.

【0072】図3にRAM16の詳細な構成図を示す。
図3において、40はDRAMアクセス回路、41は所
定領域に受信バッファ41aが形成されたDRAMであ
る。DRAMアクセス回路40からはRAS信号、CA
S信号、行・列アドレス信号、ライトイネーブル信号、
出力イネーブル信号、下位バイトおよび上記バイトライ
ト信号が出力される。DRAMアクセス回路40は、D
RAM41のリフレッシュ動作を行うほか、RAM16
に対してアクセスがあった場合に、上記信号群を適宜出
力して、DRAM41に対するリード/ライトを行う。
FIG. 3 shows a detailed block diagram of the RAM 16.
In FIG. 3, reference numeral 40 is a DRAM access circuit, and 41 is a DRAM having a reception buffer 41a formed in a predetermined area. RAS signal, CA from the DRAM access circuit 40
S signal, row / column address signal, write enable signal,
The output enable signal, the lower byte and the byte write signal are output. The DRAM access circuit 40 has a D
In addition to refreshing RAM41, RAM16
When there is an access to, the above-mentioned signal group is appropriately output to read / write the DRAM 41.

【0073】さて、図2の説明に戻ると、図2におい
て、28,29はそれぞれ下位バイト入出力回路、上位
バイト入出力回路であり、セレクタ回路およびバスバッ
ファ回路から構成される。両入出力回路は、ライト時に
はデータバスとRAM16とを単純に接続するだけであ
るが、リード時には、いくつかの異なったデータを選択
して、データバスに出力するようになっている。
Returning to the explanation of FIG. 2, reference numerals 28 and 29 in FIG. 2 denote a lower byte input / output circuit and an upper byte input / output circuit, respectively, which are composed of a selector circuit and a bus buffer circuit. Both the input / output circuits simply connect the data bus and the RAM 16 at the time of writing, but at the time of reading, some different data are selected and output to the data bus.

【0074】すなわち、下位バイト入出力回路28で
は、RAM16へのA0信号、AND素子21の出力信
号、RAM領域アドレスデコード信号および受信バッフ
ァリードポートアドレスデコード信号の組合せに応じ
て、RAM16の下位バイトデータ、上位バイトデー
タ、または固定値設定回路30の出力データ“0ff
h”のいずれかが出力される(図4参照)。
That is, in the lower byte input / output circuit 28, the lower byte data of the RAM 16 is selected according to the combination of the A0 signal to the RAM 16, the output signal of the AND element 21, the RAM area address decode signal and the receive buffer read port address decode signal. , Upper byte data, or output data “0ff” of the fixed value setting circuit 30.
Any of h "is output (see FIG. 4).

【0075】また、上位バイト入出力回路29では、A
ND素子21の出力信号、RAM領域のアドレスデコー
ド信号および受信バッファリードポートアドレスデコー
ド信号の組合せに応じて、RAM16の上位バイトデー
タ、固定値設定回路31の出力データ“0ffh”、ま
たは固定値設定回路32の出力データ“00h”のいず
れかが出力される(図5参照)。
In the upper byte input / output circuit 29, A
Depending on the combination of the output signal of the ND element 21, the address decode signal of the RAM area and the receive buffer read port address decode signal, the upper byte data of the RAM 16, the output data “0ffh” of the fixed value setting circuit 31, or the fixed value setting circuit Any of the 32 output data "00h" is output (see FIG. 5).

【0076】図6に下位バイト入出力回路28の詳細な
構成図を示す。図6において、63はライト時のトライ
ステートバスバッファで、NAND素子64によりRA
M16のアドレス領域にライト動作が行われたときにバ
ッファ動作を行い、それ以外のときはハイインピーダン
スになるようになっている。
FIG. 6 is a detailed block diagram of the lower byte input / output circuit 28. In FIG. 6, reference numeral 63 is a tri-state bus buffer at the time of writing, which is RA by the NAND element 64.
When a write operation is performed in the address area of M16, a buffer operation is performed, and in other cases, a high impedance is set.

【0077】同様に、65はリード時のトライステート
バスバッファであり、OR素子66、NOT素子67、
NAND素子68によりRAM16のアドレス領域か受
信バッファリードポートにリード動作が行われたときに
バッファ動作を行い、それ以外のときはハイインピーダ
ンスになるようになっている。62は3ツー1のデータ
セレクタであり、RAM16の上位バイトのデータ信
号、下位バイトのデータ信号、固定値設定回路30の出
力データ信号のうち1つを、図4に示した条件に従って
選択し、バスバッファ65に出力する。
Similarly, reference numeral 65 is a tri-state bus buffer at the time of reading, and the OR element 66, NOT element 67,
When the NAND element 68 performs a read operation on the address area of the RAM 16 or the reception buffer read port, the buffer operation is performed, and otherwise, the impedance becomes high impedance. Reference numeral 62 denotes a 3 to 1 data selector, which selects one of the upper byte data signal, the lower byte data signal, and the output data signal of the fixed value setting circuit 30 of the RAM 16 according to the condition shown in FIG. Output to the bus buffer 65.

【0078】図7に上位バイト入出力回路29の詳細な
構成図を示す。図7において、73,74,75,7
6,77,78はそれぞれライト時のトライステートバ
スバッファ、NAND素子、リード時のトライステート
バスバッファ、OR素子、NOT素子、NAND素子で
あり、前記図6で説明した63〜68と全く同様のもの
である。72は3ツー1のデータセレクタであり、RA
M16の上位バイトのデータ信号、固定値設定回路31
の出力データ信号、固定値設定回路32の出力データ信
号のうち1つを、図5に示した条件に従って選択し、バ
スバッファ75に出力する。
FIG. 7 is a detailed block diagram of the upper byte input / output circuit 29. In FIG. 7, 73, 74, 75, 7
Reference numerals 6, 77 and 78 denote a tristate bus buffer at the time of writing, a NAND element, a tristate bus buffer at the time of reading, an OR element, a NOT element, and a NAND element, which are exactly the same as 63 to 68 described in FIG. It is a thing. 72 is a 3 to 1 data selector, which is an RA
Data signal of upper byte of M16, fixed value setting circuit 31
1 and the output data signal of the fixed value setting circuit 32 are selected according to the conditions shown in FIG. 5 and output to the bus buffer 75.

【0079】次に、以上の回路構成におけるRAMアク
セス回路15の全体的な動作について説明する。
Next, the overall operation of the RAM access circuit 15 in the above circuit configuration will be described.

【0080】まず、CPU10あるいはDMAコントロ
ーラ14がRAM16のアドレス領域に対してリード/
ライトを行った場合は、特別な動作は起こらない。この
場合、RAM16へはアドレスバスのアドレス信号が出
力され、RAM16のデータ信号端子はデータバスと接
続される。すなわち、RAMアクセス回路15を介さ
ず、RAM16を直接CPUバスに接続したときと同様
の動作をする。
First, the CPU 10 or the DMA controller 14 reads / writes in the address area of the RAM 16.
When writing, no special action occurs. In this case, the address signal of the address bus is output to the RAM 16 and the data signal terminal of the RAM 16 is connected to the data bus. That is, the same operation is performed as when the RAM 16 is directly connected to the CPU bus without going through the RAM access circuit 15.

【0081】次に、CPU10が受信バッファリードポ
ートに対してリードを行った場合について説明する。こ
の場合、データバスに出力されるデータは、いくつかの
条件に従って異なったものになる。すなわち、 受信バッファが空のとき、すなわち、ライトポインタ
17とリードポインタ18のポインタ値が等しいとき
は、下位バイトには“0ffh”が、また上位バイトに
は“00h”が出力される。
Next, a case where the CPU 10 reads the reception buffer read port will be described. In this case, the data output to the data bus will be different according to some conditions. That is, when the reception buffer is empty, that is, when the pointer values of the write pointer 17 and the read pointer 18 are equal, "0ffh" is output to the lower byte and "00h" is output to the upper byte.

【0082】受信バッファに未取込みのデータがある
とき、すなわち、ライトポインタ17とリードポインタ
18のポインタ値が等しくないときは、リードポインタ
18が偶数である場合には、下位バイトにはRAM16
の上位バイトデータが、また上位バイトには“0ff
h”が出力される。
When there is unacquired data in the receive buffer, that is, when the pointer values of the write pointer 17 and the read pointer 18 are not equal, when the read pointer 18 is an even number, the RAM 16 is stored in the lower byte.
Upper byte data of "0ff"
h "is output.

【0083】受信バッファに未取込みのデータがあ
り、リードポインタ18が奇数である場合は、下位バイ
トにはRAM16の下位バイトデータが、また上位バイ
トには“0ffh”が出力される すなわち、CPU10のメモリ空間上の固定的なアドレ
スに配置されている受信バッファリードポートをリード
するだけで、他のアドレス位置を一切アクセスすること
なく、常に、上位バイトに未取込みデータの有無を示す
データ、下位バイトに取込むべき伝送データを読み込む
ことができる。
When there is unacquired data in the receive buffer and the read pointer 18 is an odd number, the lower byte data of the RAM 16 is output to the lower byte and "0ffh" is output to the upper byte. By simply reading the receive buffer read port located at a fixed address in the memory space, and without accessing any other address position, the upper byte always indicates the presence or absence of unacquired data, the lower byte. The transmission data to be captured can be read.

【0084】以上説明してきた通り、本実施例によれ
ば、一回のリード命令を実行するだけで伝送データを取
込むことが可能であり、従来技術に比してより高速な受
信動作を行うプリンタ装置を提供することができる。な
お、上記上位バイト、下位バイトの区分は使用するCP
Uの仕様に応じて適宜変更されるべきであるのは言うま
でもない。
As described above, according to the present embodiment, the transmission data can be fetched by executing the read command only once, and the receiving operation can be performed at a higher speed than the prior art. A printer device can be provided. The upper byte and the lower byte are CPs to be used.
Needless to say, it should be changed appropriately according to the specifications of U.

【0085】[第2実施例]上記第1実施例では、受信
バッファリードポートの上位バイトに“00h”、“0
ffh”のデータを配置して未取込みデータの有無を示
し、CPU10が該有無情報を判定して1バイトずつ伝
送データを取込む構成になっている。
[Second Embodiment] In the first embodiment, "00h" and "0" are set in the upper byte of the receive buffer read port.
"ffh" data is arranged to indicate the presence / absence of uncaptured data, and the CPU 10 determines the presence / absence information to capture the transmission data byte by byte.

【0086】しかし、受信バッファに溜っているデータ
をブロック転送命令やメモリツーメモリのDMA転送な
どで一括して取込みたい場合には、未取込みデータの量
を知ることができると都合がよい。このような一括取込
みは、伝送データが文字コードや圧縮された画像データ
の場合には、後でフォントの展開処理や伸張処理を行う
必要があるためそれほど効率的でないが、単純なビット
マップの画像データの場合には、そのまま又は僅かの処
理で印字ヘッドの転送データとして用いることができる
ので高速動作ができる。
However, when it is desired to collectively fetch the data accumulated in the reception buffer by a block transfer command or memory-to-memory DMA transfer, it is convenient to know the amount of unfetched data. This kind of batch capture is not very efficient when the transmission data is a character code or compressed image data, because it is necessary to perform font expansion processing and decompression processing later, but simple bitmap images In the case of data, since it can be used as it is or as the transfer data of the print head with a little processing, high speed operation can be performed.

【0087】上記第1実施例の構成のままでも、ライト
ポインタ17とリードポインタ18をCPU10からリ
ードできるようにしておけば、上記のような一括取込み
処理は可能ではある。しかしながら、この場合には、新
たなリード動作が増えてしまうことなる。そこで、受信
バッファリードポートの上位バイトに未取込みのデータ
量情報を示せば、一回のリード動作で上記目的を達成す
ることができる。
Even with the configuration of the first embodiment as it is, if the write pointer 17 and the read pointer 18 can be read from the CPU 10, the above batch fetching process is possible. However, in this case, a new read operation will increase. Therefore, if the uncaptured data amount information is shown in the upper byte of the reception buffer read port, the above object can be achieved by one read operation.

【0088】図8は、このことを実現するRAMアクセ
ス回路15の詳細なブロック図である。図2に示した第
1実施例のRAMアクセス回路15と比べた場合、固定
値設定回路31の代わりに未取込み量情報生成回路33
が設けられ、減算回路34が新たに設けられている点が
異なっている。
FIG. 8 is a detailed block diagram of the RAM access circuit 15 which realizes this. When compared with the RAM access circuit 15 of the first embodiment shown in FIG. 2, instead of the fixed value setting circuit 31, the unacquired amount information generation circuit 33.
Is provided and a subtraction circuit 34 is newly provided.

【0089】この未取込み量情報生成回路33では、最
上位ビットにコンパレータ22の出力を配置し、また、
下位の7ビットに、減算回路34から出力されるライト
ポインタ17とリードポインタ18の差分情報のうちの
上位7ビットを合成して配置することにより、1バイト
のデータを生成し、上位バイト入出力回路29に出力す
る。
In the uncaptured amount information generation circuit 33, the output of the comparator 22 is arranged in the most significant bit, and
By combining and arranging the upper 7 bits of the difference information of the write pointer 17 and the read pointer 18 output from the subtraction circuit 34 in the lower 7 bits, 1-byte data is generated, and the upper byte input / output is performed. Output to the circuit 29.

【0090】従って、CPU10が受信バッファリード
ポートをリードした際に、その上位バイトに、受信バッ
ファが空のときは“00h”、未取込みのデータあると
きは“1××××××b”のデータが読み込まれる。こ
こで、“×××××××b”の7ビットの情報は、未取
込みデータ量の概数を表している。受信バッファの容量
が64Kバイトであれば、ライトポインタ17、リード
ポインタ18は、それぞれ16ビットであるから、16
−7=9ビット、つまり未取込みデータの量を2の9乗
=512バイト単位で知ることができる。
Therefore, when the CPU 10 reads the receive buffer read port, the upper byte is "00h" when the receive buffer is empty and "1xxxxxxxxb" when there is unacquired data. Data is read. Here, the 7-bit information "XXXXXXXXb" represents the approximate number of unacquired data amounts. If the receive buffer has a capacity of 64 Kbytes, the write pointer 17 and the read pointer 18 are 16 bits, respectively.
-7 = 9 bits, that is, the amount of unacquired data can be known in units of 2 9 = 512 bytes.

【0091】したがって、512の整数倍のデータ量を
ブロック転送命令なり、メモリツーメモリのDMA転送
で取り込むことができる。もちろん、最上位ビットでの
1/0で未取込みデータの有無を知ることもできるか
ら、第1実施例と同様に1バイトずつ取込むことも可能
である。もし、受信バッファの容量が256バイト以下
である場合には、ライトポインタ17、リードポインタ
18は、それぞれ8ビットであり、その差分情報もまた
8ビットであるから、減算回路34の出力をそのまま
(すなわち、コンパレータ22の出力と合成することな
く)上位バイト入出力回路29に出力するようにしても
よい。
Therefore, the data amount which is an integral multiple of 512 becomes a block transfer instruction and can be fetched by the memory-to-memory DMA transfer. Of course, since it is possible to know the presence or absence of unacquired data by 1/0 of the most significant bit, it is possible to acquire 1 byte at a time as in the first embodiment. If the capacity of the reception buffer is 256 bytes or less, the write pointer 17 and the read pointer 18 each have 8 bits, and the difference information thereof is also 8 bits, so the output of the subtraction circuit 34 is unchanged ( That is, the data may be output to the upper byte input / output circuit 29 without being combined with the output of the comparator 22.

【0092】以上説明してきたように、第2実施例によ
れば、CPU10のメモリ空間上の固定的なアドレスに
配置されている受信バッファリードポートをリードする
だけで、他のアドレス位置を一切アクセスすることな
く、伝送データを取り込むことができるだけでなく、同
時に未取込みデータ量も知ることができ、必要に応じて
ブロック転送命令などの他の手段によって、伝送データ
を一括して取込むことも可能となる。
As described above, according to the second embodiment, by simply reading the reception buffer read port arranged at a fixed address in the memory space of the CPU 10, any other address position can be accessed. Not only can the transmission data be captured, but at the same time, the amount of uncaptured data can be known. If necessary, the transmission data can be captured collectively by other means such as a block transfer command. Becomes

【0093】[第1、第2実施例の応用変形例]なお、
本発明は、上記第1、第2実施例に限定されることな
く、種々応用変形することが可能である。
[Application Modifications of First and Second Embodiments]
The present invention is not limited to the first and second embodiments described above, but can be applied and modified in various ways.

【0094】すなわち、上記第1,第2実施例のデータ
受信装置は、いずれもプリンタ装置に適用したものであ
ったが、これらデータ受信装置を例えば図9に示すよう
な、パーソナルコンピュータ等のホスト装置に適用して
もよい。この場合、I/FもパラレルI/Fに限らずR
S−232CI/FのようなシリアルI/Fであっても
よい。
That is, although the data receiving devices of the first and second embodiments are both applied to the printer device, these data receiving devices are installed in a host such as a personal computer as shown in FIG. It may be applied to the device. In this case, the I / F is not limited to the parallel I / F and R
It may be a serial I / F such as S-232C I / F.

【0095】図9において、60はCPU、61はRO
M/RAM、62は2次記憶装置、ディスプレイ駆動回
路、キーボード/マウスなどのその他の装置、63はR
S−232CI/F準拠のシリアルI/F、64はDM
Aコントローラ、65は受信バッファリードポートを含
むRAMアクセス回路、66は受信バッファ領域が形成
されたRAM、67はライトポインタ、68はリードポ
インタである。
In FIG. 9, 60 is a CPU and 61 is a RO
M / RAM, 62 is a secondary storage device, a display drive circuit, other devices such as a keyboard / mouse, and 63 is an R
S-232C I / F compliant serial I / F, 64 is DM
A controller, 65 is a RAM access circuit including a reception buffer read port, 66 is a RAM in which a reception buffer area is formed, 67 is a write pointer, and 68 is a read pointer.

【0096】69はバッファフル判定回路であり、ライ
トポインタ67とリードポインタ68のポインタ値を比
較して一定値以上になったときに、シリアルI/F63
のRTS信号をネゲートして、周辺装置からのそれ以降
のデータ伝送を抑制し、受信バッファからのデータの取
込みが進行して、両ポインタの差が所定値以下になった
ら、再びRTS信号をアサートするものである。64〜
68は図1で説明した14から18と同様のものであ
る。
Reference numeral 69 denotes a buffer full determination circuit, which compares the pointer values of the write pointer 67 and the read pointer 68, and when the pointer values reach a certain value or more, the serial I / F 63.
RTS signal is de-asserted to suppress the subsequent data transmission from the peripheral device, and when the data acquisition from the receive buffer progresses and the difference between both pointers becomes less than the predetermined value, the RTS signal is asserted again. To do. 64-
68 is the same as 14 to 18 described in FIG.

【0097】また、上記第1,第2実施例では、使用す
るCPUのデータ転送命令のデータ長およびテータバス
のデータ長が16ビットの場合を例示したが、データバ
スが8ビットのものでも、16ビットのデータ転送命令
を有していれば同様のことが実現可能である。
Further, in the above first and second embodiments, the case where the data length of the data transfer instruction of the CPU to be used and the data length of the data bus are 16 bits is illustrated, but even if the data bus is 8 bits, 16 bits are used. The same thing can be realized if it has a bit data transfer instruction.

【0098】また、より長いビット数であるCPUでも
よい。例えばデータ転送命令のデータ長が32ビットの
場合であれば、下位2バイトに伝送データ、上位2バイ
トに未取込みデータ量を配置する構成にすることもでき
る。この場合には、セントロニクスI/FやRS−23
2CI/Fのような1バイト単位でデータ転送を行うI
/Fだけでなく、2バイト単位でデータ伝うを行うI/
Fにも応用することができる。
A CPU having a longer bit number may be used. For example, when the data length of the data transfer instruction is 32 bits, it is possible to arrange the transmission data in the lower 2 bytes and the uncaptured data amount in the upper 2 bytes. In this case, Centronics I / F or RS-23
I that transfers data in 1-byte units such as 2CI / F
Not only / F, but I / that carries data in units of 2 bytes
It can also be applied to F.

【0099】[0099]

【発明の効果】以上詳細に説明したように、本発明によ
れば、受信バッファから伝送データを取込むのに、わず
か1回のリード命令を実行するだけでよく、従来技術に
比してより高速に一連のデータ受信処理を行うことがで
きる。しかも、単にデータ受信処理が高速になるだけで
なく、CPUのパワーをその分だけ他の処理に振り分け
ることができるので、本発明に係るデータ受信装置を内
蔵した装置全体のパフォーマンスをも向上させることが
できるという、非常に優れた効果を奏することが可能と
なる。
As described above in detail, according to the present invention, it is only necessary to execute the read command once to fetch the transmission data from the receiving buffer, which is more effective than the prior art. A series of data reception processing can be performed at high speed. Moreover, not only the data receiving process becomes faster, but also the power of the CPU can be allocated to other processes by that amount, so that the performance of the entire device incorporating the data receiving device according to the present invention can be improved. That is, it is possible to achieve a very excellent effect.

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

【図1】本発明の第1実施例に係るデータ受信装置を内
蔵したプリンタ装置の概略構成を示すブロック図であ
る。
FIG. 1 is a block diagram showing a schematic configuration of a printer device incorporating a data receiving device according to a first embodiment of the present invention.

【図2】図1におけるRAMアクセス回路の詳細なブロ
ック図である。
FIG. 2 is a detailed block diagram of a RAM access circuit in FIG.

【図3】図1におけるRAMの詳細な構成図である。FIG. 3 is a detailed configuration diagram of a RAM in FIG.

【図4】図1における下位バイト入出力回路の条件に応
じた出力データを示す図である。
FIG. 4 is a diagram showing output data according to a condition of a lower byte input / output circuit in FIG.

【図5】図1における上位バイト入出力回路の条件に応
じた出力データを示す図である。
5 is a diagram showing output data according to the conditions of the upper byte input / output circuit in FIG.

【図6】図1における下位バイト入出力回路の詳細な構
成図である。
6 is a detailed configuration diagram of a lower byte input / output circuit in FIG.

【図7】図1における上位バイト入出力回路の詳細な構
成図である。
7 is a detailed configuration diagram of an upper byte input / output circuit in FIG.

【図8】第2実施例におけるRAMアクセス回路の詳細
なブロック図である。
FIG. 8 is a detailed block diagram of a RAM access circuit according to a second embodiment.

【図9】本発明の第1,第2実施例に係るデータ受信装
置を内蔵したホスト装置の概略構成を示すブロック図で
ある。
FIG. 9 is a block diagram showing a schematic configuration of a host device incorporating the data receiving device according to the first and second embodiments of the present invention.

【図10】従来のデータ受信装置の概略構成を示すブロ
ック図である。
FIG. 10 is a block diagram showing a schematic configuration of a conventional data receiving device.

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

10,60…CPU 11,61…ROM/RAM 13,63…パラレルI/F 14,64…DMAコントローラ 15,65…RAMアクセス回路(受信バッファリード
ポートを含む) 16,66…RAM(受信バッファを含む) 17,67…ライトポインタ 18,68…リードポインタ 20…受信バッファリードポートアドレスデコーダ 21…AND素子 22…コンパレータ 23…ベースアドレス設定回路 24…アドレス生成回路 25…RAM領域アドレスデコーダ 27…NOR素子 28…下位バイト入出力回路 29…上位バイト入出力回路 30,31,32…固定値設定回路 33…未取込み量情報生成回路 34…減算回路 41a…受信バッファ
10, 60 ... CPU 11, 61 ... ROM / RAM 13, 63 ... Parallel I / F 14, 64 ... DMA controller 15, 65 ... RAM access circuit (including reception buffer read port) 16, 66 ... RAM (reception buffer 17, 67 ... Write pointer 18, 68 ... Read pointer 20 ... Reception buffer read port address decoder 21 ... AND element 22 ... Comparator 23 ... Base address setting circuit 24 ... Address generation circuit 25 ... RAM area address decoder 27 ... NOR element 28 ... Lower byte input / output circuit 29 ... Upper byte input / output circuit 30, 31, 32 ... Fixed value setting circuit 33 ... Uncaptured amount information generation circuit 34 ... Subtraction circuit 41a ... Reception buffer

フロントページの続き (72)発明者 綿谷 雅文 東京都大田区下丸子3丁目30番2号 キヤ ノン株式会社内 (72)発明者 植村 寛 東京都大田区下丸子3丁目30番2号 キヤ ノン株式会社内 (72)発明者 塚田 伸幸 東京都大田区下丸子3丁目30番2号 キヤ ノン株式会社内Front page continuation (72) Inventor Masafumi Wataya 3-30-2 Shimomaruko, Ota-ku, Tokyo Canon Inc. (72) Inventor Hiroshi Uemura 3-30-2 Shimomaruko, Ota-ku, Tokyo Canon Inc. (72) Inventor Nobuyuki Tsukada 3-30-2 Shimomaruko, Ota-ku, Tokyo Canon Inc.

Claims (30)

【特許請求の範囲】[Claims] 【請求項1】 少なくとも中央演算処理装置と、伝送デ
ータを受信するインターフェースと、受信バッファ領域
が形成されたメモリと、前記メモリの受信バッファ領域
の任意のアドレスを指し示す第1ポインタおよび第2ポ
インタと、前記インターフェースを介して伝送データが
受信された場合に、前記第1ポインタで示される前記受
信バッファ領域のアドレス位置に当該伝送データを格納
して該第1ポインタを所定値だけ増加させる格納制御手
段と、前記中央演算処理装置のバス上の固定的なアドレ
ス位置に配置された所定ビット長のレジスタとを有する
データ受信装置であって、該レジスタは、 前記第1ポインタと第2ポインタの値を比較するポイン
タ比較手段と、 前記中央演算処理装置または他のバスマスタ装置により
当該レジスタに対して読出アクセスがなされた場合、前
記ポインタ比較手段による比較結果に応じて、少なくと
も前記メモリの受信バッファ領域に格納された伝送デー
タの取込状況を示す取込状況データを当該レジスタの所
定位置の複数ビットに出力する取込状況データ出力手段
と、 前記ポインタ比較手段による比較の結果、前記第1ポイ
ンタと第2ポインタの値が等しくない場合に、前記メモ
リに対して前記第2ポインタで示される前記受信バッフ
ァ領域のアドレス位置で読出信号を出力して該第2ポイ
ンタを所定値だけ増加させる読出制御と、 該読出制御により前記メモリの受信バッファ領域から読
出された伝送データを当該レジスタの前記所定位置とは
異なる位置の複数ビットに出力する伝送データ出力手段
と、 を有することを特徴とするデータ受信装置。
1. At least a central processing unit, an interface for receiving transmission data, a memory in which a reception buffer area is formed, and a first pointer and a second pointer pointing to an arbitrary address of the reception buffer area of the memory. Storage control means for storing the transmission data at the address position of the reception buffer area indicated by the first pointer and increasing the first pointer by a predetermined value when the transmission data is received via the interface And a register having a predetermined bit length arranged at a fixed address position on the bus of the central processing unit, wherein the register stores the values of the first pointer and the second pointer. Pointer comparison means for comparing, and the register by the central processing unit or other bus master device When a read access is made, at least the acquisition status data indicating the acquisition status of the transmission data stored in the reception buffer area of the memory is stored in a predetermined position of the register according to the comparison result by the pointer comparison means. When the values of the first pointer and the second pointer are not equal as a result of the comparison by the fetch status data output means for outputting to a plurality of bits and the pointer comparison means, it is indicated to the memory by the second pointer. Read control for outputting a read signal at the address position of the receive buffer area to increase the second pointer by a predetermined value, and transmission data read from the receive buffer area of the memory by the read control to the predetermined value of the register. And a transmission data output means for outputting a plurality of bits at a position different from the position. Apparatus.
【請求項2】 前記中央演算処理装置は、前記レジスタ
のデータ長と同一のデータ長のデータ転送命令により、
当該レジスタに対して読出アクセスを行うことを特徴と
する請求項1記載のデータ受信装置。
2. The central processing unit, by a data transfer instruction having the same data length as the data length of the register,
The data receiving apparatus according to claim 1, wherein the register is read-accessed.
【請求項3】 前記他のバスマスタ装置として、DMA
転送装置を具備したことを特徴とする請求項1記載のデ
ータ受信装置。
3. A DMA as the other bus master device
The data receiving device according to claim 1, further comprising a transfer device.
【請求項4】 前記取込状況データ出力手段は、前記ポ
インタ比較手段による比較の結果、前記第1ポインタと
第2ポインタの値が等しい場合は、前記メモリの受信バ
ッファ領域からの未取込みの伝送データが存在しない旨
のデータを、等しくない場合は、前記メモリの受信バッ
ファ領域からの未取込みの伝送データが存在する旨のデ
ータを、当該レジスタの所定位置の複数ビットに出力す
ることを特徴とする請求項1〜3記載のデータ受信装
置。
4. The acquisition status data output means, if the result of the comparison by the pointer comparison means indicates that the values of the first pointer and the second pointer are equal, the unacquired transmission from the reception buffer area of the memory. If the data indicating that there is no data is not equal, the data indicating that there is unacquired transmission data from the reception buffer area of the memory is output to a plurality of bits at a predetermined position of the register. The data receiving device according to claim 1.
【請求項5】 前記取込状況データ出力手段は、前記取
込状況データとして、前記ポインタ比較手段での比較の
結果、前記第1ポインタと第2ポインタの値が等しくな
い場合に、その値の差を前記メモリの受信バッファ領域
からの未取込みの伝送データの量を示すデータとして当
該レジスタの所定位置の複数ビットに出力することを特
徴とする請求項1〜3記載のデータ受信装置。
5. The acquisition status data output means, if the values of the first pointer and the second pointer are not equal as a result of the comparison in the pointer comparison means as the acquisition status data, the value of the value is output. 4. The data receiving device according to claim 1, wherein the difference is output to a plurality of bits at a predetermined position of the register as data indicating the amount of unacquired transmission data from the reception buffer area of the memory.
【請求項6】 前記伝送データ出力手段は、前記ポイン
タ比較手段での比較の結果、前記第1ポインタと第2ポ
インタの値が等しくない場合は、前記読出制御により前
記メモリの受信バッファ領域から読出された伝送データ
を、等しい場合は、予め定められた特定のデータを、そ
れぞれ当該レジスタの前記所定位置とは異なる位置の複
数ビットに出力することを特徴とする請求項1〜5記載
のデータ受信装置。
6. The transmission data output means reads from the reception buffer area of the memory by the read control when the values of the first pointer and the second pointer are not equal as a result of the comparison by the pointer comparison means. 6. The data reception according to claim 1, wherein when the transmission data is equal, predetermined specific data is output to a plurality of bits at positions different from the predetermined position of the register, respectively. apparatus.
【請求項7】 前記インターフェースは、パラレルイン
ターフェースであることを特徴とする請求項1〜6記載
のデータ受信装置。
7. The data receiving apparatus according to claim 1, wherein the interface is a parallel interface.
【請求項8】 前記インターフェースは、シリアルイン
ターフェースであることを特徴とする請求項1〜6記載
のデータ受信装置。
8. The data receiving apparatus according to claim 1, wherein the interface is a serial interface.
【請求項9】 当該データ受信装置は、プリンタ装置に
内蔵されていることを特徴とする請求項1〜8記載のデ
ータ受信装置。
9. The data receiving device according to claim 1, wherein the data receiving device is incorporated in a printer device.
【請求項10】 当該データ受信装置は、ホスト装置に
内蔵されていることを特徴とする請求項1〜8記載のデ
ータ受信装置。
10. The data receiving device according to claim 1, wherein the data receiving device is built in a host device.
【請求項11】 少なくとも中央演算処理装置と、伝送
データを受信するインターフェースと、受信バッファ領
域が形成されたメモリと、前記メモリの受信バッファ領
域の任意のアドレスを指し示す第1ポインタおよび第2
ポインタと、前記インターフェースを介して伝送データ
が受信された場合に、前記第1ポインタで示される前記
受信バッファ領域のアドレス位置に当該伝送データを格
納して該第1ポインタを所定値だけ増加させる格納制御
手段と、前記中央演算処理装置のバス上の固定的なアド
レス位置に配置された所定ビット長のレジスタとを有
し、 該レジスタは、前記第1ポインタと第2ポインタの値を
比較し、前記中央演算処理装置または他のバスマスタ装
置により当該レジスタに対して読出アクセスがなされた
場合、その比較結果に応じて、少なくとも前記メモリの
受信バッファ領域に格納された伝送データの取込状況を
示す取込状況データを当該レジスタの所定位置の複数ビ
ットに出力し、比較の結果、前記第1ポインタと第2ポ
インタの値が等しくない場合に、前記メモリに対して前
記第2ポインタで示される前記受信バッファ領域のアド
レス位置で読出信号を出力して該第2ポインタを所定値
だけ増加させ、前記メモリの受信バッファ領域から読出
された伝送データを当該レジスタの前記所定位置とは異
なる位置の複数ビットに出力することを特徴とするデー
タ受信方法。
11. A central processing unit, an interface for receiving transmission data, a memory in which a receiving buffer area is formed, a first pointer and a second pointer for pointing an arbitrary address of the receiving buffer area of the memory.
When pointer and transmission data is received through the interface, the transmission data is stored at an address position of the reception buffer area indicated by the first pointer and the first pointer is incremented by a predetermined value. And a register having a predetermined bit length arranged at a fixed address position on the bus of the central processing unit, the register comparing values of the first pointer and the second pointer, When a read access is made to the register by the central processing unit or another bus master device, an acquisition status indicating at least the transmission data stored in the reception buffer area of the memory is displayed according to the comparison result. Outputs the embedding status data to a plurality of bits at a predetermined position of the register, and as a result of comparison, the values of the first pointer and the second pointer are equal. If not, a read signal is output to the memory at the address position of the reception buffer area indicated by the second pointer to increase the second pointer by a predetermined value and read from the reception buffer area of the memory. A data receiving method comprising outputting the transmitted data to a plurality of bits at a position different from the predetermined position of the register.
【請求項12】 前記中央演算処理装置は、前記レジス
タのデータ長と同一のデータ長のデータ転送命令によ
り、当該レジスタに対して読出アクセスを行うことを特
徴とする請求項11記載のデータ受信方法。
12. The data receiving method according to claim 11, wherein the central processing unit performs read access to the register by a data transfer instruction having the same data length as the data length of the register. .
【請求項13】 前記他のバスマスタ装置として、DM
A転送装置を具備したことを特徴とする請求項11記載
のデータ受信方法。
13. The DM as the other bus master device
The data receiving method according to claim 11, further comprising an A transfer device.
【請求項14】 前記取込状況データとしては、前記第
1ポインタと第2ポインタの値が等しい場合は、前記メ
モリの受信バッファ領域からの未取込みの伝送データが
存在しない旨のデータを、等しくない場合は、前記メモ
リの受信バッファ領域からの未取込みの伝送データが存
在する旨のデータを、当該レジスタの所定位置の複数ビ
ットに出力することを特徴とする請求項11〜13記載
のデータ受信方法。
14. As the acquisition status data, when the values of the first pointer and the second pointer are equal, data indicating that there is no unacquired transmission data from the reception buffer area of the memory is equalized. 14. If not, the data indicating that there is unacquired transmission data from the reception buffer area of the memory is output to a plurality of bits at a predetermined position of the register, the data reception according to claim 11. Method.
【請求項15】 前記取込状況データとしては、前記第
1ポインタと第2ポインタの値が等しくない場合に、そ
の値の差を前記メモリの受信バッファ領域からの未取込
みの伝送データの量を示すデータとして当該レジスタの
所定位置の複数ビットに出力することを特徴とする請求
項11〜13記載のデータ受信方法。
15. As the acquisition status data, when the values of the first pointer and the second pointer are not equal, the difference between the values is the amount of unacquired transmission data from the reception buffer area of the memory. 14. The data receiving method according to claim 11, wherein the data is output to a plurality of bits at a predetermined position of the register as the indicating data.
【請求項16】 前記第1ポインタと第2ポインタの値
が等しくない場合は、前記メモリの受信バッファ領域か
ら読出された伝送データを、等しい場合は、予め定めら
れた特定のデータを、それぞれ当該レジスタの前記所定
位置とは異なる位置の複数ビットに出力することを特徴
とする請求項11〜15記載のデータ受信方法。
16. The transmission data read from the reception buffer area of the memory when the values of the first pointer and the second pointer are not equal, and the predetermined specific data when the values are equal, respectively. 16. The data receiving method according to claim 11, wherein the data is output to a plurality of bits at a position different from the predetermined position of the register.
【請求項17】 前記インターフェースは、パラレルイ
ンターフェースであることを特徴とする請求項11〜1
6記載のデータ受信方法。
17. The interface according to claim 11, wherein the interface is a parallel interface.
6. The data receiving method described in 6.
【請求項18】 前記インターフェースは、シリアルイ
ンターフェースであることを特徴とする請求項11〜1
6記載のデータ受信方法。
18. The interface according to claim 11, wherein the interface is a serial interface.
6. The data receiving method described in 6.
【請求項19】 当該データ受信方法は、プリンタ装置
に適用されていることを特徴とする請求項11〜18記
載のデータ受信方法。
19. The data receiving method according to claim 11, wherein the data receiving method is applied to a printer device.
【請求項20】 当該データ受信方法は、ホスト装置に
適用されていることを特徴とする請求項11〜18記載
のデータ受信方法。
20. The data receiving method according to claim 11, wherein the data receiving method is applied to a host device.
【請求項21】 少なくとも中央演算処理装置と、他の
情報処理用の機器から伝送データを受信するインターフ
ェースと、受信バッファ領域が形成されたメモリと、前
記メモリの受信バッファ領域の任意のアドレスを指し示
す第1ポインタおよび第2ポインタと、前記インターフ
ェースを介して伝送データが受信された場合に、前記第
1ポインタで示される前記受信バッファ領域のアドレス
位置に当該伝送データを格納して該第1ポインタを所定
値だけ増加させる格納制御手段と、前記中央演算処理装
置のバス上の固定的なアドレス位置に配置された所定ビ
ット長のレジスタとを有するデータ受信シスステムであ
って、該レジスタは、 前記第1ポインタと第2ポインタの値を比較するポイン
タ比較手段と、 前記中央演算処理装置または他のバスマスタ装置により
当該レジスタに対して読出アクセスがなされた場合、前
記ポインタ比較手段による比較結果に応じて、少なくと
も前記メモリの受信バッファ領域に格納された伝送デー
タの取込状況を示す取込状況データを当該レジスタの所
定位置の複数ビットに出力する取込状況データ出力手段
と、 前記ポインタ比較手段による比較の結果、前記第1ポイ
ンタと第2ポインタの値が等しくない場合に、前記メモ
リに対して前記第2ポインタで示される前記受信バッフ
ァ領域のアドレス位置で読出信号を出力して該第2ポイ
ンタを所定値だけ増加させる読出制御と、 該読出制御により前記メモリの受信バッファ領域から読
出された伝送データを当該レジスタの前記所定位置とは
異なる位置の複数ビットに出力する伝送データ出力手段
と、 を有することを特徴とするデータ受信システム。
21. At least a central processing unit, an interface for receiving transmission data from another information processing device, a memory in which a reception buffer area is formed, and an arbitrary address of the reception buffer area of the memory are indicated. When transmission data is received via the first pointer and the second pointer and the interface, the transmission data is stored in the address position of the reception buffer area indicated by the first pointer, and the first pointer is stored. A data reception system having storage control means for increasing a predetermined value and a register having a predetermined bit length arranged at a fixed address position on a bus of the central processing unit, wherein the register is the first Pointer comparison means for comparing the values of the pointer and the second pointer, and the central processing unit or another buffer. When the master device makes a read access to the register, at least the acquisition status data indicating the acquisition status of the transmission data stored in the reception buffer area of the memory is displayed according to the comparison result by the pointer comparison means. When the values of the first pointer and the second pointer are not equal as a result of the comparison by the capture status data output means for outputting to a plurality of bits at a predetermined position of the register and the pointer comparison means, Read control for outputting a read signal at the address position of the receive buffer area indicated by the second pointer to increase the second pointer by a predetermined value, and transmission data read from the receive buffer area of the memory by the read control. Transmission data output means for outputting a plurality of bits at a position different from the predetermined position of the register, Data receiving system, comprising.
【請求項22】 前記中央演算処理装置は、前記レジス
タのデータ長と同一のデータ長のデータ転送命令によ
り、当該レジスタに対して読出アクセスを行うことを特
徴とする請求項21記載のデータ受信システム。
22. The data receiving system according to claim 21, wherein the central processing unit makes a read access to the register by a data transfer instruction having the same data length as the data length of the register. .
【請求項23】 前記他のバスマスタ装置として、DM
A転送装置を具備したことを特徴とする請求項21記載
のデータ受信システム。
23. The other bus master device is DM
22. The data receiving system according to claim 21, further comprising an A transfer device.
【請求項24】 前記取込状況データ出力手段は、前記
ポインタ比較手段による比較の結果、前記第1ポインタ
と第2ポインタの値が等しい場合は、前記メモリの受信
バッファ領域からの未取込みの伝送データが存在しない
旨のデータを、等しくない場合は、前記メモリの受信バ
ッファ領域からの未取込みの伝送データが存在する旨の
データを、当該レジスタの所定位置の複数ビットに出力
することを特徴とする請求項21〜23記載のデータ受
信システム。
24. If the result of the comparison by the pointer comparison means is that the values of the first pointer and the second pointer are equal, the acquisition status data output means transmits unacquired data from the reception buffer area of the memory. If the data indicating that there is no data is not equal, the data indicating that there is unacquired transmission data from the reception buffer area of the memory is output to a plurality of bits at a predetermined position of the register. 24. The data receiving system according to claim 21.
【請求項25】 前記取込状況データ出力手段は、前記
取込状況データとして、前記ポインタ比較手段での比較
の結果、前記第1ポインタと第2ポインタの値が等しく
ない場合に、その値の差を前記メモリの受信バッファ領
域からの未取込みの伝送データの量を示すデータとして
当該レジスタの所定位置の複数ビットに出力することを
特徴とする請求項21〜23記載のデータ受信システ
ム。
25. When the values of the first pointer and the second pointer are not equal to each other as a result of the comparison in the pointer comparison means as the acquisition status data, the acquisition status data output means outputs the value of the value. 24. The data receiving system according to claim 21, wherein the difference is output to a plurality of bits at a predetermined position of the register as data indicating the amount of unacquired transmission data from the reception buffer area of the memory.
【請求項26】 前記伝送データ出力手段は、前記ポイ
ンタ比較手段での比較の結果、前記第1ポインタと第2
ポインタの値が等しくない場合は、前記読出制御により
前記メモリの受信バッファ領域から読出された伝送デー
タを、等しい場合は、予め定められた特定のデータを、
それぞれ当該レジスタの前記所定位置とは異なる位置の
複数ビットに出力することを特徴とする請求項21〜2
5記載のデータ受信システム。
26. The transmission data output means includes the first pointer and the second pointer as a result of the comparison by the pointer comparison means.
If the pointer values are not equal, the transmission data read from the reception buffer area of the memory by the read control is set, and if they are equal, predetermined specific data is set,
21. Outputting to a plurality of bits at positions different from the predetermined position of the register, respectively.
5. The data receiving system according to item 5.
【請求項27】 前記インターフェースは、パラレルイ
ンターフェースであることを特徴とする請求項21〜2
6記載のデータ受信システム。
27. The interface according to claim 21, wherein the interface is a parallel interface.
6. The data receiving system according to item 6.
【請求項28】 前記インターフェースは、シリアルイ
ンターフェースであることを特徴とする請求項21〜2
6記載のデータ受信システム。
28. The interface according to claim 21, wherein the interface is a serial interface.
6. The data receiving system according to item 6.
【請求項29】 当該データ受信システムは、プリンタ
装置に内蔵されていることを特徴とする請求項21〜2
8記載のデータ受信システム。
29. The data receiving system is incorporated in a printer device.
8. The data receiving system according to item 8.
【請求項30】 当該データ受信システムは、ホスト装
置に内蔵されていることを特徴とする請求項21〜28
記載のデータ受信システム。
30. The data receiving system is incorporated in a host device.
The described data receiving system.
JP05191595A 1995-02-16 1995-02-16 Data receiving apparatus, method, and system Expired - Fee Related JP3216965B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP05191595A JP3216965B2 (en) 1995-02-16 1995-02-16 Data receiving apparatus, method, and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP05191595A JP3216965B2 (en) 1995-02-16 1995-02-16 Data receiving apparatus, method, and system

Publications (2)

Publication Number Publication Date
JPH08221250A true JPH08221250A (en) 1996-08-30
JP3216965B2 JP3216965B2 (en) 2001-10-09

Family

ID=12900177

Family Applications (1)

Application Number Title Priority Date Filing Date
JP05191595A Expired - Fee Related JP3216965B2 (en) 1995-02-16 1995-02-16 Data receiving apparatus, method, and system

Country Status (1)

Country Link
JP (1) JP3216965B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6311237B1 (en) 1998-01-05 2001-10-30 Canon Kabushiki Kaisha System including single host buffer for transmit and receive data and reception buffer in interface device having stand-by area for use by host buffer when abnormal state is detected
JP2009124532A (en) * 2007-11-16 2009-06-04 Nec Electronics Corp Semiconductor integrated circuit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6311237B1 (en) 1998-01-05 2001-10-30 Canon Kabushiki Kaisha System including single host buffer for transmit and receive data and reception buffer in interface device having stand-by area for use by host buffer when abnormal state is detected
JP2009124532A (en) * 2007-11-16 2009-06-04 Nec Electronics Corp Semiconductor integrated circuit

Also Published As

Publication number Publication date
JP3216965B2 (en) 2001-10-09

Similar Documents

Publication Publication Date Title
US6078977A (en) Hierarchical bus structure access system
US6256713B1 (en) Bus optimization with read/write coherence including ordering responsive to collisions
EP0405318A2 (en) Microprocessor having cash bypass signal terminal
US20090259789A1 (en) Multi-processor, direct memory access controller, and serial data transmitting/receiving apparatus
US5778255A (en) Method and system in a data processing system for decompressing multiple compressed bytes in a single machine cycle
US6477599B1 (en) Data processing system and microcomputer
EP0661637A1 (en) Configuration and RAM/ROM control of daughter card residing on adapter card
US6070204A (en) Method and apparatus for using universal serial bus keyboard to control DOS operations
JPH10149332A (en) Dma control circuit and method for receiving size data of dma channel
US5363496A (en) Microprocessor incorporating cache memory with selective purge operation
US20030097512A1 (en) USB-HUB device and its control method
US20020169900A1 (en) Direct memory access controller, and direct memory access control method
JP4855864B2 (en) Direct memory access controller
US5652860A (en) Memory control device
JPH08221250A (en) Device, method, and system for receiving data
JPS63296158A (en) Information processor
JP4322116B2 (en) Method of interface between external memory and processor supporting burst mode
US20040153589A1 (en) Device and method for controlling data transfer
US5862374A (en) Search method and circuit
JP3480961B2 (en) Memory access method
JP2001184191A (en) Data processor
JP2695790B2 (en) Image processing system
JPH0778103A (en) Shared access control device
AU642912C (en) A search method and circuit
AU642912B2 (en) A search method and circuit

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070803

Year of fee payment: 6

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080803

Year of fee payment: 7

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080803

Year of fee payment: 7

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090803

Year of fee payment: 8

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090803

Year of fee payment: 8

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100803

Year of fee payment: 9

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110803

Year of fee payment: 10

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120803

Year of fee payment: 11

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120803

Year of fee payment: 11

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130803

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees