JPS61131033A - Control system of ring buffer - Google Patents

Control system of ring buffer

Info

Publication number
JPS61131033A
JPS61131033A JP59252365A JP25236584A JPS61131033A JP S61131033 A JPS61131033 A JP S61131033A JP 59252365 A JP59252365 A JP 59252365A JP 25236584 A JP25236584 A JP 25236584A JP S61131033 A JPS61131033 A JP S61131033A
Authority
JP
Japan
Prior art keywords
page
ring buffer
data
input
output
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
JP59252365A
Other languages
Japanese (ja)
Other versions
JPH022170B2 (en
Inventor
Yoshio Shiromoto
城本 義夫
Mayumi Kanari
金成 真由美
Miyuki Fukuoka
福岡 みゆき
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP59252365A priority Critical patent/JPS61131033A/en
Publication of JPS61131033A publication Critical patent/JPS61131033A/en
Publication of JPH022170B2 publication Critical patent/JPH022170B2/ja
Granted legal-status Critical Current

Links

Abstract

PURPOSE:To control the overtaking of input data against output data so as to make output data highly reliable, by storing page control information together with page data in a ring buffer and controlling the input-output of the ring buffer by using the page control information. CONSTITUTION:A CPU 1 sends output data in lines to a printing device 2 and the data are written in corresponding areas of a ring device 2 and the data are written in corresponding areas of a ring buffer 22 after they are accepted by a register 21. A page control section 23 controls the output data in pages and page control information 221 which is not print-outputted at every page is written in an area corresponding to the said page of the ring buffer. An input-output data control section 25 controls the input and output of the ring buffer in accordance with the page control information and, therefore, even when overtaking of input data against output data takes place, the overtaking can be detected through the disturbance of the page information.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、出力装置のリングバッファの制御方式に関
し、特に頁単位にデータを出力するリングバッファの制
御方式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a control method for a ring buffer of an output device, and particularly to a control method for a ring buffer that outputs data page by page.

〔従来の技術〕[Conventional technology]

中央処理装置から行単位に送られてくるデータをデータ
バッファに格納して、1頁分のデータがデータバッファ
に溜ると、これを契機として印刷を行う印刷装置が広く
用いられている。この印刷装置は、頁数が連続するデー
タを出力するのに処理速度が遅いと云う観点から、バッ
ファにn頁分の容量をもつリングバッファを用いた印刷
装置が用いられている。
BACKGROUND ART Printing devices are widely used that store data sent line by line from a central processing unit in a data buffer, and when one page's worth of data is accumulated in the data buffer, print is triggered by this. This printing apparatus employs a ring buffer having a capacity for n pages, since the processing speed is slow when outputting data with consecutive pages.

このリングバッファを用いた印刷装置では、リングバッ
ファのデータ管理が重要となる。一方従来の印刷装置は
、リングバッファにデータを入力する時に、出力ポイン
タを用いてリングバッファの空領域のチェックを行い、
この空領域にデータを入力すると云う方法を採用してい
る。しかしながら、何等かの原因で、データ人力が空領
域で無い領域に入力されるような、データ入力の追い越
しが発生すると、でたらめなデータを印刷装置は印刷す
ることとなる。しかも以後この印刷が継続することとな
り、出力された印刷データに誤りを生じ支障をきたすと
いう問題がある。
In a printing device using this ring buffer, data management of the ring buffer is important. On the other hand, when conventional printing devices input data into the ring buffer, they use the output pointer to check the empty area of the ring buffer.
A method is adopted in which data is input into this empty area. However, if for some reason data input is overtaken, such as inputting data into a non-empty area, the printing device will print random data. Moreover, this printing continues from then on, and there is a problem in that errors occur in the output print data, causing problems.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

この発明は、以上のような従来の状況から、特に頁管理
情報をリングバッファに格納に、この頁管理情報に基づ
いて、人力データの追い越しを管理するリングバッファ
の制御法式を提供し、出力データの信頼性の向上を図ろ
うとするものである。
In view of the above-mentioned conventional situation, the present invention provides a ring buffer control method for managing overtaking of human data based on the page management information, particularly for storing page management information in the ring buffer, and output data. The aim is to improve the reliability of the system.

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

この発明は、以上のような問題点を解決するために、行
単位に送られるデータを0頁の容量を有するリングバッ
ファに格納し、このリングバッファから頁単位の出力を
行う出力装置において、出力装置にリングバッファに格
納されたデータの頁を管理する頁管理部と前記リングバ
ッファに頁情報の書込みを行う書込部とを備え、リング
バッファの頁情報によってリングバッファの入出力を制
御するリングバッファの管理方式によってなされる。
In order to solve the above-mentioned problems, this invention stores data sent line by line in a ring buffer having a capacity of 0 pages, and outputs page by page from this ring buffer. The device includes a page management unit that manages pages of data stored in a ring buffer, and a writing unit that writes page information to the ring buffer, and controls input/output of the ring buffer based on page information of the ring buffer. This is done by the buffer management method.

〔作用〕[Effect]

上記リングバッファは、データと共に頁情報が記載され
ており、この頁情報に基づいてリングバッファのデータ
の入出力を制御して、頁管理精度を向上して、追い越し
を管理するものであり、出力データの信頼度を向上する
ものである。
The above-mentioned ring buffer has page information written together with data, and controls the input/output of data to the ring buffer based on this page information to improve page management accuracy and manage overtaking. This improves the reliability of data.

〔実施例〕〔Example〕

以下、図面を参照して本発明の実施例を詳細に説明する
Embodiments of the present invention will be described in detail below with reference to the drawings.

第1図は本発明の一実施例の要部ブロック図、第2図は
本発明の動作を示すフローチャートである。中央処理装
置lは1行単位の文字データを印刷装置2に送出する。
FIG. 1 is a block diagram of a main part of an embodiment of the present invention, and FIG. 2 is a flowchart showing the operation of the present invention. The central processing unit l sends character data line by line to the printing device 2.

印刷装置2は、この文字データをレジスタ21に受けて
、リングバッファ22に文字データを転送する。頁管理
部23はリングバッファに入力される文字データの頁単
位の管理を行い、1頁毎に信号を頁情報書込み部24に
送出する。
The printing device 2 receives this character data in the register 21 and transfers the character data to the ring buffer 22. The page management section 23 manages the character data input to the ring buffer on a page-by-page basis, and sends a signal to the page information writing section 24 for each page.

頁情報書込み部24ば書込み情報をデータの先頭番地に
格納する。書込み情報、例えば頁番号221′は印刷の
際に印刷を行わない情報である。
The page information writing unit 24 stores the write information at the leading address of the data. Written information, for example, page number 221' is information that is not printed during printing.

入出力データ制御部25は、リングバッファ22の頁番
号221に基づいて、入出力の制御を行う。
The input/output data control unit 25 controls input/output based on the page number 221 of the ring buffer 22.

以上の制御の動作を第2図によって説明する。The above control operation will be explained with reference to FIG.

印刷装置2は、中央処理装置1から文字データを受取る
と、初期設定を行う。第2図に示す(1)の状態。以後
第2図の状態は括弧付き数字で示す。此の初期設定はリ
ングバッファの先頭番地に上記した書込み情報の頁番号
#1を格納するのである。
When the printing device 2 receives character data from the central processing unit 1, it performs initial settings. State (1) shown in FIG. Hereinafter, the states in FIG. 2 will be indicated by numbers in parentheses. In this initial setting, page number #1 of the write information described above is stored at the leading address of the ring buffer.

レジスタ21から゛文字データを読取ワてリングバッフ
ァ22に格納をする(3)。入力される文字データが1
頁分格納されるまで続けられ、1頁分の格納が終了した
ことを頁管理部23が確認する(4)。■頁分の格納終
了によって、頁情報書込み部24が作動し、次の頁情報
、即ち112をリングバッファ22に書込む(5)、更
に頁管理部23は、リングバッファ22に文字データが
全面書込みが行われたかを検知すると共に(6)、文字
データの入力が終了かを検知する(7)、全面書込み終
了或いは入力データが終了の際に入出力制御部25は、
リングバッファから頁単位の出力を行い(8)、頁管理
部23によって文字データの入力を頁単位に行うのであ
る。
The character data is read from the register 21 and stored in the rolling buffer 22 (3). The input character data is 1
This continues until the page has been stored, and the page management unit 23 confirms that the storage for one page has been completed (4). ■When the page storage is completed, the page information writing section 24 operates and writes the next page information, that is, 112, into the ring buffer 22 (5).Furthermore, the page management section 23 writes the character data into the ring buffer 22 completely. The input/output control unit 25 detects whether writing has been performed (6) and detects whether input of character data is completed (7). When full writing is completed or input data is completed, the input/output control unit 25
The ring buffer outputs page by page (8), and the page management section 23 inputs character data page by page.

以上の説明は、印刷装置を用いて行ったが、■画面単位
の文字データを表示する表示装置にも何等支障なく通用
できることは云うまでもない。
Although the above explanation has been made using a printing device, it goes without saying that the present invention can also be applied without any problem to a display device that displays character data on a screen-by-screen basis.

〔発明の効果〕〔Effect of the invention〕

さて以上の説明から理解されるように、要するにこの発
明は、頁情報をリングバッファに書込み、この頁情報に
基づいてリングバッファの管理を行い、追い越し発生を
頁情報の乱れによって検知するものとなり、本発明は正
常出力データを得る上で効果の大きいものとなる。
Now, as can be understood from the above explanation, in short, the present invention writes page information to a ring buffer, manages the ring buffer based on this page information, and detects the occurrence of overtaking by the disturbance of page information. The present invention is highly effective in obtaining normal output data.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例の要部ブロック図、第2図は
本発明の動作を示すフローチャートである。 図において、1は中央処理装置、2は印刷装置、22は
リングバッファ、23は頁管理部、24は頁情報書込み
部をそれぞれ示す。
FIG. 1 is a block diagram of a main part of an embodiment of the present invention, and FIG. 2 is a flowchart showing the operation of the present invention. In the figure, 1 is a central processing unit, 2 is a printing device, 22 is a ring buffer, 23 is a page management section, and 24 is a page information writing section.

Claims (1)

【特許請求の範囲】[Claims] 行単位に送られるデータをn頁の容量を有するリングバ
ッファに格納し、該リングバッファから頁単位の出力を
行う出力装置において、該出力装置に前記リングバッフ
ァに格納されたデータの頁を管理する頁管理部と前記リ
ングバッファに頁情報の書込みを行う書込部とを備え、
前記リングバッファの頁情報によってリングバッファの
入出力を制御することを特徴とするリングバッファの制
御方式。
In an output device that stores data sent line by line in a ring buffer having a capacity of n pages and outputs page by page from the ring buffer, the output device manages pages of data stored in the ring buffer. comprising a page management unit and a writing unit that writes page information to the ring buffer,
A ring buffer control method characterized in that input/output of the ring buffer is controlled based on page information of the ring buffer.
JP59252365A 1984-11-28 1984-11-28 Control system of ring buffer Granted JPS61131033A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59252365A JPS61131033A (en) 1984-11-28 1984-11-28 Control system of ring buffer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59252365A JPS61131033A (en) 1984-11-28 1984-11-28 Control system of ring buffer

Publications (2)

Publication Number Publication Date
JPS61131033A true JPS61131033A (en) 1986-06-18
JPH022170B2 JPH022170B2 (en) 1990-01-17

Family

ID=17236278

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59252365A Granted JPS61131033A (en) 1984-11-28 1984-11-28 Control system of ring buffer

Country Status (1)

Country Link
JP (1) JPS61131033A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01193894A (en) * 1988-01-29 1989-08-03 Canon Inc Crt display system
JPH03166621A (en) * 1989-11-25 1991-07-18 Fuji Photo Film Co Ltd Image recorder
JPH04158065A (en) * 1990-10-22 1992-06-01 Nec Corp Print controller

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01193894A (en) * 1988-01-29 1989-08-03 Canon Inc Crt display system
JPH03166621A (en) * 1989-11-25 1991-07-18 Fuji Photo Film Co Ltd Image recorder
JPH04158065A (en) * 1990-10-22 1992-06-01 Nec Corp Print controller

Also Published As

Publication number Publication date
JPH022170B2 (en) 1990-01-17

Similar Documents

Publication Publication Date Title
JPS61131033A (en) Control system of ring buffer
JP2574821B2 (en) Direct memory access controller
JP2699482B2 (en) Data transfer control device
JPS58218091A (en) Data transfer system
JP2734581B2 (en) Control method of input / output control unit
JPH0533913B2 (en)
JP3019323B2 (en) Direct access to image memory
JPS5818652B2 (en) CRT display control device
JPH0370816B2 (en)
JP3259095B2 (en) Data transfer method
JP2826780B2 (en) Data transfer method
JPH0427571B2 (en)
JPH04369756A (en) Data transfer method
JPH0516452A (en) Printer
JPH04333950A (en) Information processing system
JPS61214047A (en) Memory data transfer circuit
JPH0546547A (en) Data processor
JPS60256858A (en) Program loading system
JPS5816326A (en) Data channel controlling system
JPS61237158A (en) Shared memory device
JPS6371766A (en) Buffer transferring system
JPS6134588A (en) Image memory control circuit
JPS63268056A (en) Bus converting device
JPS6383854A (en) Data transfer circuit
JPH0567983B2 (en)

Legal Events

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