JPH0430643A - Buffer control method - Google Patents
Buffer control methodInfo
- Publication number
- JPH0430643A JPH0430643A JP2134693A JP13469390A JPH0430643A JP H0430643 A JPH0430643 A JP H0430643A JP 2134693 A JP2134693 A JP 2134693A JP 13469390 A JP13469390 A JP 13469390A JP H0430643 A JPH0430643 A JP H0430643A
- Authority
- JP
- Japan
- Prior art keywords
- data
- signal line
- transfer
- buffer
- 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.)
- Pending
Links
Landscapes
- Communication Control (AREA)
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
[産業上の利用分野1
本発明は、情報処理装置等で用いられるバッファ制御方
式に関する。DETAILED DESCRIPTION OF THE INVENTION [Industrial Field of Application 1] The present invention relates to a buffer control method used in information processing devices and the like.
[従来の技術]
従来、2点間のデータ転送において、データバスの使用
効率を上げるために、その転送経路途中にデータバッフ
ァを挿入する場合、そのデータバッファ回路は入出力非
同期のFIFO等のラインバッファで構成され2データ
バツフアに入力した順番にデータを出力していた。[Prior Art] Conventionally, in data transfer between two points, when a data buffer is inserted in the middle of the transfer path in order to increase data bus usage efficiency, the data buffer circuit is a line such as a FIFO with asynchronous input and output. It was composed of two buffers, and data was output in the order in which it was input to the two data buffers.
この場合、転送先のデータ受信処理速度が遅いときには
、データバッファにデータがたまってしまい、その転送
先に緊急にデータを転送する事象が発生した場合には、
以下の方法が取られていた。In this case, when the data reception processing speed of the transfer destination is slow, data accumulates in the data buffer, and if an event occurs that requires urgent data transfer to the transfer destination,
The following methods were used.
(1)バッファ内のデータが全て送られるまで待ってか
ら、緊急に転送したいデータを転送する。(1) Wait until all the data in the buffer has been sent, and then transfer the data you want to transfer urgently.
(2)バッファ内のデータを全てクリアしてから、緊急
に転送したいデータを転送する。(2) Clear all data in the buffer and then transfer the data you want to transfer urgently.
[発明が解決しようとする課題1
しかしながら上記従来例では、データの転送の緊急度を
犠牲にするか、既に転送したデータ転送を犠牲にしてい
るため、結果として何れの方法においてもシステムの効
率を著しく低下させてしまうという欠点があった。[Problem to be Solved by the Invention 1] However, in the above conventional example, either the urgency of data transfer is sacrificed or the data transfer that has already been transferred is sacrificed, and as a result, the efficiency of the system is not improved in either method. The disadvantage was that it significantly degraded the performance.
本発明は、各種緊急度を有するデータ転送要求が競合し
た場合でも、効率よくデータ転送を行うことができるバ
ッファ制御方式を提供することを目的とする。SUMMARY OF THE INVENTION An object of the present invention is to provide a buffer control method that can efficiently transfer data even when data transfer requests with various degrees of urgency compete with each other.
[課題を解決する手段]
本発明は、データ転送の経路途中でデータを一時蓄える
複数のデータバッファを有するとともに、データ転送に
複数の優先順位を設定し、1つのデータバッファ内に既
に存在するデータを転送先へ出力しているときに、その
データ転送よりも高い優先順位のデータ転送が発生した
場合には。[Means for Solving the Problems] The present invention has a plurality of data buffers for temporarily storing data during a data transfer route, sets a plurality of priorities for data transfer, and saves data already existing in one data buffer. If a data transfer with a higher priority than that data transfer occurs while outputting to the transfer destination.
上記優先順位の低いデータ転送を中断し、他のデータバ
ッファによって高い優先順位のデータ転送を先に行うこ
とを特徴とする。The present invention is characterized in that the low priority data transfer is interrupted and the high priority data transfer is performed first using another data buffer.
[作用]
本発明では、データ転送に優先順位を設け、その優先順
位に基いて複数のデータバッファによる転送順序を切り
換えるようにしたことから、緊急度の高いデータ転送を
待ち時間なしで、しかもバッファ内のデータを捨てるこ
となく対処することができる。[Function] In the present invention, priority is set for data transfer, and the order of transfer by multiple data buffers is switched based on the priority. Therefore, highly urgent data transfer can be performed without waiting time, and moreover, the buffer This can be done without discarding the data inside.
[実施例]
第1図は、本発明の一実施例によるバッファ制御回路を
示すブロック図である。[Embodiment] FIG. 1 is a block diagram showing a buffer control circuit according to an embodiment of the present invention.
本実施例では、扱うデータ幅を8ビツト、バー7フアを
256バイトとする。In this embodiment, the data width handled is 8 bits, and the buffer width is 256 bytes.
出力ゲー)1は、信号[139が“H”のとき信号線1
02のデータをそのまま信号線101へ出力し、“L”
のときハイインピーダンス状態を出力するスリーステー
トバッファである。Output game) 1 is signal line 1 when signal [139 is “H”
Output the data of 02 as it is to the signal line 101 and set it to “L”
It is a three-state buffer that outputs a high impedance state when
リングバッファ2は、複数のラッチ、バッファで構成さ
れ、データのラッチと出力とを非同期に行うものである
。すなわち、信号線109の立ち下がりエツジで、信号
線10gが示すアドレスのラッチが、信号線103の8
ビツトデータをラッチするとともに、信号線107が示
すアドレスのラッチにラッチした8ビツトデータを、信
号線106が“H”のときに、信号線102へ出力する
。The ring buffer 2 is composed of a plurality of latches and buffers, and latches and outputs data asynchronously. That is, at the falling edge of the signal line 109, the address indicated by the signal line 10g is latched at the 8th edge of the signal line 103.
The bit data is latched, and the 8-bit data latched in the latch at the address indicated by the signal line 107 is output to the signal line 102 when the signal line 106 is at "H".
入力ゲート3は、信号線104のデータをドライブする
。Input gate 3 drives data on signal line 104.
残量カウンタ4は、リングバッファz内のデータ残量を
示すカウンタであり、信号線111のパルスによりディ
クリメント動作を行なうとともに、信号線112のパル
ス信号によりインクリメント動作を行ない、その内容を
信号線105へ出力する。The remaining amount counter 4 is a counter that indicates the remaining amount of data in the ring buffer z, and performs a decrement operation using a pulse on a signal line 111 and an increment operation using a pulse signal on a signal line 112, and transmits the contents to the signal line. Output to 105.
出力アドレスカウンタ5は、リングバッフγ2の出力ア
ドレスを示すカウンタであり、信号線110のパルスに
よりインクリメント動作を行ない、その内容を信号線1
07へ出力する。The output address counter 5 is a counter that indicates the output address of the ring buffer γ2, and performs an increment operation based on the pulse of the signal line 110, and transmits the contents to the signal line 1.
Output to 07.
入力アドレスカウンタ6は、リングバッファ2の入力ア
ドレスを示すカウンタであり、信号線113のパルスに
よりインクリメント動作を行ない、その内容を信号線1
08へ出力する。The input address counter 6 is a counter that indicates the input address of the ring buffer 2, and performs an increment operation based on pulses on the signal line 113, and transfers the contents to the signal line 1.
Output to 08.
演算器7は、@号線105のデータが0より大きいか、
または信号線115のデータが0より大きいかを判別し
、その結果を信号線114へ出力する。The arithmetic unit 7 determines whether the data on the @ line 105 is greater than 0 or
Alternatively, it is determined whether the data on the signal line 115 is greater than 0, and the result is output to the signal line 114.
セレクタ8は、@号線129の状態を信号線120へ伝
える。The selector 8 transmits the state of the @ line 129 to the signal line 120.
リングバッファ9は、リングバッファ2と同様に、複数
のラッチ、バッファで構成され、データのラッチと出力
とを非同期に行う、すなわち信号線119の立ち下がり
エツジで信号線118が示すアドレスのラッチが信号l
lAlO3の8ビットデ−夕をラッチするとともに、信
号線116が“H”のときに、信号線117が示すアド
レスのラッチにラッチしている8ビツトデータを信号線
102へ出力する。Like the ring buffer 2, the ring buffer 9 is composed of a plurality of latches and buffers, and latches and outputs data asynchronously. That is, at the falling edge of the signal line 119, the address indicated by the signal line 118 is latched. signal l
The 8-bit data of lAlO3 is latched, and when the signal line 116 is at "H", the 8-bit data latched in the latch at the address indicated by the signal line 117 is output to the signal line 102.
残量カウンタ10は、残量カウンタ4と同様。The remaining amount counter 10 is similar to the remaining amount counter 4.
リングバッファ9内のデータ残量を示すカウンタで、信
号線121のパルスによりディクリメント動作を行なう
ともに、信号線123のパルス信号によりインクリメン
ト動作を行ない、その内容を信号線115へ出力する。A counter indicating the remaining amount of data in the ring buffer 9 performs a decrement operation using a pulse on a signal line 121 and an increment operation using a pulse signal on a signal line 123, and outputs the contents to a signal line 115.
出力アドレスカウンタ11は、出力アドレスカウンタ5
と同様に、リングバッファ9の出力アドレスを示す出力
カラインタであり2信号線122のパルスによりインク
リメント動作を行ない、その内容を信号線117へ出力
する。The output address counter 11 is the output address counter 5.
Similarly, it is an output carter indicating the output address of the ring buffer 9, performs an increment operation by the pulse of the 2nd signal line 122, and outputs the contents to the signal line 117.
入力アドレスカウンタ12は 入力アドレスカウンタ6
と同様、リングバッファ9の入力アドレスを示すカウン
タで、信号線124のパルスによりインクリメント動作
を行ない、その内容を信号線118へ出力する。Input address counter 12 is input address counter 6
Similarly, a counter indicating the input address of the ring buffer 9 performs an increment operation based on the pulse on the signal line 124, and outputs the contents to the signal line 118.
出力側制御回路13は、転送先からの信号線128の要
求(転送要求信号:LREQ)に伴ない、信号線125
の転送許可信号(LACIC)を作成し、それと同時に
信号線130および信号線106または信号線118の
どちらかの信号を用いてデータを出力する。その後、各
カウンタのインクリメント、ディクリメント動作を行い
、出力側の制御を行う。The output side control circuit 13 outputs the signal line 125 in response to a request (transfer request signal: LREQ) on the signal line 128 from the transfer destination.
A transfer permission signal (LACIC) is generated, and at the same time, data is output using the signal line 130 and either the signal line 106 or the signal line 118. Thereafter, each counter is incremented and decremented to control the output side.
信号線101は、転送先デバイスに接続される8ビツト
のデータバスの信号線である。A signal line 101 is a signal line of an 8-bit data bus connected to a transfer destination device.
信号線125,126は、転送先とのDMAデータ転送
のタイミング信号線である。Signal lines 125 and 126 are timing signal lines for DMA data transfer with the transfer destination.
信号線127.128は、転送元とのDMAデータ転送
のタイミング信号線である。Signal lines 127 and 128 are timing signal lines for DMA data transfer with the transfer source.
信号線129は、転送中のデータの優先順位を示す信号
線である。A signal line 129 is a signal line indicating the priority of data being transferred.
第2図は、リングバラ2ア2の内部を示すブロック図で
ある。なお、リングバッファ2.9は、共通の構成を有
しており、一方のリングバッファ2のみ説明する。FIG. 2 is a block diagram showing the inside of the ring rose 2a2. Note that the ring buffers 2.9 have a common configuration, and only one ring buffer 2 will be described.
ラッチ回路21は、セレクト端子、イネーブル端子を備
えた8ビツトデータラツチを集めたもので、ここでは2
56偕のラッチを用いている。このラッチ回路21では
、信号線151を“L″として、1つのラッチを選択し
、信号線109のタイミングでデータをラッチする。The latch circuit 21 is a collection of 8-bit data latches equipped with a select terminal and an enable terminal.
A 56-inch latch is used. In this latch circuit 21, the signal line 151 is set to "L", one latch is selected, and data is latched at the timing of the signal line 109.
バッファ回路22は、8ビツトスリーステートバツフア
が256個集まったもので、信号線152により1つの
ラッチデータを出力状態にする。The buffer circuit 22 is a collection of 256 8-bit three-state buffers, and outputs one latch data via a signal line 152.
入力アドレスデコーダ23は、8ビツトの信号線108
により256木の信号線151から1本を“L″にする
デコーダである。The input address decoder 23 has an 8-bit signal line 108.
This is a decoder which sets one of the 256 signal lines 151 to "L".
出力アドレスデコーダ24は、8ビツトの信号線107
により256本の信号線152から1本を“L”にする
デコーダである。The output address decoder 24 has an 8-bit signal line 107.
This is a decoder which sets one of the 256 signal lines 152 to "L".
第3図は、本実施例のシステム構成を示すブロック図で
ある。なお、このブロック図では、簡略のため各種信号
線のうちデータ線とDMA制御のみ示している。FIG. 3 is a block diagram showing the system configuration of this embodiment. Note that this block diagram only shows data lines and DMA control among various signal lines for the sake of simplicity.
レーザービームプリンタ31は、送られてきたビットイ
メージを紙に出力する装置である。The laser beam printer 31 is a device that outputs the sent bit image onto paper.
プリンタ#J 11 H路32は、プリンタ31へ水平
、垂直同期信号を出力するとともに、これに同期してメ
モリ33から読み出したデータをビットイメージとして
出力する。The printer #J 11 H path 32 outputs horizontal and vertical synchronizing signals to the printer 31, and in synchronization with this, outputs data read from the memory 33 as a bit image.
メモリ33は、ビデオメモリおよびイメージメモリより
構成され、ここではデュアルポートメモリを用いデータ
の入出力を非同期で行うものとなっている。The memory 33 is composed of a video memory and an image memory, and here a dual port memory is used to input and output data asynchronously.
デイスプレィ35は、ビットマツプデイスプレィで送ら
れてきたビデオイメージデータをそのまま表示するもの
である。The display 35 displays the video image data sent as is on a bitmap display.
デイスプレィ制御回路36は、デイスプレィ35に水平
、垂直同期信号と、それに同期したデイスプレィイメー
ジデータとを出力する。The display control circuit 36 outputs horizontal and vertical synchronizing signals and display image data synchronized therewith to the display 35.
キーボード37は1本システムのユーザからの入力装置
である。The keyboard 37 is an input device from the user of the system.
バッファ制御回路38は、第1図に示す回路であり、C
PU39は、メモリ41に格納されてぃるプログラムに
従って本システムの全体の制御を行う。The buffer control circuit 38 is the circuit shown in FIG.
The PU 39 controls the entire system according to a program stored in the memory 41.
ハードディスク40は1本システムを動かすプログラム
および本システムで必要な入力データ、さらに本システ
ムで作成したデータ等、様々なデータが格納されている
。The hard disk 40 stores various data such as programs for operating the system, input data necessary for the system, and data created by the system.
メモリ41は、本システムを制御するプログラムを格納
したROMと、プログラムやデータの格納およびワーク
エリアとして用いるRAMとで構成されている。The memory 41 is composed of a ROM that stores programs for controlling this system, and a RAM that is used to store programs and data and as a work area.
DMAコントローラ42は、DMAデータ転送を行う場
合、CPU39からバス制御権を獲得しDMAII御信
号の制御を行うコントローラである。The DMA controller 42 is a controller that acquires bus control authority from the CPU 39 and controls the DMA II control signal when performing DMA data transfer.
第4図は、バッファ制御回路38の入力側の動作を示す
フローチャートであり、第5図は出力側の動作を示すフ
ローチャートである。第4図および第5図の各制御動作
は同時に並行処理されるものである。また、各信号は正
論理で説明する。FIG. 4 is a flowchart showing the operation on the input side of the buffer control circuit 38, and FIG. 5 is a flowchart showing the operation on the output side. The control operations shown in FIGS. 4 and 5 are simultaneously processed in parallel. Furthermore, each signal will be explained using positive logic.
次に、 !1I4FI!iと第1vlを用いてバッファ
の入力制御の動作を説明する。next, ! 1I4FI! The operation of buffer input control will be explained using i and the first vl.
ここで第1図に示す信号線101のバス側をローカル側
、信号線104側をグローバル側として説明する。Here, the bus side of the signal line 101 shown in FIG. 1 will be described as a local side, and the signal line 104 side as a global side.
まず、各カウンタ6.12をリセット、リングバッファ
2.9のクリア等の初期設定を行う(51)。First, initial settings such as resetting each counter 6.12 and clearing the ring buffer 2.9 are performed (51).
次いで、残量カウンタ4.!0の値をチエツクし、バッ
ファに空き領域があるかどうかのチエツク、およびタイ
ミングのチエツクを行う(52)。Next, the remaining amount counter 4. ! A value of 0 is checked, and a check is made to see if there is free space in the buffer and to check the timing (52).
入力準備がOKの場合、S3へ進みグローバル側の転送
要求信号(GREQ:信号線128)をH”にする。If the input preparation is OK, the process advances to S3 and the global side transfer request signal (GREQ: signal line 128) is set to H''.
そして、グローバル側から転送許可信号(GACK:@
号線127)が“H”になるのを待って(34)、優先
順位を確認する(35)。Then, a transfer permission signal (GACK: @
Wait for line 127) to become "H" (34), and check the priority order (35).
ここで優先順位が0の場合、リングバッファ9ヘデータ
を入力する(37)、これはまずGACK信号の立ち下
がりで入力アドレスカウンタ12が示すアドレスのラッ
チでデータをラッチする。If the priority is 0, data is input to the ring buffer 9 (37). First, the data is latched at the address indicated by the input address counter 12 at the falling edge of the GACK signal.
次に入力アドレスバッファ12の値を1つのインクリメ
ントし、残量カウンタlOの値を1つインクリメントす
る。Next, the value of the input address buffer 12 is incremented by one, and the value of the remaining capacity counter lO is incremented by one.
また、S5で優先順位が1の場合、S6へ進み、リング
バッファ2でデータをラッチする。これはまずGACK
M号の立ち下がりで入力アドレスカウンタ6が示すアド
レスのラッチでデータをラッチする0次に入力アドレス
バッファ6の値を1つインクリメントし、残量カウンタ
4の値を1つインクリメントする。Further, if the priority is 1 in S5, the process advances to S6, and the data is latched in the ring buffer 2. This is first GACK
At the falling edge of the M signal, the data is latched at the address indicated by the input address counter 6.0 The value of the input address buffer 6 is incremented by one, and the value of the remaining amount counter 4 is incremented by one.
このようにしてバッファにデータをラッチ終了後1次の
データをう〜チする準備が出来ているかどうかをS2と
同様に確認しく5B)、準備ができている場合には、S
4に進み転送許可信号GACKが“H″になるのを待つ
。After latching the data into the buffer in this way, check whether you are ready to read the primary data in the same manner as in S2 (5B), and if it is ready,
The process advances to step 4 and waits for the transfer permission signal GACK to become "H".
また、S8で入力準備が出来ていない場合、転送要求信
号(G RE Q)を“L”とし、上記S2へ進み入力
準備が出来るまで待つ。If the input is not ready in S8, the transfer request signal (GREQ) is set to "L" and the process proceeds to S2, where it waits until the input is ready.
このような動作を繰り返すことによりバッファのデータ
入力の制御を行う。Data input to the buffer is controlled by repeating such operations.
次に、第5図と第1図を用いてバッファの出力制御の動
作を説明する。Next, the operation of buffer output control will be explained using FIG. 5 and FIG. 1.
まず、各カウンタ4.5,10.11をリセット等を行
い(521)、ローカル側の転送要求信号(LREQ:
@号線126)が”H”になるのを待つ(S22)。First, each counter 4.5, 10.11 is reset (521), and the local side transfer request signal (LREQ:
It waits for @line 126) to become "H" (S22).
そして、転送要求が来た場合、転送の優先順位の高いデ
ータが入っているバッファ9の残量カウンタ10の値が
1以上かどうかを調べる(323)、そして、この値が
1以上の場合、バッファ9からデータを出力する(33
0)。When a transfer request comes, it is checked whether the value of the remaining capacity counter 10 of the buffer 9 containing data with a high transfer priority is 1 or more (323), and if this value is 1 or more, Output data from buffer 9 (33
0).
また、S23で残量カウンタlOの値が0である場合、
残量カウンタ4の値が1以上かどうかを調べる(S24
)、そして、この値が1以上の場合、バッファ2からデ
ータを出力する(525)。Furthermore, if the value of the remaining amount counter lO is 0 in S23,
Check whether the value of remaining amount counter 4 is 1 or more (S24
), and if this value is 1 or more, data is output from buffer 2 (525).
なお、残量カウンタ4の値が0の場合、送るべきデータ
がないので522へ戻る。Note that if the value of the remaining amount counter 4 is 0, there is no data to be sent, so the process returns to 522.
また、上記325では、出力アドレスカウンタ5のアド
レスの示すリングバッファ2のラッチデータを信号線1
06の制御により信号線102のデータ線上に出力する
。そして、ローカル側への転送許可信号(LACK:@
号線125)を“H”にしく526)、信号線130に
より出力ゲートlをオープン状態にして、信号線101
のローカルデータバス上にデータを出力する(327)
、そして、タイミング待ち(328)を行い、転送許可
信号を“L”とし、信号線130により出力ゲー)1を
閉じ、信号線106によりリングバッファ2のデータ出
力をハイインピーダンス状態にする。Further, in the above 325, the latch data of the ring buffer 2 indicated by the address of the output address counter 5 is transferred to the signal line 1.
The signal is output onto the data line of the signal line 102 under the control of the signal line 06. Then, a transfer permission signal (LACK: @
Line 125) is set to "H" 526), output gate l is opened via signal line 130, and signal line 101
Output data onto the local data bus (327)
Then, it waits for timing (328), sets the transfer permission signal to "L", closes the output gate (1) via the signal line 130, and sets the data output of the ring buffer 2 to a high impedance state via the signal line 106.
次に、出力アドレスカウンタ5の値を1つインクリメン
トし、残量カウンタ4の値を1つディクリメントする(
S29)。Next, the value of the output address counter 5 is incremented by 1, and the value of the remaining capacity counter 4 is decremented by 1 (
S29).
また、上記523で残量カウンタlOが1以上で530
へ進んだ場合には、出力アドレスカウンタ11のアドレ
スが示すリングバッファ9のラッチデータを信号線11
8の制御により信号線102のデータ線上に出力する。Also, if the remaining amount counter lO is 1 or more in 523 above, 530
, the latch data of the ring buffer 9 indicated by the address of the output address counter 11 is transferred to the signal line 11.
8, the signal is output onto the data line of the signal line 102.
そして、ローカル側への転送許可信号(LACK=信号
線125)を“H″にしく331)、信号線130によ
り出力ゲートをオ−プン状態にして、信号線101のロ
ーカルデータバス上にデータを出力する(S32)。Then, set the transfer permission signal to the local side (LACK=signal line 125) to “H” (331), open the output gate via the signal line 130, and transfer the data onto the local data bus on the signal line 101. Output (S32).
そして、タイミング待ち(S 33)を行ない、転送許
可信号を“L”とし、信号線130により出力ゲートl
を閉じ、信号線116によりリングバッファ9のデータ
出力をハイインピーダンス状態にする。Then, it waits for timing (S33), sets the transfer permission signal to "L", and outputs the output gate l via the signal line 130.
is closed, and the data output of the ring buffer 9 is brought into a high impedance state via the signal line 116.
次に、出力アドレスイカウンタ11の値を1つインクリ
メントし、残量カウンタ10の値を1つディクリメント
する。Next, the value of the output address counter 11 is incremented by one, and the value of the remaining amount counter 10 is decremented by one.
このような動作を繰り返すことにより、バッファのデー
タ出力の制御を行う。By repeating such operations, the data output of the buffer is controlled.
第6図は、上記各信号のパターンを示すタイミングチャ
ートである。FIG. 6 is a timing chart showing the patterns of each of the above signals.
この図を用いて上記動作内容を詳細に説明する。The above operation will be explained in detail using this figure.
まず、データ入力では、グローバル側に転送要求信号G
REQを出力し、転送許可信号GACKが出力されるの
を待つ、GACK@4が“H”になったら信号線129
の優先順位を判断し、バッファを選択してデータをラッ
チする。First, in data input, a transfer request signal G is sent to the global side.
Output REQ and wait for transfer permission signal GACK to be output. When GACK@4 becomes “H”, signal line 129
determines the priority of the buffer and selects a buffer to latch the data.
この場合、優先順位が1なので信号線109によりリン
グバッファ2でデータをラッチし、信号線112,11
3で、残量カウンタ4および入力カウンタ6の値をイン
クリメントする。In this case, since the priority is 1, data is latched in ring buffer 2 by signal line 109, and data is latched by signal line 112, 11.
3, the values of the remaining amount counter 4 and the input counter 6 are incremented.
また、優先順位が0のとき、信号線119によりリング
バッファ9でデータをラッチし、信号線123.124
で、残量カウンタlOおよび入力カウンタ12の値をイ
ンクリメントする。Also, when the priority is 0, data is latched in the ring buffer 9 by the signal line 119, and the data is latched by the signal line 123.124.
Then, the values of the remaining amount counter lO and the input counter 12 are incremented.
また、データ出力では、ローカル側から転送要求信号L
REQがきたら、残量カウンタ1O14の価を調べ、デ
ータを出力する。この場合、最初はバッファ9にデータ
はないので、バッファ2からデータを信号線106より
出力し、出力アドレスカウンタ5をインクリメントし、
残量カウンタ4をディクリメントする。In addition, for data output, a transfer request signal L is sent from the local side.
When REQ is received, the value of the remaining amount counter 1O14 is checked and the data is output. In this case, since there is no data in the buffer 9 at first, the data is output from the buffer 2 through the signal line 106, and the output address counter 5 is incremented.
Decrement remaining amount counter 4.
次のタイミングで、再度残量カウンタ4.10の値を調
べ、バッファ9にデータがあるので信号線116により
バッファ9のデータを出力する。At the next timing, the value of the remaining amount counter 4.10 is checked again, and since there is data in the buffer 9, the data in the buffer 9 is outputted via the signal line 116.
そして、出力アドレスカウンタ11をインクリメントし
、残量カウンタlOをディクリメントする。このように
して次々にデータを出力すZ、。Then, the output address counter 11 is incremented, and the remaining amount counter IO is decremented. In this way, Z outputs data one after another.
また、リングバッファ2の内部では、第2図において、
入力アドレスカウンタ6の示しているアドレスからデコ
ーダ23で1つのラッチを選択し、信号線109の立ち
下がり信号でデータをラッチする。また、出力アドレス
カウンタ5で示しているアドレスからデコーダ24で1
つのラッチを選択し、スリーステートバッファ22を制
御することにより、信号線106が“H”状態のときデ
ータをデータバス102上に出力する。Moreover, inside the ring buffer 2, in FIG.
One latch is selected by the decoder 23 from the address indicated by the input address counter 6, and data is latched at the falling signal of the signal line 109. Also, the decoder 24 outputs 1 from the address indicated by the output address counter 5.
By selecting two latches and controlling the three-state buffer 22, data is output onto the data bus 102 when the signal line 106 is in the "H" state.
なお、リングバッファ9の内部動作も同様に行われる。Note that the internal operation of the ring buffer 9 is performed in the same manner.
第7図は、第3図に示すシステム構成の動作を示すフロ
ーチャートである。FIG. 7 is a flowchart showing the operation of the system configuration shown in FIG.
本実施例は、デイスプレィ35の表示とプリンタ31の
印刷とをCRTC34を用いて行う例である。This embodiment is an example in which the display on the display 35 and the printing on the printer 31 are performed using the CRTC 34.
まず、CRT31の表示の書き変えが必要かどうかを判
断しく351)、CRT31の書き変えが必要な場合、
(:PU39は表示書き変え用のCHTC34のコマン
ドを作成する(S52)。First, determine whether it is necessary to rewrite the display on the CRT 31 (351), and if it is necessary to rewrite the CRT 31,
(: The PU 39 creates a command for the CHTC 34 for rewriting the display (S52).
そして、このコマンドをメモリ41に書き込み(S53
)、表示用書き換え用コマンドが全て作成され、メモリ
に書かれたことを確認する(S54)。Then, write this command to the memory 41 (S53
), it is confirmed that all display rewriting commands have been created and written to the memory (S54).
次に、データ転送の優先順位を高い方の0としく555
)、DMAコントローラ42の各レジスタに転送データ
レングス、転送元スタートアドレスおよび転送先デバイ
スを、それぞれセットした後(S56) 、DMAコン
トローラ42をDMA転送をイネーブルにする(S57
)。Next, set the data transfer priority to 0, which is the higher priority, and set it to 555.
), after setting the transfer data length, transfer source start address, and transfer destination device in each register of the DMA controller 42 (S56), the DMA controller 42 is enabled for DMA transfer (S57).
).
そして、実際にバッファ制御回路38とメモリ41の間
でデータ転送を行う(35g)。Then, data is actually transferred between the buffer control circuit 38 and the memory 41 (35g).
また、S51でCRT書き換えでないと判断した場合に
は1次に、文書の作成、編集等の作業が発生したかどう
かを判断する(S59)、そして、文書の作成、編集等
の作業が発生した場合、560でそれぞれの処理を行い
S51へ戻る。If it is determined in S51 that the CRT is not rewritten, the first step is to determine whether work such as document creation or editing has occurred (S59), and whether work such as document creation or editing has occurred. If so, each process is performed in 560 and the process returns to S51.
また、文書の印刷処理が発生した場合(S61)、デー
タ転送の優先順位を低い方の1としく562)、DMA
コントローラ42の各レジスタに転送データレングス、
転送元スタートアドレスおよび転送先デバイスを、それ
ぞれセットする(S63)、そして、DMAコントロー
ラ42のDMA転送をイネーブルにしく364)、実際
にメモリ41に作成されている文書データの展開コマン
ドをバッファ制御回路38へデータ転送する(S65)
。In addition, when document printing processing occurs (S61), the data transfer priority is set to 1 (562), and the DMA
Transfer data length to each register of the controller 42,
The transfer source start address and the transfer destination device are respectively set (S63), and the DMA transfer of the DMA controller 42 is enabled (364), and the expansion command for the document data actually created in the memory 41 is sent to the buffer control circuit. Transfer data to 38 (S65)
.
このような処理を繰り返すことにより、バッファに印刷
のコマンドデータがプールされて、印刷文書をメモリ3
2に展開中においても、優先順位によりCRT31の制
御を行うことができる。By repeating this process, the print command data is pooled in the buffer, and the print document is stored in the memory 3.
2, the CRT 31 can be controlled according to the priority order.
また、第8図は、本発明の他の実施例によるバッファ制
御回路を示すブロック図である。Further, FIG. 8 is a block diagram showing a buffer control circuit according to another embodiment of the present invention.
図中、ラッチ回路15において、信号線131は、グロ
ーバル側からの転送終了を示す信号線であり、また信号
線133は、データのラッチタイミング信号線であり、
さらに信号線132は、ラッチされている値を入力側制
御回路に出力する信号線である。In the figure, in the latch circuit 15, a signal line 131 is a signal line indicating the end of transfer from the global side, and a signal line 133 is a data latch timing signal line,
Furthermore, the signal line 132 is a signal line that outputs the latched value to the input side control circuit.
本実施例では、データ転送の最初のデータに優先順位が
書かれており、このデータをラッチ回路15でラッチし
、転送サイクルの間すなわち転送終了信号が来るまでの
間、優先順位として保持する。In this embodiment, a priority is written in the first data of the data transfer, and this data is latched by the latch circuit 15 and held as the priority during the transfer cycle, that is, until the transfer end signal arrives.
189図は、本実施例における各信号のパターンを示す
タイミングチャートである。FIG. 189 is a timing chart showing patterns of each signal in this embodiment.
まず、最初の入力データ(信号線104)を信号線13
3を用いてラッチ回路15で優先順位として保持し、信
号線131の転送終了信号が来るまで同じ優先順位でデ
ータを入力する。なお、ここでは優先順位を1としてい
る。このように転送サイクル中の優先順位を最初のデー
タで示し、その内容を信号線132で示す。First, the first input data (signal line 104) is transferred to the signal line 13.
3 is used to hold it as a priority in the latch circuit 15, and data is input with the same priority until a transfer end signal is received on the signal line 131. Note that the priority is set to 1 here. In this way, the priority during the transfer cycle is indicated by the first data, and the content thereof is indicated by the signal line 132.
以下、前記実施例と同様に動作することで、優先順位の
高いデータ転送を先に出力するデータバッファ制御が行
われる。Thereafter, by operating in the same manner as in the embodiment described above, data buffer control is performed to output data transfer with a higher priority first.
[発明の効果]
以上説明したように、本発明によれば、データ転送に優
先順位を設け、その優先順位に基いて複数のデータバッ
ファによる転送順序を切り換えるようにしたことから、
バー/7ア内に既にデータが溜っている場合においても
緊急度の高いデータ転送を待ち時間なしで、しかもバッ
ファ内のデータを捨てることなく対処することができ、
システムの効率を向上させることができる。[Effects of the Invention] As explained above, according to the present invention, priority is set for data transfer, and the order of transfer by a plurality of data buffers is switched based on the priority.
Even if data is already accumulated in the buffer, it is possible to transfer highly urgent data without waiting time and without discarding the data in the buffer.
System efficiency can be improved.
第1図は、本発明の一実施例によるバッファ制御回路を
示すブロック図である。
第2図は、同実施例におけるリングバッファの内部を示
すブロック図である。
第3図は、同実施例におけるシステム構成を示すブロッ
ク図である。
第4図は、同実施例におけるバッファ制御回路の入力側
の動作を示すフローチャートである。
第5rgJは、同実施例におけるバッファ制御回路の出
力側の動作を示すフローチャートである。
第6図は、同実施例における各信号のパターンを示すタ
イミングチャートである。
第7図は、第3図に示すシステム構成の動作を示すフロ
ーチャートである。
第8図は、本発明の他の実施例によるバッファ制御回路
を示すブロック図である。
第9図は、本実施例における各信号のパターンを示すタ
イミングチャートである。
1・・・出力ゲート、
2.9・・・リングバッファ。
3・・・入力ゲート、
4.10・・・残量カウンタ、
5.11・・・出力アドレスカウンタ、6.12・・・
入力アドレスカウンタ。
7・・・演箕器、
8・・・セレクタ、
13・・・出力側制御回路、
14・・・入力側制御回路、
15.21・・・ラッチ回路、
22・・・バッファ回路。
23・・・入力アドレスデコーダ、
24・・・出力アドレスデコーダ′。FIG. 1 is a block diagram showing a buffer control circuit according to an embodiment of the present invention. FIG. 2 is a block diagram showing the inside of the ring buffer in the same embodiment. FIG. 3 is a block diagram showing the system configuration in the same embodiment. FIG. 4 is a flowchart showing the operation on the input side of the buffer control circuit in the same embodiment. 5th rgJ is a flowchart showing the operation on the output side of the buffer control circuit in the same embodiment. FIG. 6 is a timing chart showing patterns of each signal in the same embodiment. FIG. 7 is a flowchart showing the operation of the system configuration shown in FIG. FIG. 8 is a block diagram showing a buffer control circuit according to another embodiment of the present invention. FIG. 9 is a timing chart showing patterns of each signal in this embodiment. 1...Output gate, 2.9...Ring buffer. 3... Input gate, 4.10... Remaining amount counter, 5.11... Output address counter, 6.12...
Input address counter. 7... Player, 8... Selector, 13... Output side control circuit, 14... Input side control circuit, 15.21... Latch circuit, 22... Buffer circuit. 23... Input address decoder, 24... Output address decoder'.
Claims (4)
のデータバッファを有するとともに、データ転送に複数
の優先順位を設定し、 1つのデータバッファ内に既に存在するデータを転送先
へ出力しているときに、そのデータ転送よりも高い優先
順位のデータ転送が発生した場合には、上記優先順位の
低いデータ転送を中断し、他のデータバッファによって
高い優先順位のデータ転送を先に行うことを特徴とする
バッファ制御方式。(1) It has multiple data buffers that temporarily store data during the data transfer route, sets multiple priorities for data transfer, and outputs the data that already exists in one data buffer to the transfer destination. Sometimes, if a data transfer with a higher priority than that data transfer occurs, the lower priority data transfer is interrupted and the higher priority data transfer is performed first using another data buffer. buffer control method.
るバッファ制御方式。(2) A buffer control method according to claim (1), characterized in that the priority order is indicated by the state of a signal line.
とを特徴とするバッファ制御方式。(3) A buffer control method according to claim (1), characterized in that the priority order is indicated in the first data portion of data transfer.
るバッファ制御方式。(4) A buffer control method according to claim (1), characterized in that the priority order is indicated by a part of the transfer data.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2134693A JPH0430643A (en) | 1990-05-24 | 1990-05-24 | Buffer control method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2134693A JPH0430643A (en) | 1990-05-24 | 1990-05-24 | Buffer control method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0430643A true JPH0430643A (en) | 1992-02-03 |
Family
ID=15134385
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2134693A Pending JPH0430643A (en) | 1990-05-24 | 1990-05-24 | Buffer control method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0430643A (en) |
-
1990
- 1990-05-24 JP JP2134693A patent/JPH0430643A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPS5987569A (en) | Automatic continuous processing circuit of data | |
| US4603383A (en) | Apparatus for direct data transfer among central processing units | |
| US7165126B2 (en) | Direct memory access device | |
| JPH0430643A (en) | Buffer control method | |
| JP3304395B2 (en) | Data transfer device and data transfer method | |
| US4987553A (en) | Straight line drawing control apparatus | |
| KR101116613B1 (en) | Apparatus and method for memory access control | |
| KR100460994B1 (en) | High-bandwidth I/O device with direct memory access and method thereof | |
| JP2568443B2 (en) | Data sizing circuit | |
| JP2751811B2 (en) | Data transmission / reception method and device | |
| JP2595808B2 (en) | Memory device for distributed processing | |
| JPH02293957A (en) | Data selecting transfer system | |
| JP2002007312A (en) | Information input / output device | |
| JP2000132451A (en) | Memory control circuit | |
| JPH11266426A (en) | Memory controller | |
| JPH03152651A (en) | Information transmission system | |
| JP2000040071A (en) | Order guarantee system by multiplexed bus | |
| JP2003150534A (en) | Chain block transfer method and communication control device | |
| JPH0310354A (en) | Data transfer control system | |
| JP2001005722A (en) | Memory access control method and device | |
| JPH0566991A (en) | Interface device | |
| JPH05134970A (en) | Data transfer controller | |
| JPH04130946A (en) | Information processor | |
| JPS6227846A (en) | Input and output channel | |
| JPH04360251A (en) | Computer system |