JPS5850369B2 - Data transfer method - Google Patents
Data transfer methodInfo
- Publication number
- JPS5850369B2 JPS5850369B2 JP53089441A JP8944178A JPS5850369B2 JP S5850369 B2 JPS5850369 B2 JP S5850369B2 JP 53089441 A JP53089441 A JP 53089441A JP 8944178 A JP8944178 A JP 8944178A JP S5850369 B2 JPS5850369 B2 JP S5850369B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- buffer
- transfer
- bytes
- byte
- 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.)
- Expired
Links
Landscapes
- Computer And Data Communications (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Description
【発明の詳細な説明】
本発明は、情報処理装置のデータ転送方式に関し、特に
、一時記憶バツファから可変長格納メモリへのデータ転
送方式に関する。DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a data transfer method for an information processing device, and particularly to a data transfer method from a temporary storage buffer to a variable-length storage memory.
従来、データを効率良く転送する方式として、サイクル
・スチール方式がある。Conventionally, there is a cycle steal method as a method for efficiently transferring data.
サイクル・スチール方式では、あらかじめデータを格納
するメモリ・エリア(以下格納エリアと呼ぶ)を指定す
れば、次に述べる条件が成立するまでは、プログラムの
介入なしに、データ転送が行なわれる。In the cycle steal method, if a memory area (hereinafter referred to as a storage area) in which data is to be stored is specified in advance, data transfer is performed without program intervention until the following conditions are met.
その条件とは、指定された格納エリアにはそれ以上格納
する余地(以下残り転送バイト数と表現する)が無くな
った場合および転送データの区切りを検出した場合であ
る。The conditions are when there is no more storage space in the designated storage area (hereinafter referred to as the number of remaining transfer bytes) and when a break in transfer data is detected.
転送データの区切りは、転送バイト数を指定する方法、
あるいは、転送データ中に区切りを示すバイトを書き込
むことで指示する方法が通常行なわれる。Transfer data can be separated by specifying the number of bytes to transfer,
Alternatively, a method of specifying by writing a byte indicating a delimiter in the transfer data is usually used.
後者の方式は、回線制御装置でメツセージ単位に区切っ
てサイクル・スチールを行なう場合のように転送データ
数がサイクル・スチール開始時点で不明の場合に使用さ
れる。The latter method is used when the number of data to be transferred is unknown at the start of cycle stealing, such as when cycle stealing is performed by dividing each message in a line control device.
上記いずれの方法でも、一度にバッファからmバイト転
送単位バイト数のデータを読み出して、格納エリアに転
送する時、格納エリアの残り転送バイト数がmバイトに
等しかった場合にはこのサイクル・スチールを終了した
時点で、次の格納エリア要求の割込み■1が入る。In any of the above methods, when reading m bytes of data from the buffer at a time and transferring it to the storage area, if the remaining number of transfer bytes in the storage area is equal to m bytes, this cycle steal is performed. When the process is completed, an interrupt (1) for the next storage area request is generated.
この割込み11でプログラムは次の格納エリアを用意す
る必要がある。At this interrupt 11, the program needs to prepare the next storage area.
区切り指示バイト3の検出は、データをバッファから読
み出した時に行なわれるため、第1図に示すように、そ
れ以上転送データのない場合、すなわち、次の1バイト
に区切り指示バイト3が書き込まれている場合には、次
のサイクル・スチ−小動作でデータを読み出した時にサ
イクル・スチール完了の割込み■2が入る。Since the delimiter instruction byte 3 is detected when data is read from the buffer, as shown in Figure 1, if there is no more transfer data, that is, the delimiter instruction byte 3 is written in the next byte. If so, a cycle steal completion interrupt 2 is generated when data is read in the next cycle steal operation.
この場合、先に発生した割込み■1で確保した格納エリ
アは無用となるばかりでなく、短時間に割込みが二度入
ることになり処理能力上悪影響を及ぼすことになる。In this case, not only will the storage area secured by the interrupt (1) that occurred earlier become useless, but the interrupt will occur twice in a short period of time, which will have an adverse effect on processing performance.
本発明の目的とするところは、前記の不要な割込みを抑
止し、プログラムの処理能力低下を防ぐサイクル・スチ
ール方式を提供することにある。An object of the present invention is to provide a cycle steal method that suppresses the above-mentioned unnecessary interrupts and prevents a decrease in program processing performance.
本発明の特徴とするところは、バッファからmバイト毎
にデータを読み出して格納エリアに転送する方式におい
て、残り転送バイト数がmバイトの時のみサイクル・ス
チールの転送バイト数ヲm1バイトとすることによって
、新しい格納エリア要求の割込みを抑止することである
。A feature of the present invention is that in a method of reading data every m bytes from the buffer and transferring it to the storage area, the number of cycle steal transfer bytes is set to m1 byte only when the remaining number of transfer bytes is m bytes. This is to prevent new storage area requests from being interrupted.
これを第2図を用いて説明する。This will be explained using FIG.
k回目の読み出しで、転送データ数が、残り転送バイト
数と等しくなり、しかも次に読み出すデータの1バイト
目には、区切りを示すバイト3が書き込まれている場合
を考える。Consider a case where the number of transferred data becomes equal to the number of remaining transfer bytes in the k-th read, and in addition, byte 3 indicating a break is written in the first byte of the data to be read next.
前述したように、この場合転送データをすべて格納エリ
アへ転送してしまうと、格納エリアの無用な確保と処理
能力低下を招く。As described above, in this case, if all the transfer data is transferred to the storage area, the storage area will be secured unnecessarily and the processing capacity will be reduced.
本発明では、k回目のサイクル・スチール動作で区切り
指示バイト3の直前の1バイトを残して転送を行ない、
その1バイトは次のに+1回目のサイクル・スチール動
作で転送することにより、k回目には割込みを起こさず
、k+1回目の動作で残り転送バイト数がOであること
とサイクル・スチール動作完了を同時に検出し割込みを
発生させる。In the present invention, in the kth cycle steal operation, one byte immediately before the delimiter instruction byte 3 is left and transferred,
By transferring that 1 byte to the next +1st cycle steal operation, an interrupt will not occur at the kth time, and the number of remaining transfer bytes will be O and the cycle steal operation will be completed at the k+1st operation. Detect simultaneously and generate an interrupt.
このようにすることにより、割込み時サイクル動作完了
を検出しているため、格納エリアをさらに確保すること
もなく、割込み回数も1回で済ますことができる。By doing this, since the completion of the cycle operation at the time of an interrupt is detected, there is no need to further secure a storage area, and the number of interrupts can be reduced to one.
次に本発明の一実施例につき、図面を用いて説明する。Next, one embodiment of the present invention will be described with reference to the drawings.
第3図は、本発明の1実施例を示すサイクル・スチール
方式の回線制御装置である。FIG. 3 shows a cycle steal type line control device showing one embodiment of the present invention.
一般性を失なわないので本例では、サイクル・スチール
のバイト数mは2バイトとする。To maintain generality, in this example, the number m of cycle steal bytes is assumed to be 2 bytes.
この装置では、回線からのデータを直並列変換器4でバ
イトに組み立て、バッファ1に101,102,103
,104の順に格納する。In this device, data from the line is assembled into bytes by a serial/parallel converter 4, and data 101, 102, 103 are stored in a buffer 1.
, 104.
一方サイクル・スチール制御部5は、101.102,
103,104の順にデータを転送する。On the other hand, the cycle steal control unit 5 has 101.102,
Data is transferred in the order of 103 and 104.
全直並列変換器4は101゜102.103,104と
データを受信し、メツセージ終了となった場合、メツセ
ージの区切を示スハイト105を104の後に書き込む
。The all-serial/parallel converter 4 receives the data 101, 102, 103, and 104, and when the message ends, writes a height 105 after 104 indicating the message delimiter.
サイクル・スチールの状態は101,102を転送した
時点で、格納エリアの空きは2バイトとなっているもの
とする。Assume that the cycle steal state is such that at the time of transferring 101 and 102, there are 2 bytes of free space in the storage area.
メツセージの区切を示すバイト105は他のデータと区
切するために、例えば一般データが8ビツト/バイトな
ら、9ビツト/バイトを、区切を示すバイト105用に
割当てる構成とすれば良い。The byte 105 indicating the delimitation of the message is used to separate it from other data. For example, if the general data is 8 bits/byte, 9 bits/byte may be allocated for the byte 105 indicating the delimitation.
この時、残り転送バイト数は2であり、一度に読み出せ
るバイト数2と一致するので、このサイクル・スチール
転送バイト数は1減じて1となる。At this time, the number of remaining transfer bytes is 2, which matches the number of bytes that can be read at one time (2), so the number of cycle steal transfer bytes is reduced by 1 to 1.
すなわち読み出しレジスタ6に読み出したテ゛−りのう
ち103のみを格納する。That is, only 103 of the read data are stored in the read register 6.
この時点では、残り転送バイト数は1であり、割込みは
発生しない。At this point, the number of remaining transfer bytes is 1, and no interrupt occurs.
次のサイクル・スチール動作で104,105を読み出
してくるが、105は区切り指示バイトであるのでメモ
リに格納する必要はなく、104のみを残り転送バイト
として1バイト格納する。In the next cycle steal operation, 104 and 105 are read, but since 105 is a delimiter instruction byte, there is no need to store it in the memory, and only 104 is stored as one byte as the remaining transfer byte.
ここで残り転送バイト数が0となり割込みが発生するが
、区切り指示バイト105によりメツセージ終了を検出
しているのでメツセージ終了処理に入り、無用なバッフ
ァ確保は行なわずに済ませることができる。At this point, the number of remaining transfer bytes becomes 0 and an interrupt occurs, but since the end of the message is detected by the delimiter instruction byte 105, message end processing is started and unnecessary buffer reservation can be avoided.
なお、本発明は、サイクル・スチール方式のみならず、
プログラム実行部の介入を必要としないデータ転送方式
たとえばDMA (Direct Memory Ac
cess )方式にも容易に適用できる。Note that the present invention is applicable not only to the cycle steal method, but also to
Data transfer methods that do not require intervention from the program execution unit, such as DMA (Direct Memory Ac
It can also be easily applied to the cess) method.
以上述べたように、本発明によれば、転送データが無い
場合には、次のバッファ確保要求の割込みが発生しない
ため、プログラムの処理能力を低下させることがない。As described above, according to the present invention, when there is no data to be transferred, no interrupt for the next buffer reservation request is generated, so that the processing performance of the program is not reduced.
第1図aは従来のサイクル・スチール方式を説明するた
めのブロック図、第1図すは、aの条件でのサイクル・
スチール動作とプログラムの処理の関係を示すタイムチ
ャート、第2図は本発明のサイクル・スチール方式を説
明するためのブロック図、第3図は本発明の一実施例を
示す回線制御装置のブロック図である。
1・・・・・・バッファ・エリア、2・・・・・・デー
タ・バイト、3・・・・・・区切り指示バイト、4・・
・・・・直並列変換器、5・・・・・・サイクル・スチ
ール制御部、6・・・・・・読み出しレジスタ、7・・
・・・・メモリ、8・・・・・・格納エリア、9・・・
・・・プログラム実行部、10・・・・・・割込み、1
1・・・・・・回線データ。Figure 1a is a block diagram for explaining the conventional cycle steal method.
A time chart showing the relationship between steal operations and program processing, FIG. 2 is a block diagram for explaining the cycle steal method of the present invention, and FIG. 3 is a block diagram of a line control device showing an embodiment of the present invention. It is. 1...Buffer area, 2...Data byte, 3...Separator instruction byte, 4...
...Serial-to-parallel converter, 5...Cycle steal control unit, 6...Read register, 7...
...Memory, 8...Storage area, 9...
...Program execution section, 10...Interrupt, 1
1...Line data.
Claims (1)
了位置には区切り指示バイトが書込まれるバッファと、
該バッファのデータを格納するための複数の固定長エリ
アからなり各々のエリアは所望に応じ確保されて接続可
能に構成されてなる可変長格納メモリと、前記バッファ
メモリのデータを転送単位バイトずつ読出し順次前記格
納メモリに転送して行き、1つの固定長エリアが一杯に
なると次の固定長エリアを確保して該バッファにメツセ
ージ終了指示バイトが読み出される迄データ転送を行な
う制御手段とを有するデータ転送方式において、該制御
手段は該データの転送毎に前記バッファの未転送データ
が転送単位バイト数に達したときのみ転送バイト数を1
減じて転送を行なう如く構成されたことを特徴とするデ
ータ転送方式。1. A buffer that temporarily stores the data to be transferred and in which a delimiter instruction byte is written at the message end position;
a variable-length storage memory consisting of a plurality of fixed-length areas for storing data in the buffer, each of which is configured to be secured and connectable as desired; and a variable-length storage memory configured to read data in the buffer memory in transfer unit bytes. a control means for sequentially transferring the data to the storage memory, and when one fixed length area becomes full, securing the next fixed length area and performing data transfer until a message end instruction byte is read into the buffer. In the method, the control means increases the number of transferred bytes by 1 only when the untransferred data in the buffer reaches the number of transfer unit bytes for each data transfer.
A data transfer method characterized in that the data transfer method is configured to perform transfer after reducing the data.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP53089441A JPS5850369B2 (en) | 1978-07-24 | 1978-07-24 | Data transfer method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP53089441A JPS5850369B2 (en) | 1978-07-24 | 1978-07-24 | Data transfer method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS5517840A JPS5517840A (en) | 1980-02-07 |
| JPS5850369B2 true JPS5850369B2 (en) | 1983-11-10 |
Family
ID=13970758
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP53089441A Expired JPS5850369B2 (en) | 1978-07-24 | 1978-07-24 | Data transfer method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS5850369B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS59110251A (en) * | 1982-12-15 | 1984-06-26 | Fujitsu Ltd | Information transfer system |
-
1978
- 1978-07-24 JP JP53089441A patent/JPS5850369B2/en not_active Expired
Also Published As
| Publication number | Publication date |
|---|---|
| JPS5517840A (en) | 1980-02-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPS60142439A (en) | Store buffer device | |
| JP3525518B2 (en) | Data transfer device | |
| JPH0340868B2 (en) | ||
| JPS5850369B2 (en) | Data transfer method | |
| JPH0221619B2 (en) | ||
| JPH0572634B2 (en) | ||
| JPH0696007A (en) | DMA transfer method | |
| JPS5837633B2 (en) | Buffer memory storage control method | |
| JPS6022384B2 (en) | Bus conversion method | |
| JPH11312138A (en) | Interrupt control system and its control method therefor | |
| JP2784520B2 (en) | File transfer device | |
| JPH0346033A (en) | Inter-job data transfer control method | |
| JP2844960B2 (en) | Digital data recording / reproducing device | |
| JPS59144955A (en) | Information processor | |
| JP3009168B2 (en) | Data processing device | |
| JPH0246967B2 (en) | ||
| JPH10177764A (en) | Optical disk recording device | |
| JPS63187349A (en) | Storage device | |
| JPS60245055A (en) | Decision device for write area of main storage device | |
| JPS61136131A (en) | Information processor | |
| JPH02129724A (en) | Program executing system | |
| JPS62226253A (en) | Control method for data transfer | |
| JPH0426744B2 (en) | ||
| JPH08101788A (en) | Memory operation management method and memory operation management device | |
| JPS59180755A (en) | Tracing system |