JPH09261277A - Data transfer system - Google Patents

Data transfer system

Info

Publication number
JPH09261277A
JPH09261277A JP6259496A JP6259496A JPH09261277A JP H09261277 A JPH09261277 A JP H09261277A JP 6259496 A JP6259496 A JP 6259496A JP 6259496 A JP6259496 A JP 6259496A JP H09261277 A JPH09261277 A JP H09261277A
Authority
JP
Japan
Prior art keywords
data
buffer
output
input
input 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
JP6259496A
Other languages
Japanese (ja)
Other versions
JP2980163B2 (en
Inventor
Makoto Tsukagoshi
誠 塚越
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP8062594A priority Critical patent/JP2980163B2/en
Publication of JPH09261277A publication Critical patent/JPH09261277A/en
Application granted granted Critical
Publication of JP2980163B2 publication Critical patent/JP2980163B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To improve data transmission efficiency by temporarily saving fetched data to a memory and securing space in an input buffer unless the space capacitance of an output buffer is lower than data stored in the input buffer. SOLUTION: The input buffer 11 of an input control part 1 stores reception data from an outside and control CPU 12 controls data reception with an external device. The control CPU 22 of an output control part 2 transfer-controls data stored in the input buffer 11 to an output buffer 21 and the output buffer 21 stores data to be outputted to the external device. When a shared memory 23 capable of temporary storing data from the input buffer 21 is provided in the output control part 2 and the space capacitance of the output buffer 21 is lower than data stored in the input buffer, data fetched in the input control part 1 is temporarily saved in the shared memory 21, the space of the input buffer 11 is secured and the reception of the input control part 1 is made to be possible. Thus, the transmission efficiency of large capacitance of data is improved.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、CPU間のデータ
通信方式に関し、特に、共有バッファと2個のCPUと
共有メモリとバッファから構成される、大容量のサイズ
のデータ通信と高速デー夕通信を必要とする分野で運用
するCPU間のデータ通信方式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data communication system between CPUs, and more particularly to a large-capacity data communication and a high-speed data communication composed of a shared buffer, two CPUs, a shared memory, and a buffer. The present invention relates to a data communication method between CPUs operating in a field requiring the.

【0002】[0002]

【従来の技術】従来、この種のCPU間のデータ転送方
式としては、CPU間に共有メモリを介してデータ転送
を行うものがあり、例えば、特開平3−138749号
公報に開示されたものがある。図4は、上記公報に開示
されたCPU間データ転送の構成を示すブロック図であ
る。
2. Description of the Related Art Conventionally, as a data transfer method between CPUs of this type, there is one in which data is transferred between CPUs through a shared memory, for example, the one disclosed in Japanese Patent Laid-Open No. 138749/1993. is there. FIG. 4 is a block diagram showing a configuration of data transfer between CPUs disclosed in the above publication.

【0003】以下、このCPU間のデータ転送の動作に
ついて説明する。このCPU間のデータ転送方式は、共
有メモリを、CPU101からCPU102へのデータ
転送を行うための領域と、CPU101からCPU10
2へのデータ転送を行うための領域とに分割し、それぞ
れにおいてどこまでデータが書き込まれているかを示す
書き込みポインタと、どこまでデー夕が読み込まれたか
を示す読み込みポインタを設け、一方のCPUは書き込
みポインタだけを、他方のCPUは読み込みポインタだ
けを更新するようにして共有メモリ103を管理したも
のである。
The operation of data transfer between the CPUs will be described below. The data transfer method between the CPUs includes a shared memory, an area for transferring data from the CPU 101 to the CPU 102, and a CPU 101 to the CPU 10.
It is divided into an area for data transfer to 2 and a write pointer showing how much data is written in each area and a read pointer showing how much data has been read in each area. However, the other CPU manages the shared memory 103 by updating only the read pointer.

【0004】図5は共有メモリの構造を示すものであ
る。図5において、111は読み込みポインタを、11
2は書き込みポインタを示している。図6は、CPU1
01からデータが書き込まれ、CPU102がデー夕を
読み込む状態を示すものである。図6において、CPU
101からCPU102へデータ転送が行われる場合、
まず、CPU101が共有メモリ103に対して書き込
みを行った後、書き込みポインタ112を共有メモリ1
03においてデータが書き込まれている最後の位置を示
すように更新を行い、CPU102では、データの読み
込みポインタ111と書き込みポインタ112を比較
し、もし、これらの値が等しくない場合は、その分のデ
ータを読み込み、読み込みポインタ111を書き込みポ
インタ112と同じ位置まで更新する。上記公報に開示
されたCPU間データ転送では、CPU間データ転送を
共有メモリを介して行っているために、アドレッシング
が複雑であり、CPUに負荷がかかり、データ転送効率
は、悪い。その為、共有メモリをバッファに置き換え
た、図7に示す構成によりCPU間データ転送を行うこ
とが一般的である。
FIG. 5 shows the structure of the shared memory. In FIG. 5, 111 is a read pointer, and 11
Reference numeral 2 indicates a write pointer. FIG. 6 shows the CPU 1.
Data is written from 01 and the CPU 102 reads the data. In FIG. 6, the CPU
When data is transferred from 101 to CPU 102,
First, after the CPU 101 writes to the shared memory 103, the write pointer 112 is moved to the shared memory 1
In 03, updating is performed so as to indicate the last position where the data is written, and the CPU 102 compares the read pointer 111 and the write pointer 112 of the data, and if these values are not equal, the corresponding data Is read, and the read pointer 111 is updated to the same position as the write pointer 112. In the data transfer between CPUs disclosed in the above publication, since the data transfer between CPUs is performed via the shared memory, the addressing is complicated, the CPU is loaded, and the data transfer efficiency is poor. Therefore, it is common to perform data transfer between CPUs by the configuration shown in FIG. 7 in which the shared memory is replaced with a buffer.

【0005】以下に図7のCPU間データ転送方式につ
いて説明する。このデータ転送方式は、外部のデータ出
力装置からのデータを格納する入力バッファ211と外
部のデータ出力装置(図示せず)とのデータ制御を行う
制御用CPU212とを有する入力制御部201と、外
部装置(図示せず)に出力するデータを格納する出力バ
ッファ221と入力バッファ211に格納されたデータ
を出力バッファ221に転送する制御を行う制御用CP
U222とを有する出力制御部202により構成され
る。
The inter-CPU data transfer system of FIG. 7 will be described below. In this data transfer method, an input control unit 201 having an input buffer 211 for storing data from an external data output device and a control CPU 212 for controlling data with an external data output device (not shown); An output buffer 221 that stores data to be output to a device (not shown) and a control CP that performs control to transfer the data stored in the input buffer 211 to the output buffer 221
And an output control unit 202 having a U222.

【0006】次に、この方式の動作について、図8に示
す入力制御部201の制御用CPU212のフローチャ
ートと図9に示す出力制御部202の制御用CPU22
2のフローチャートを用いて説明する。入力制御部20
1内の制御用CPU212は、入力制御部201の入力
バッファ211の蓄積量を表すバッファフラグ216を
確認し、入力制御部201の入力バッファ211に、外
部データ出力装置から1回のデータ転送で送信されるデ
ータ分の空きができるまでデータ受信を行なわない(図
8のステップS1、ステップS2)。そして、入力制御
部201の入力バッファ211に空きが次第、入力バッ
ファ211にデータを転送する(図8のステップS
3)。
Next, regarding the operation of this system, a flowchart of the control CPU 212 of the input control unit 201 shown in FIG. 8 and the control CPU 22 of the output control unit 202 shown in FIG.
This will be described with reference to the flowchart of No. 2. Input control unit 20
The control CPU 212 in 1 confirms the buffer flag 216 indicating the storage amount of the input buffer 211 of the input control unit 201, and transmits it to the input buffer 211 of the input control unit 201 from the external data output device in one data transfer. The data is not received until there is a space for the data to be stored (steps S1 and S2 in FIG. 8). Then, as soon as there is a free space in the input buffer 211 of the input control unit 201, the data is transferred to the input buffer 211 (step S in FIG. 8).
3).

【0007】一方、出力制御部202内の制御用CPU
222は、入力制御部201の入力バッファ211のバ
ッファフラグ216と、出力制御部202の出力バッフ
ァ221のバッファフラグ223を使用して、入力制御
部201の入力バッファ211のデー夕蓄積量と、出力
制御部202の出力バッファ221の空き容量を比較す
る(図9のステップS1)。出力制御部202の出力バ
ッファ221の空き容量が、入力制御部201の入力バ
ッファ211のデータ蓄積量に達してから、出力制御部
202の制御用CPU222は、入力制御部201の入
力バッファ211から出力制御部202の出力バッファ
221へデータ転送を行う(図9のステップS2)。入
力バッファ211と出力バッファ221間のデータ転送
終了後、入力制御部201の入力バッファ211は、次
のデータ受信が可能となる。
On the other hand, the control CPU in the output control unit 202
222 uses the buffer flag 216 of the input buffer 211 of the input control unit 201 and the buffer flag 223 of the output buffer 221 of the output control unit 202 to determine the data storage amount of the input buffer 211 of the input control unit 201 and the output. The free capacity of the output buffer 221 of the control unit 202 is compared (step S1 in FIG. 9). After the free space of the output buffer 221 of the output control unit 202 reaches the data storage amount of the input buffer 211 of the input control unit 201, the control CPU 222 of the output control unit 202 outputs from the input buffer 211 of the input control unit 201. Data transfer is performed to the output buffer 221 of the control unit 202 (step S2 in FIG. 9). After the data transfer between the input buffer 211 and the output buffer 221 is completed, the input buffer 211 of the input control unit 201 can receive the next data.

【0008】[0008]

【発明が解決しようとする課題】第1の問題点は、従来
のデータ転送方法において、出力バッファよりサイズの
大きいデータを入力バッファに受信した場合は、受信デ
ータを何回かに分けて、出力バッファに転送しなければ
ならなくなり、データ転送効率が低下することである。
The first problem is that in the conventional data transfer method, when data having a size larger than that of the output buffer is received by the input buffer, the received data is divided into several times and output. This means that the data has to be transferred to the buffer, which reduces the data transfer efficiency.

【0009】第2の問題点において、入力制御部のデー
タ受信速度の方が、出力制御部のデータ送信速度より速
い場合、入力制御部ではデータ受信を完了したが、出力
制御部の出力バッファの空き容量がデータ入力制御部の
入力バッファに蓄積されたデー夕分に達していないこと
が起こり得る。したがって、入力バッファと出力バッフ
ァ間の転送が行えないため次のデータを入力制御部が受
信できず、データ受信待機時間が長くなり、デー夕転送
効率が低下する。
In the second problem, when the data reception speed of the input control unit is faster than the data transmission speed of the output control unit, the input control unit completes the data reception, but the output buffer of the output control unit does not receive the data. It is possible that the free space does not reach the amount of data accumulated in the input buffer of the data input control unit. Therefore, since the transfer between the input buffer and the output buffer cannot be performed, the input control unit cannot receive the next data, the data reception waiting time becomes long, and the data transfer efficiency decreases.

【0010】第3の問題点は、全体のデータ転送効率を
上げるため、入力バッファに受信したデータを一回のデ
ータ転送で出力バッファに転送する必要があり、最大送
信デー夕量より大きい出力バッファを必要とすることで
ある。その理由は、入力バッファに受信されたデータの
転送先が、出力バッファのみであるからである。
The third problem is that in order to improve the overall data transfer efficiency, it is necessary to transfer the data received in the input buffer to the output buffer in one data transfer, which is larger than the maximum transmission data amount. Is needed. The reason is that the destination of the data received by the input buffer is only the output buffer.

【0011】本発明の課題は、大容量のサイズのデータ
転送時において、データの伝送効率を向上することので
きるデータ転送方式を提供することである。
An object of the present invention is to provide a data transfer method capable of improving the data transmission efficiency when transferring a large capacity of data.

【0012】[0012]

【課題を解決するための手段】本発明によれば、外部デ
ータ出力装置からのデータを格納する入力バッファ及び
外部データ出力装置とのデータ受信制御を行う第1の制
御用CPUを有する入力制御部と、外部データ出力装置
に出力するデータを格納し、外部にデータを出力する出
力バッファ、前記入力バッファに格納されたデータを前
記出力バッファに転送する制御を行う第2の制御用CP
U、及び前記入力バッファからのデータを一時的に格納
することが可能なメモリを有する出力制御部により構成
され、前記出力バッファの空き容量が前記入力バッファ
に蓄積されたデータ分に満たない場合に、前記入力制御
部に取り込んだデータを前記メモリに一時的に回避し、
前記入力バッファの空きを確保し、前記入力制御部の受
信を可能にすることを特徴とするデータ転送方式が得ら
れる。
According to the present invention, an input controller having an input buffer for storing data from an external data output device and a first control CPU for controlling data reception with the external data output device. And an output buffer for storing the data to be output to the external data output device and outputting the data to the outside, and a second control CP for controlling the transfer of the data stored in the input buffer to the output buffer.
U and an output control unit having a memory capable of temporarily storing data from the input buffer, and when the free capacity of the output buffer is less than the amount of data accumulated in the input buffer, , Temporarily avoiding the data captured in the input control unit in the memory,
There is provided a data transfer method characterized in that a space is secured in the input buffer and reception by the input control unit is enabled.

【0013】さらに、本発明によれば、外部から受信し
たデータを前記入力制御部から前記出力制御部に転送す
る場合、前記第1の制御用CPUは、前記入力バッファ
の蓄積量を示すバッファフラグにより、前記入力バッフ
ァに、前記外部データ出力装置から1回のデータ転送で
送信されるデータ分の空きがあるか確認し、前記入力バ
ッファに受信したデータ分以上の空き容量ができ次第、
前記入力バッファに前記データを転送し、前記第2の制
御用CPUは、前記入力バッファのバッファフラグと、
前記出力バッファのバッファフラグにより、前記入力バ
ッファのデータ蓄積量と前記出力バッファの空き容量を
比較し、前記入力バッファのデータ蓄積量が前記出力バ
ッファの空き容量より少ない場合、前記第2の制御用C
PUは、前記入力バッファから前記出力バッファへデー
タ転送を行うことを特徴とするデータ転送方式が得られ
る。
Further, according to the present invention, when the data received from the outside is transferred from the input control unit to the output control unit, the first control CPU has a buffer flag indicating a storage amount of the input buffer. Thus, it is confirmed whether or not the input buffer has a free space for the data transmitted from the external data output device in one data transfer, and as soon as the free space for the received data or more becomes available,
The data is transferred to the input buffer, and the second control CPU sets a buffer flag of the input buffer,
According to the buffer flag of the output buffer, the data storage amount of the input buffer is compared with the free space of the output buffer, and when the data storage amount of the input buffer is smaller than the free space of the output buffer, the second control C
The PU can obtain a data transfer method characterized by transferring data from the input buffer to the output buffer.

【0014】さらに、本発明によれば、外部から受信し
たデータを前記入力制御部から前記出力制御部に転送す
る場合、前記第1の制御用CPUは、前記入力バッファ
の蓄積量を示すバッファフラグにより、前記入力バッフ
ァに、前記外部データ出力装置から1回のデータ転送で
送信されるデータ分の空きがあるか確認し、前記入力バ
ッファに受信したデータ分以上の空き容量ができ次第、
前記入力バッファに前記データを転送し、前記第2の制
御用CPUは、前記入力バッファのバッファフラグと、
前記出力バッファのバッファフラグにより、前記入力バ
ッファのデータ蓄積量と前記出力バッファの空き容量を
比較し、前記入力制御部のデータ受信速度の方が前記出
力制御部のデータ送信速度より速い時、もしくは、前記
出力バッファよりサイズの大きいデータが前記入力バッ
ファに前記外部データ出力装置から受信された場合に生
じる、前記入力バッファのデータ蓄槓量が前記出力バッ
ファの空き容量より多い場合、前記第2の制御用CPU
は、前記出力バッファのバッファフラグから前記出力バ
ッファの空き容量を算出し、前記出力バッファの空き容
量分のデータを前記入力バッファから前記出力バッファ
にデータ転送し、前記入力バッファと前記出力バッファ
間のデータ転送が終了した後、データ転送先を前記メモ
リに切り換え、前記入力バッファに残っているデータを
前記メモリにデータ転送し、このデータ転送が終了した
後、前記第2の制御用CPUは、前記メモリに転送した
データ分の空き容量があるかどうか、前記出力バッファ
のバッファフラグにより確認し、前記出力バッファに、
前記入力バッファから前記メモリに転送したデータ分の
空き容量ができ次第、前記メモリと前記出力バッファ間
のデータ転送に切り換え、前記入力バッファから前記メ
モリに転送されたデータを前記出力バッファに転送する
ことを特徴とするデータ転送方式が得られる。
Further, according to the present invention, when the data received from the outside is transferred from the input control unit to the output control unit, the first control CPU has a buffer flag indicating a storage amount of the input buffer. Thus, it is confirmed whether or not the input buffer has a free space for the data transmitted from the external data output device in one data transfer, and as soon as the free space for the received data or more becomes available,
The data is transferred to the input buffer, and the second control CPU sets a buffer flag of the input buffer,
A buffer flag of the output buffer is used to compare the data storage amount of the input buffer with the free space of the output buffer, and when the data reception speed of the input control unit is faster than the data transmission speed of the output control unit, or If the data storage amount of the input buffer is larger than the free space of the output buffer, which occurs when data having a size larger than that of the output buffer is received from the external data output device in the input buffer, CPU for control
Calculates the free space of the output buffer from the buffer flag of the output buffer, transfers the data of the free space of the output buffer from the input buffer to the output buffer, and transfers between the input buffer and the output buffer. After the data transfer is completed, the data transfer destination is switched to the memory, the data remaining in the input buffer is transferred to the memory, and after the data transfer is completed, the second control CPU is Whether there is a free space for the transferred data in the memory is confirmed by the buffer flag of the output buffer, and in the output buffer,
As soon as there is free space for the data transferred from the input buffer to the memory, switching to data transfer between the memory and the output buffer, and transferring the data transferred from the input buffer to the memory to the output buffer A data transfer method characterized by

【0015】[0015]

【作用】データ転送時に、出力バッファの空き容量が入
力バッファの受信データ分に達しない場合に、入力バッ
ファのデータ転送先を出力制御部の制御用CPUのメモ
リに変更し、制御用CPUメモリに一時的に格納する
為、入力バッファの空きを確保して、次のデータの入力
を開始することが可能となる。このため、出力バッファ
のサイズを送信データの最大のサイズよりも大きくする
必要がなくなり、また、大容量のサイズのデータ転送時
でもデータ受信ができ、データ受信待機時間を減少させ
ることができ、データ転送効率を従来の方式よりも向上
できる。
When the free space of the output buffer does not reach the received data of the input buffer at the time of data transfer, the data transfer destination of the input buffer is changed to the memory of the control CPU of the output control unit, and the data is transferred to the control CPU memory. Since the data is temporarily stored, it is possible to secure a free space in the input buffer and start inputting the next data. Therefore, it is not necessary to make the size of the output buffer larger than the maximum size of the transmission data, and it is possible to receive the data even when transferring a large amount of data and reduce the data reception waiting time. The transfer efficiency can be improved as compared with the conventional method.

【0016】[0016]

【発明の実施の形態】以下、本発明の一実施の形態につ
いて図面を参照して詳細に説明する。図1は、本発明の
一実施の形態を示すブロック図である。本発明に係るデ
ータ転送方式は、入力制御部1と出力制御部2を具備し
て構成される。入力制御部1は、外部から受信するデー
タを格納する入力バッファ11と、外部の装置とのデー
タ受信制御を行う制御用CPU12とを有して構成され
ている。出力制御部2は、外部装置に出力するデータを
格納し、外部にデータを送信する出力バッファ21と、
入力バッファ11に格納されたデータを出力バッファ2
1に転送する制御を行う制御用CPU22と、入力バッ
ファ11に受信したデータ分の空き容量が出力バッファ
21にない場合に、入力制御部1の入力バッファ11か
らのデー夕を一時的に格納することにも使用する制御用
CPU22のメモリ(以下、共有メモリ23と記す)を
有して構成されている。
BEST MODE FOR CARRYING OUT THE INVENTION An embodiment of the present invention will be described in detail below with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of the present invention. The data transfer method according to the present invention comprises an input control unit 1 and an output control unit 2. The input control unit 1 is configured to include an input buffer 11 that stores data received from the outside, and a control CPU 12 that controls data reception with an external device. The output control unit 2 stores data to be output to an external device, and an output buffer 21 that transmits the data to the outside,
The data stored in the input buffer 11 is transferred to the output buffer 2
When the output buffer 21 does not have a free space corresponding to the data received by the control CPU 22 and the input buffer 11, the data from the input buffer 11 of the input control unit 1 is temporarily stored. It also has a memory of the control CPU 22 (hereinafter referred to as a shared memory 23) which is also used for this purpose.

【0017】次に、本発明の実施例の動作について説明
する。まず、外部から受信したデータを入力制御部1か
ら出力制御部2に転送する場合について、図1、図2、
図3を用いて説明する。ここで、図2は入力制御部1の
制御用CPU12における動作を示したフローチャート
であり、図3は出力制御部2の制御用CPU22におけ
る動作を示したフローチャートである。入力制御部1内
の制御用CPU12は、入力バッファ11の蓄積量を示
すバッファフラグ16により、入力バッファ11に、外
部の装置から1回のデータ転送で送信されるデータ分の
空きがあるか確認する(図2のステップS1、ステップ
S2)。その後、入力バッファ11に受信したデータ分
以上の空き容量ができ次第、入力バッファ11にデータ
を転送する(図2のステップS3)。一方、出力制御部
2内の制御用CPU22は、入力バッファ11のバッフ
ァフラグ16と、出力制御部2の出力バッファ21のバ
ッファフラグ28により、入力バッファ11のデータ蓄
積量と出力バッファ21の空き容量を比較する(図3の
ステップS1)。
Next, the operation of the embodiment of the present invention will be described. First, in the case of transferring data received from the outside from the input control unit 1 to the output control unit 2, FIG.
This will be described with reference to FIG. Here, FIG. 2 is a flowchart showing an operation in the control CPU 12 of the input control unit 1, and FIG. 3 is a flowchart showing an operation in the control CPU 22 of the output control unit 2. The control CPU 12 in the input control unit 1 confirms by the buffer flag 16 indicating the amount of storage in the input buffer 11 whether the input buffer 11 has a free space for the data transmitted from the external device in one data transfer. (Step S1 and Step S2 in FIG. 2). After that, the data is transferred to the input buffer 11 as soon as the free space equal to or larger than the received data is made in the input buffer 11 (step S3 in FIG. 2). On the other hand, the control CPU 22 in the output control unit 2 uses the buffer flag 16 of the input buffer 11 and the buffer flag 28 of the output buffer 21 of the output control unit 2 to determine the data storage amount of the input buffer 11 and the free space of the output buffer 21. Are compared (step S1 in FIG. 3).

【0018】上記した比較の結果により、次のデータ転
送方法が異なるので、最初に、入力バッファ11のデー
タ蓄積量が出力バッファ21の空き容量より少ない場合
について説明する。この場合は、制御用CPU22は、
入力バッファ11から出力バッファ21へデータ転送を
行う(図3のステップS2)。入力バッファ11と出力
バッファ21間のデータ転送が終了した後、入力バッフ
ァ11は、次のデータ受信が可能となる。
Since the next data transfer method differs depending on the result of the above comparison, first, a case where the data storage amount of the input buffer 11 is smaller than the free space of the output buffer 21 will be described. In this case, the control CPU 22
Data is transferred from the input buffer 11 to the output buffer 21 (step S2 in FIG. 3). After the data transfer between the input buffer 11 and the output buffer 21 is completed, the input buffer 11 can receive the next data.

【0019】次に、例えば、入力制御部のデータ受信速
度の方が出力制御部のデータ送信速度より速い時、もし
くは、出力バッファ21よりサイズの大きいデータが入
力バッファ11に外部データ出力装置から受信された場
合に生じる、入力バッファ11のデータ蓄槓量が出力バ
ッファ21の空き容量より多い場合について説明する。
出力制御部2の制御用CPU22は、出力バッファ21
のバッファフラグ28から出力バッファ21の空き容量
を算出し、出力バッファ21の空き容量分のデータを入
力バッファ11から出力バッファ21にデータ転送する
(図3のステップS3)。入力バッファ11と出力バッ
ファ21間のデータ転送が終了した後、データ転送先を
制御用CPU22のメモリ、すなわち共有メモリ23に
切り換える(図3のステップS4)。そして、入力バッ
ファ11に残っているデータを共有メモリ23にデータ
転送する(図3のステップS5)。入力バッファ11と
共有メモリ23間のデータ転送が終了した後、入力バッ
ファ11はデータ受信が可能となる。入力バッファ11
と共有メモリ23間のデータ転送が終了した後、制御用
CPU22は、共有メモリ23に転送したデータ分の空
き容量があるかどうか、出力バッファ21のバッファフ
ラグ28により確認し(図3のステップS6)、出力バ
ッファ21に、入力バッファ11から共有メモリ23に
転送したデータ分の空き容量ができ次第、共有メモリ2
3と出力バッファ21間のデータ転送に切り換える(図
3のステップS7)。その後、入力バッファ11から共
有メモリ23に転送されたデータを出力バッファ21に
転送する。
Next, for example, when the data reception speed of the input control unit is faster than the data transmission speed of the output control unit, or when data having a size larger than that of the output buffer 21 is received in the input buffer 11 from the external data output device. The case where the amount of data stored in the input buffer 11 is larger than the free space of the output buffer 21 that occurs when the above is performed will be described.
The control CPU 22 of the output control unit 2 includes the output buffer 21.
The free space of the output buffer 21 is calculated from the buffer flag 28 of No. 1 and the data corresponding to the free space of the output buffer 21 is transferred from the input buffer 11 to the output buffer 21 (step S3 in FIG. 3). After the data transfer between the input buffer 11 and the output buffer 21 is completed, the data transfer destination is switched to the memory of the control CPU 22, that is, the shared memory 23 (step S4 in FIG. 3). Then, the data remaining in the input buffer 11 is transferred to the shared memory 23 (step S5 in FIG. 3). After the data transfer between the input buffer 11 and the shared memory 23 is completed, the input buffer 11 can receive the data. Input buffer 11
After the data transfer between the shared memory 23 and the shared memory 23 is completed, the control CPU 22 confirms by the buffer flag 28 of the output buffer 21 whether or not there is a free space for the transferred data in the shared memory 23 (step S6 in FIG. 3). ), As soon as the output buffer 21 has a free space for the data transferred from the input buffer 11 to the shared memory 23, the shared memory 2
3 and the data transfer between the output buffer 21 (step S7 in FIG. 3). After that, the data transferred from the input buffer 11 to the shared memory 23 is transferred to the output buffer 21.

【0020】[0020]

【発明の効果】本発明によれば、入力制御部のデータ受
信速度の方が、出力制御部のデータ送信速度より速い場
合でも、データ出力バッファに入力制御部で受信したデ
ータ分の空き容量ができないため、データ受信待機時間
が大幅に減少し、CPU間データ転送の効率を向上する
ことができる。
According to the present invention, even when the data reception speed of the input control unit is faster than the data transmission speed of the output control unit, the data output buffer has a free space for the data received by the input control unit. Since this is not possible, the data reception waiting time is greatly reduced, and the efficiency of data transfer between CPUs can be improved.

【0021】又、本発明によれば、出力制御部の出力バ
ッファの空き容量がデータ入力制御部の入力バッファに
蓄積されたデータ分に達していない場合に、前記入力制
御部から取り込んだデータを前記出力制御部の制御用C
PUのメモリに、一時的に回避し、入力バッファの空き
を確保するため、出力バッファより大きいサイズのデー
タをCPU間で、デー夕受信待機時間なしで、転送する
ことが可能となる。これにより、従来の送信データ量分
以上のデータ出力バッファを必要とする欠点が改善さ
れ、経済性の優れた通信制御装置を提供できる。
Further, according to the present invention, when the free space of the output buffer of the output control unit does not reach the amount of data accumulated in the input buffer of the data input control unit, the data fetched from the input control unit is stored. C for controlling the output controller
Since it is temporarily avoided in the memory of the PU and the free space of the input buffer is secured, it is possible to transfer data of a size larger than the output buffer between the CPUs without a data reception waiting time. As a result, it is possible to provide a communication control device that is excellent in economic efficiency by improving the drawbacks that the conventional data output buffer needs more than the transmission data amount.

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

【図1】本発明のデータ転送方式の一実施の形態を示し
たブロック図である。
FIG. 1 is a block diagram showing an embodiment of a data transfer system of the present invention.

【図2】図1のデータ転送方式における入力制御部の制
御用CPUの制御方法を説明するためのフローチャート
図である。
FIG. 2 is a flow chart diagram for explaining a control method of a control CPU of an input control unit in the data transfer system of FIG.

【図3】図1のデータ転送方式における出力制御部の制
御用CPUの制御方法を説明するためのフローチャート
図である。
FIG. 3 is a flow chart diagram for explaining a control method of a control CPU of an output control unit in the data transfer system of FIG.

【図4】従来のデータ転送方式の一実施の形態を示した
ブロック図である。
FIG. 4 is a block diagram showing an embodiment of a conventional data transfer system.

【図5】従来のデータ転送方式における共有メモリの構
造を示した図である。
FIG. 5 is a diagram showing a structure of a shared memory in a conventional data transfer system.

【図6】従来の共有メモリの制御方法を説明するための
図である。
FIG. 6 is a diagram for explaining a conventional shared memory control method.

【図7】従来のデータ転送方式の他の実施の形態を示し
たブロック図である。
FIG. 7 is a block diagram showing another embodiment of the conventional data transfer system.

【図8】図7のデータ転送方式における入力制御部の制
御用CPUの制御方法を説明するためのフローチャー卜
図である。
8 is a flow chart for explaining a control method of a control CPU of an input control unit in the data transfer system of FIG.

【図9】図7のデータ転送方式における出力制御部の制
御用CPUの制御方法を説明するためのフローチャー卜
図である。
9 is a flowchart for explaining a control method of a control CPU of an output control unit in the data transfer system of FIG.

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

1 入力制御部 2 出力制御部 11 入力バッファ 12 制御用CPU 13 入力バッファへの制御信号 14 外部装置への制御信号 15 受信データ 16 バッファフラグ 21 出力バッファ 22 制御用CPU 23 共有メモリ 24 入力バッファへの制御信号 25 出力バッファへの制御信号 26 データバス 27 送信データ 28 バッファフラグ 29 共有メモリへの制御信号 1 Input Control Section 2 Output Control Section 11 Input Buffer 12 Control CPU 13 Control Signal to Input Buffer 14 Control Signal to External Device 15 Received Data 16 Buffer Flag 21 Output Buffer 22 Control CPU 23 Shared Memory 24 to Input Buffer Control signal 25 Control signal to output buffer 26 Data bus 27 Transmission data 28 Buffer flag 29 Control signal to shared memory

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 外部データ出力装置からのデータを格納
する入力バッファ及び外部データ出力装置とのデータ受
信制御を行う第1の制御用CPUを有する入力制御部
と、外部データ出力装置に出力するデータを格納し、外
部にデータを出力する出力バッファ、前記入力バッファ
に格納されたデータを前記出力バッファに転送する制御
を行う第2の制御用CPU、及び前記入力バッファから
のデータを一時的に格納することが可能なメモリを有す
る出力制御部により構成され、前記出力バッファの空き
容量が前記入力バッファに蓄積されたデータ分に満たな
い場合に、前記入力制御部に取り込んだデータを前記メ
モリに一時的に回避し、前記入力バッファの空きを確保
し、前記入力制御部の受信を可能にすることを特徴とす
るデータ転送方式。
1. An input control section having an input buffer for storing data from an external data output device and a first control CPU for controlling data reception with the external data output device, and data to be output to the external data output device. And a second control CPU that controls the transfer of the data stored in the input buffer to the output buffer, and temporarily stores the data from the input buffer. When the free space of the output buffer is less than the amount of data accumulated in the input buffer, the data fetched by the input control unit is temporarily stored in the memory. The data transfer method is characterized in that the input buffer is vacant and the input control unit can receive the data.
【請求項2】 外部から受信したデータを前記入力制御
部から前記出力制御部に転送する場合、前記第1の制御
用CPUは、前記入力バッファの蓄積量を示すバッファ
フラグにより、前記入力バッファに、前記外部データ出
力装置から1回のデータ転送で送信されるデータ分の空
きがあるか確認し、前記入力バッファに受信したデータ
分以上の空き容量ができ次第、前記入力バッファに前記
データを転送し、前記第2の制御用CPUは、前記入力
バッファのバッファフラグと、前記出力バッファのバッ
ファフラグにより、前記入力バッファのデータ蓄積量と
前記出力バッファの空き容量を比較し、前記入力バッフ
ァのデータ蓄積量が前記出力バッファの空き容量より少
ない場合、前記第2の制御用CPUは、前記入力バッフ
ァから前記出力バッファへデータ転送を行うことを特徴
とする請求項1記載のデータ転送方式。
2. When transferring data received from the outside to the output control unit from the input control unit, the first control CPU stores the data in the input buffer by a buffer flag indicating a storage amount of the input buffer. Checking whether there is a free space for the data transmitted from the external data output device in one data transfer, and transferring the data to the input buffer as soon as the free space for the received data or more is made. Then, the second control CPU compares the data storage amount of the input buffer and the free space of the output buffer with the buffer flag of the input buffer and the buffer flag of the output buffer, and the data of the input buffer is compared. When the accumulated amount is less than the free space of the output buffer, the second control CPU moves from the input buffer to the output buffer. 2. The data transfer method according to claim 1, wherein data transfer is performed to the file.
【請求項3】 外部から受信したデータを前記入力制御
部から前記出力制御部に転送する場合、前記第1の制御
用CPUは、前記入力バッファの蓄積量を示すバッファ
フラグにより、前記入力バッファに、前記外部データ出
力装置から1回のデータ転送で送信されるデータ分の空
きがあるか確認し、前記入力バッファに受信したデータ
分以上の空き容量ができ次第、前記入力バッファに前記
データを転送し、前記第2の制御用CPUは、前記入力
バッファのバッファフラグと、前記出力バッファのバッ
ファフラグにより、前記入力バッファのデータ蓄積量と
前記出力バッファの空き容量を比較し、前記入力制御部
のデータ受信速度の方が前記出力制御部のデータ送信速
度より速い時、もしくは、前記出力バッファよりサイズ
の大きいデータが前記入力バッファに前記外部データ出
力装置から受信された場合に生じる、前記入力バッファ
のデータ蓄槓量が前記出力バッファの空き容量より多い
場合、前記第2の制御用CPUは、前記出力バッファの
バッファフラグから前記出力バッファの空き容量を算出
し、前記出力バッファの空き容量分のデータを前記入力
バッファから前記出力バッファにデータ転送し、前記入
力バッファと前記出力バッファ間のデータ転送が終了し
た後、データ転送先を前記メモリに切り換え、前記入力
バッファに残っているデータを前記メモリにデータ転送
し、このデータ転送が終了した後、前記第2の制御用C
PUは、前記メモリに転送したデータ分の空き容量があ
るかどうか、前記出力バッファのバッファフラグにより
確認し、前記出力バッファに、前記入力バッファから前
記メモリに転送したデータ分の空き容量ができ次第、前
記メモリと前記出力バッファ間のデータ転送に切り換
え、前記入力バッファから前記メモリに転送されたデー
タを前記出力バッファに転送することを特徴とする請求
項1又は2記載のデータ転送方式。
3. When the data received from the outside is transferred from the input control unit to the output control unit, the first control CPU stores in the input buffer a buffer flag indicating a storage amount of the input buffer. Checking whether there is a free space for the data transmitted from the external data output device in one data transfer, and transferring the data to the input buffer as soon as the free space for the received data or more is made. Then, the second control CPU compares the data storage amount of the input buffer with the free space of the output buffer by using the buffer flag of the input buffer and the buffer flag of the output buffer, and the second control CPU of the input control unit When the data reception speed is faster than the data transmission speed of the output control unit, or when the data size is larger than that of the output buffer When the data storage amount of the input buffer, which is generated when the input buffer receives the data from the external data output device, is larger than the free space of the output buffer, the second control CPU causes the buffer of the output buffer. After calculating the free capacity of the output buffer from the flag, data of the free capacity of the output buffer is transferred from the input buffer to the output buffer, after the data transfer between the input buffer and the output buffer is completed, The data transfer destination is switched to the memory, the data remaining in the input buffer is transferred to the memory, and after the data transfer is completed, the second control C
The PU confirms whether or not there is a free space for the transferred data in the memory by the buffer flag of the output buffer, and as soon as a free space for the data transferred from the input buffer to the memory is made in the output buffer. 3. The data transfer method according to claim 1, wherein the data transfer between the memory and the output buffer is switched, and the data transferred from the input buffer to the memory is transferred to the output buffer.
JP8062594A 1996-03-19 1996-03-19 Data transfer method Expired - Fee Related JP2980163B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8062594A JP2980163B2 (en) 1996-03-19 1996-03-19 Data transfer method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8062594A JP2980163B2 (en) 1996-03-19 1996-03-19 Data transfer method

Publications (2)

Publication Number Publication Date
JPH09261277A true JPH09261277A (en) 1997-10-03
JP2980163B2 JP2980163B2 (en) 1999-11-22

Family

ID=13204815

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8062594A Expired - Fee Related JP2980163B2 (en) 1996-03-19 1996-03-19 Data transfer method

Country Status (1)

Country Link
JP (1) JP2980163B2 (en)

Also Published As

Publication number Publication date
JP2980163B2 (en) 1999-11-22

Similar Documents

Publication Publication Date Title
US7434023B2 (en) Memory device
US7254283B1 (en) Image processor processing image data in parallel with a plurality of processors
JP2980163B2 (en) Data transfer method
US20060036779A1 (en) Method and control system for controlling a plurality of function blocks
JP2000099452A (en) Dma control device
JP3204297B2 (en) DMA transfer control device
JP3266610B2 (en) DMA transfer method
JPH0756803A (en) High-speed dma transfer device
JP3293838B2 (en) Data transfer method
JP2907102B2 (en) File loading method
JPH06242950A (en) Pipeline input/output controller
JP4379964B2 (en) Electronic camera
JP3202769B2 (en) Burst read processing device
JP2000029823A (en) Bus access control circuit
JP2944193B2 (en) Data receiving device
JPH04205047A (en) Data processor
JP2000115480A (en) Image reader
JPH10254817A (en) Dma transfer control system
JPH10333981A (en) Read buffered write through type bus interface device
JPH04192028A (en) Control system for data sent to printer
JPS6383854A (en) Data transfer circuit
WO2006046272A1 (en) Memory access device
JPH09305534A (en) Data transfer circuit
JPH1165990A (en) Cache control circuit
JP2002132702A (en) Memory control system

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19990818

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

Free format text: PAYMENT UNTIL: 20080917

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20080917

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090917

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees