JPS6295755A - Method and apparatus for controlling instruction prefetching of magnetic tape device - Google Patents

Method and apparatus for controlling instruction prefetching of magnetic tape device

Info

Publication number
JPS6295755A
JPS6295755A JP60235807A JP23580785A JPS6295755A JP S6295755 A JPS6295755 A JP S6295755A JP 60235807 A JP60235807 A JP 60235807A JP 23580785 A JP23580785 A JP 23580785A JP S6295755 A JPS6295755 A JP S6295755A
Authority
JP
Japan
Prior art keywords
magnetic tape
data
tape
write
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
JP60235807A
Other languages
Japanese (ja)
Other versions
JPH0452967B2 (en
Inventor
Masayuki Ishiguro
雅之 石黒
Noboru Owa
大輪 昇
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 JP60235807A priority Critical patent/JPS6295755A/en
Priority to US06/883,630 priority patent/US4757396A/en
Priority to AU60031/86A priority patent/AU576090B2/en
Priority to CA513624A priority patent/CA1273710C/en
Priority to DE86305345T priority patent/DE3689021T2/en
Priority to EP86305345A priority patent/EP0213703B1/en
Priority to KR8605635A priority patent/KR920004769B1/en
Publication of JPS6295755A publication Critical patent/JPS6295755A/en
Priority to CA000614390A priority patent/CA1280510C/en
Publication of JPH0452967B2 publication Critical patent/JPH0452967B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Digital Magnetic Recording (AREA)

Abstract

PURPOSE:To improve the processing efficiency by providing the 1st mode detecting the tape end logically to control the instruction prefetching and the 2nd mode detecting the actual tape end so as to control the instruction prefetching. CONSTITUTION:When the magnetic tape 16 of a magnetic tape section 1 runs and a region near the end EWA of the tape 16 is detected, a prefetching control section 3 counts the running distance of the tape 16 from the point of time near the end region and when the count reaches a prescribed value, a simultaing tape end EOT is obtained. Thus, the tape warning area TWA is prolonged by quickening the EOT detection point of time in this way. Thus, the performance deterioration of the streaming running is prevented. When the tape running distance reaches the limit, a logical EOT is set. In this mode, the number of prefetching instructions is not reduced until this point is arrived. Then in the physical EOT mode, the number of the prefetching instructions is reduced during the detection of EOT of the tape 16 based on the EWA detection.

Description

【発明の詳細な説明】 〔目次〕 概要 産業上の利用分野 従来の技術 発明が解決しようとする問題点 問題点を解決するための手段 (第1図)作用 実施例 (al−実施例の全体構成の説明 (第2図)(b)先
取り制御部の構成の説明 (第3図、第4図) (C)起動処理動作の説明(第5図、第6図)(d)対
ホスト処理動作の説明 (第7図、第8図) (e)対ドライブ処理動作の説明 (第9図、第10図) (f)全体動作の説明  (第11図)(g)他の実施
例の説明 発明の効果 〔概要〕 上位から転送された命令を複数蓄積しうるバッファを備
え、命令を先取りする磁気テープ装置の命令先取り制御
方法において、論理的にEOTを発して命令先取り制御
する第1のモードと、実際のEOT検出によって命令先
取り制御する第2のモードとを設けることにより、テー
プ終端領域近傍でのストリーミング制御による書込みを
有効に行うようにしたものである。
[Detailed Description of the Invention] [Table of Contents] Overview Industrial Field of Application Conventional Technology Problems to be Solved by the Invention Means for Solving the Problems (Fig. 1) Working Examples (Al-Overall Examples) Explanation of the configuration (Figure 2) (b) Explanation of the configuration of the preemption control unit (Figures 3 and 4) (C) Explanation of the startup processing operation (Figures 5 and 6) (d) Processing for host Explanation of operation (Fig. 7, Fig. 8) (e) Explanation of drive processing operation (Fig. 9, Fig. 10) (f) Explanation of overall operation (Fig. 11) (g) Other embodiments Description Effects of the Invention [Summary] In an instruction preemption control method for a magnetic tape device that preempts instructions and is equipped with a buffer capable of storing a plurality of instructions transferred from a higher level, a first method for controlling instruction preemption by logically issuing an EOT is provided. By providing one mode and a second mode in which command prefetch control is performed based on actual EOT detection, writing by streaming control in the vicinity of the tape end area is effectively performed.

〔産業上の利用分野〕[Industrial application field]

本発明は、複数の命令の格納可能なバッファを有する磁
気テープ装置において、当該バッファに上位からの命令
を先取りしうる命令先取り制御方法及びその装置に関゛
する。
The present invention relates to an instruction prefetch control method and apparatus for prefetching instructions from a higher order into the buffer in a magnetic tape device having a buffer capable of storing a plurality of instructions.

コンピュータの外部記憶装置として広く磁気テープ装置
が利用されており、近年特に磁気ディスク装置等の他に
外部記憶装置のバンクアンプ用として用いられている。
Magnetic tape devices are widely used as external storage devices for computers, and in recent years have been particularly used for bank amplifiers of external storage devices in addition to magnetic disk devices.

このような磁気テープ装置においては、第12図に示す
如(、磁気テープへ書込み及び読出しを行う磁気ヘッド
と、磁気テープの走行駆動を行う磁気テープ駆動部とを
有するテープドライブ部1と、ホストコントローラから
の命令によりこれを制御する制御部CTとが設けられて
構成されている。
In such a magnetic tape device, as shown in FIG. A controller CT is provided to control the controller based on commands from the controller.

近年、この制御部CT内にバッファBFを設け、ホスト
コントローラからの命令、データを先取りし、バッファ
BF内に蓄えておき、テープドライブ部1に対しバッフ
ァBF内の命令、データを順次実行させる命令先取り制
御を行うものが開発され、実用に供されている。
In recent years, a buffer BF has been provided in the control unit CT to prefetch commands and data from the host controller, store them in the buffer BF, and instruct the tape drive unit 1 to sequentially execute the commands and data in the buffer BF. A system that performs proactive control has been developed and is in practical use.

このような磁気テープ装置は、バッファ付き磁気テープ
装置と称され、ホストコントローラからの命令に対し、
非同期でテープドライブ部1を動作できるので、ホスト
コントローラ側では一命令に対しテープドライブ部1の
動作完了を待つ必要なく、命令を継続的に発行でき、又
テープドライブ部1もホストコントローラからの命令を
待つことなく継続的に動作が実行できるから、処理効率
の向上が得られ、特にストリーミングモードの動作効率
を向上しうる。
This type of magnetic tape device is called a buffered magnetic tape device, and responds to instructions from the host controller.
Since the tape drive section 1 can be operated asynchronously, the host controller side can issue commands continuously without having to wait for the operation of the tape drive section 1 to complete in response to one command, and the tape drive section 1 can also issue commands from the host controller. Since the operation can be executed continuously without waiting for the operation, processing efficiency can be improved, and in particular, the operation efficiency in streaming mode can be improved.

〔従来の技術〕[Conventional technology]

このようなバッファBFを有して命令を先取りするため
に、バッファBFは複数の命令の蓄積しうる命令バッフ
ァと、複数のデータの蓄積しうるデータバッファとで構
成され、例えば、命令バ。
In order to have such a buffer BF and prefetch instructions, the buffer BF is composed of an instruction buffer that can store a plurality of instructions and a data buffer that can store a plurality of data.

ファには最大64命令、データバッファには最大256
 KByteのデータを格納しうるようにして、先取り
命令、データを増加しうるようにしている。
Up to 64 instructions in the file, up to 256 instructions in the data buffer
It is designed to be able to store KB of data, thereby increasing the number of prefetch instructions and data.

一方、第13図(A)に示す如(磁気テープ16は無限
長でなく、有附長のため、終端には、EOT (END
 OF TAPE )マーカが貼付されており、EOT
検出後のテープウオーニングエリア(TWA)は約3m
Lか使用できない。
On the other hand, as shown in FIG.
OF TAPE) marker is attached, and the EOT
Tape walking area (TWA) after detection is approximately 3m
L cannot be used.

従って、ライト系の処理においては、先取り命令・デー
タがEOT検出時に3m分以上であると、これを磁気テ
ープ16上にライトできなくなり、何等かの対策が必要
となる。
Therefore, in write-related processing, if the pre-fetch command/data is 3 m or more at the time of EOT detection, it will not be possible to write it onto the magnetic tape 16, and some kind of countermeasure will be required.

従来、このため磁気テープの終端であるEOTを検出す
る以前にテープ終端近傍信号EWAを、例えばEOTの
約20m分前に発生し、これによって第13図(B)の
如く、バッファBFのデータバッファの蓄積可能量(デ
ータバイト数)を減少させていた。例えば第13図(B
)の如く最大256 KByteのデータの蓄積できる
データバッファに対し、これを128 KByteに減
少し、データバッファのデータ蓄積量が128 KBy
te以下にならないと、ホストコントローラからのライ
トデータの受付けを許可しないようにして、係る書込み
不能を防止するようにしていた。
Conventionally, for this reason, before detecting EOT, which is the end of the magnetic tape, a tape end near signal EWA is generated, for example, about 20 m before EOT, and as a result, as shown in FIG. 13(B), the data buffer of the buffer BF is The amount of data that can be stored (number of data bytes) was reduced. For example, Fig. 13 (B
), the data buffer can store up to 256 KB of data, but this is reduced to 128 KB, and the amount of data stored in the data buffer is reduced to 128 KB.
Unless the value becomes less than te, acceptance of write data from the host controller is not permitted, thereby preventing such writing failure.

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

係る従来技術によれば、データバッファの容量を制限す
ることによって、間接的にライト系命令の先取り数を制
限しようとするものであった。
According to the related art, the number of prefetching of write-related instructions is indirectly limited by limiting the capacity of the data buffer.

一方、係るバッファ付き磁気テープ装置の性能は、命令
先取り数に大きく影響され、命令先取数が多いほうがス
トリーミング走行を長く維持でき、性能的に優れている
On the other hand, the performance of such a buffered magnetic tape device is greatly influenced by the number of prefetched instructions, and the larger the number of prefetched instructions, the longer the streaming can be maintained and the better the performance.

しかしながら、EOT以降のテープウオーニングエリア
(TWA)に書込み可能な長さは限られており、EOT
検出時に命令先取り数が多過ぎると、先取りした全ての
命令を実行することができなくなる。
However, the length that can be written to the tape warning area (TWA) after EOT is limited, and
If the number of prefetched instructions is too large at the time of detection, it becomes impossible to execute all prefetched instructions.

このため、EOT付近までは先取り数をできるだけ多く
し、EOTが近付いたら書込み可能な数に減らすことが
必要である。
For this reason, it is necessary to increase the number of pre-fetches as much as possible until near the EOT, and reduce the number to a writable number as the EOT approaches.

しかしながら、従来技術では、データバッファの容量制
限を行うことから、先取りされるライト系命令自体が不
当に先取り制限されたり、ライト系命令のうち先取り制
限されないものも生じ、テープ終端領域の近傍において
効率の良いストリーミング走行が困難であるという問題
が生じていた。
However, in the conventional technology, since the capacity of the data buffer is limited, the write-related instructions themselves that are pre-fetched may be unfairly limited in pre-fetching, and some write-related instructions may not be pre-fetched. The problem was that it was difficult to get a good streaming experience.

即ち、テープ終端領域近傍におけるライト系命令を先取
り制限し過ぎて、ストリーミング走行が行われなかった
り、ライト系命令の先取りが多過ぎて、ストリーミング
走行は行われてもTWA内で全ての命令が実行できない
という事態が生じていた。
In other words, write-related instructions near the tape end area are too preemptively restricted and streaming is not performed, or too many write-related instructions are prefetched and even if streaming is performed, all instructions are executed within the TWA. There was a situation where I couldn't do it.

本発明は、テープ終端領域近傍において効率良くストリ
ーミング走行ができ、且つ先取ったライト系命令をTW
A内に確実に実行しうる磁気テープ装置の命令先取り制
御方法及びその装置を提供することを目的とする。
The present invention enables efficient streaming in the vicinity of the tape end area, and also allows write-related commands taken in advance to be transferred to the TW.
An object of the present invention is to provide a command prefetch control method for a magnetic tape device that can be reliably executed within A, and an apparatus therefor.

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

第1図は本発明の原理説明図である。 FIG. 1 is a diagram explaining the principle of the present invention.

本発明では、磁気テープ16の終端近傍領域(EWA)
において2つのモードを有している。
In the present invention, the area near the end of the magnetic tape 16 (EWA)
It has two modes.

第1のモード(ロジカルEOTモードと称す)では磁気
テープドライブ部lが磁気テープ16を走行して、EW
Aを検出すると、制御部CTがEWA検出時点から磁気
テープの走行距離を計数し、計数値F、CTRが一定値
EPTRに達すると、テープ終端領域検出とみなし、疑
似的なEOTを得るようにし、この間のEWAでは第1
図(B)の実線の如く命令先取り数を減少しない。
In the first mode (referred to as the logical EOT mode), the magnetic tape drive unit l runs the magnetic tape 16, and the EW
When A is detected, the control unit CT counts the traveling distance of the magnetic tape from the time of EWA detection, and when the count value F and CTR reach a certain value EPTR, it is assumed that the tape end area has been detected and a pseudo EOT is obtained. , No. 1 in EWA during this period.
As shown by the solid line in Figure (B), the number of instructions prefetched is not reduced.

この疑似EOTは通常のEOT検出と同一の効果を持ち
、これによって、実際に磁気テープに設けられたEOT
マーカを検出することなく、それ以前にEOTの取扱い
が行われる。
This pseudo-EOT has the same effect as normal EOT detection, and thereby detects the EOT actually provided on the magnetic tape.
EOT handling occurs before that without detecting the marker.

この第1のモードにおいてEWA検出時点を疑似EOT
とせず、磁気テープ16の一定距離走行後に疑似EOT
検出とするが、これは、EWA検出機構がドライブのサ
ーボ制御機構を利用したものであり、EWA検出点を任
意の時点に少ない誤差で設定することができるだけの精
度を有さないためである。EWA検出精度を高めるため
にサ−水制御機構の精度を過剰に高4することは装置の
コスト上昇を招々。
In this first mode, the EWA detection point is set to pseudo EOT.
Pseudo EOT is performed after the magnetic tape 16 has traveled a certain distance.
This is because the EWA detection mechanism uses the servo control mechanism of the drive and does not have enough precision to set the EWA detection point at an arbitrary point in time with a small error. Increasing the accuracy of the water control mechanism excessively in order to improve EWA detection accuracy increases the cost of the device.

一方、第2のモード(フィジカルEOTモードと称す)
では、EWA検出から実際にEOTマーカを検出するま
でをアーリーウオーニングエリアEWAとし、この間の
EWAにおいて第1図(B)の点線の如く、先取りしう
る命令数を減少しようとするものである。
On the other hand, the second mode (referred to as physical EOT mode)
Here, the period from the EWA detection to the actual detection of the EOT marker is defined as an early warning area EWA, and the number of instructions that can be prefetched in EWA during this period is reduced as shown by the dotted line in FIG. 1(B).

この第1のモードと第2のモードに切換えはEWAにお
いて、第1のモードで動作途中にリード系命令実行によ
って第1のモードの実行が不能となった場合に行うと、
効率の良いストリーミング走行が実行できる。又、操作
パネルによってモードを選択するようにして、第1のモ
ードと第2のモードを選択してもよい。
Switching between the first mode and the second mode is performed in the EWA when execution of the first mode becomes impossible due to execution of a read-related command during operation in the first mode.
You can perform efficient streaming runs. Alternatively, the first mode and the second mode may be selected by selecting the mode using the operation panel.

〔作用〕[Effect]

本発明では、第1のモードでは論理的な疑似EOTを得
ているので、第X図(A)に示す如くEOT検出時点を
早くすることにより、TWAを長(できる。このため、
TWAに書込むことのできるブロック数が多くなるため
、第1図(B)の実線に示す如く、EWAにおけるライ
ト系命令の先取り数を減らす必要がなくなる。
In the present invention, since a logical pseudo-EOT is obtained in the first mode, the TWA can be lengthened by advancing the EOT detection time as shown in FIG.
Since the number of blocks that can be written to the TWA increases, there is no need to reduce the number of prefetching write instructions in the EWA, as shown by the solid line in FIG. 1(B).

従って、EWAにおいてもストリーミング走行を続行し
且つTWAにおいて全ての先取りライト系命令を実行で
きる。
Therefore, streaming can be continued in EWA and all prefetch write-related commands can be executed in TWA.

即ち、第1図(C)の実線の如く、EOT付近までは、
命令先取り数はできるだけ多(し、EOTが近づいたら
、書込み可能な数に減らすという理想的な先取り制御が
可能となる。
That is, as shown by the solid line in Figure 1 (C), up to the vicinity of EOT,
Ideal prefetch control is possible in which the number of instructions prefetched is as large as possible (and when the EOT approaches, the number is reduced to a writable number).

一方、第2のモードでは、通常と同様のEWAにおいて
、ライト系命令の蓄積可能数を制限するため、ライトデ
ータを伴わないイレーズ、ライトテープマーク等のライ
ト系命令も制限されるから、磁気テープ内に全てのライ
ト系命令の実行ができ、ライト系命令の処理不能を防止
することができる。
On the other hand, in the second mode, in the same EWA as normal, the number of write-related instructions that can be stored is limited, and write-related instructions such as erase and write tape mark that do not involve write data are also limited. All write-related instructions can be executed within the same time period, and inability to process write-related instructions can be prevented.

即ち、ライトデータを伴わないライト系命令であるイレ
ーズやライトテープマークも制限され、ライト系命令を
不当に制服することなく、第1図(C)の点線の如く、
先取ったライト系命令を全てTWA内に実行できる。
In other words, erase and write tape marks, which are write-related commands that do not involve write data, are also restricted, so that write-related commands can be written as shown in the dotted line in FIG.
All prefetched write instructions can be executed within the TWA.

〔実施例〕〔Example〕

(a)一実施例の全体構成の説明 第2図は、本発明の一実施例の説明のための全体構成図
である。
(a) Description of overall configuration of one embodiment FIG. 2 is an overall configuration diagram for explaining one embodiment of the present invention.

図中、第12図で示したものと同一のものは同一の記号
で示してあり、1はリール間直接駆動方式の磁気テープ
ドライブユニソト(以下ドライブと称す)であり、巻取
リール(マシンリール)11と供給リール(ファイルリ
ール)12の間に磁気テープ16がテンションアーム1
5のローラ15a、磁気ヘッド14、アイドラ13を介
して巻取リール11に至るよう構成され、磁気ヘッド1
4の両側ではガイド17a、17bによってガイドされ
ている。
In the figure, the same components as those shown in FIG. A magnetic tape 16 is placed between the tension arm 1 and the supply reel (file reel) 12.
5, the magnetic head 14, and the idler 13 are connected to the take-up reel 11.
4 is guided by guides 17a and 17b on both sides.

一方、巻取リール11、供給リール12は各々駆動モー
タ10a、10bによって回転駆動され、更に駆動モー
タ10a、10bにはロータリーエンコーダ18a、1
8bが設けられ駆動モータ10a、10bの回転量を検
出できるようにしている。又、アイドラ13にもロータ
リーエンコーダ19aが設けられ、これによって実際の
テープの走行位置の監視を可能とし、一方、テンション
アーム15には張力検出器19bが設けられ、テープ張
力の検出を可能としている。
On the other hand, the take-up reel 11 and the supply reel 12 are rotationally driven by drive motors 10a and 10b, respectively, and furthermore, the drive motors 10a and 10b have rotary encoders 18a and 18a.
8b is provided so that the amount of rotation of the drive motors 10a, 10b can be detected. The idler 13 is also provided with a rotary encoder 19a, which enables monitoring of the actual tape running position, while the tension arm 15 is provided with a tension detector 19b, which allows detection of tape tension. .

2はドライブ制御部であり、後述する命令・データ先取
り制御部からの命令及びデータによってテープ走行駆動
及びヘッド書込み又は読取り駆動を行うものであり、各
ロータリーエンコーダ18a、18b、19aの出力を
受けて走行状態を監視し、又張力検出器19bの出力よ
り張力を監視し、駆動回路20.21を介し再駆動モー
タ10a、LObを制御して、テープ張力を一定にしつ
つテープを走行駆動するとともに磁気ヘッド14にライ
トデータを与え書込みを行わせ且つ磁気ヘッド14から
のリードデータを受けるものである。
Reference numeral 2 denotes a drive control section, which drives tape running and drives head writing or reading according to commands and data from a command/data prefetch control section, which will be described later. The running condition is monitored, and the tension is monitored from the output of the tension detector 19b, and the re-drive motors 10a and LOb are controlled via the drive circuits 20 and 21 to drive the tape to run while keeping the tape tension constant. It supplies write data to the head 14 to perform writing, and receives read data from the magnetic head 14.

3は命令・データ先取り制御部であり、ホストコントロ
ーラからのライト系又はリード系の命令及びライトデー
タを受け、これらを蓄え、ライト系命令ならドライブ制
御部2ヘライト命令及びライトデータを送り、ライト動
作せしめ、且つ正常終了なら次のブロックのライト命令
及びライトデータを送り、正常終了でなければドライブ
制御部2ヘライトリトライ動作せしめるものである。
3 is a command/data prefetch control unit which receives write or read commands and write data from the host controller, stores them, and if it is a write command, sends a write command and write data to the drive control unit 2, and performs a write operation. If the process ends normally, the write command and write data for the next block are sent, and if the process does not end normally, the drive control unit 2 is caused to perform a write retry operation.

命令・データ先取り制御部3は、後述する命令バッファ
とデータバッファを有し、ホストコントローラに対して
は磁気テープ装置として動作し、ドライブ制御部2に対
してはホストコントローラとして動作するアダプタであ
る。
The command/data prefetch control section 3 has an instruction buffer and a data buffer, which will be described later, and is an adapter that operates as a magnetic tape device for the host controller and as a host controller for the drive control section 2.

(1))先取り制御部の構成の説明 第3図は第2図構成における要部、即ち、命令データ先
取り制御部3の構成図である。
(1)) Description of structure of prefetch control section FIG. 3 is a block diagram of the main part in the structure of FIG. 2, that is, the instruction data prefetch control section 3.

図中、30はマイクロプロセッサ(以下MPUと称す)
であり、後述するプログラムメモリのマイクロプログラ
ムに従ってホストコントローラからの命令及びデータの
受信制御及びデータ、ステータスの送信制御を行うとと
もに、ドライブ制御部2へ命令、データの送信制御及び
ドライブ制御部からのデータ、ステータスの受信制御を
行い、更にドライブ1の状態制御の処理を行うもの、3
1aはプログラムメモリであり、MPU30が実行すべ
きプログラムを格納しておくもの、31bはランダムア
クセスメモリ (以下RAMと称す)であり、MPU3
0の処理に必要な各種データ、命令、パラメータを格納
しておくものであり、命令バッファエリアCBUF、命
令バッファ管理エリアCA及びデータバッファ管理エリ
アDA、各種モード管理エリアEA、リード命令レジス
タRCを有するものである。
In the figure, 30 is a microprocessor (hereinafter referred to as MPU)
It controls the reception of commands and data from the host controller and the transmission of data and status according to the microprogram in the program memory described later, and also controls the transmission of commands and data to the drive control unit 2 and sends data from the drive control unit. , which performs status reception control and also processes the state control of drive 1, 3
1a is a program memory that stores programs to be executed by the MPU 30; 31b is a random access memory (hereinafter referred to as RAM);
It stores various data, instructions, and parameters necessary for processing 0, and has an instruction buffer area CBUF, an instruction buffer management area CA, a data buffer management area DA, various mode management areas EA, and a read instruction register RC. It is something.

命令バッファエリアCBUFには、ライト系コマンド時
には、ホストコントローラから先取りした命令及びその
命令により転送されたデータのデータバッファ内の先頭
アドレス、バイトカウント数などがリード系コマンド時
には先読みしたブロックのリード実行結果、リードデー
タのデータバッファ内の先頭アドレス、バイト数などが
格納され、命令バッファ管理エリアCAには、命令記憶
数CBSTKと、ハフ 7 yサイズCB51ZEと、
最終制限値CBEが格納される。命令記憶数CBSTK
としては、ライト系コマンド時には、命令バッファエリ
アCBUFに記憶され、未だ実行されていない先取り命
令数が、リード系コマンド時−には先読みブロック数が
格納され、バッファサイズCBS i ZEは、命令バ
ッファエリアCBUFの大きさを命令数で示したもので
あり、最終制限値は、ロジカルEOTモードでない時の
フィジカルEOTモード時のEWAにおけるライト系命
令先取り数の最終制限値である。
The instruction buffer area CBUF contains the command prefetched from the host controller and the start address and byte count in the data buffer of the data transferred by the command in the case of a write command, and the read execution result of the prefetched block in the case of a read command. , the start address in the data buffer of read data, the number of bytes, etc. are stored, and the instruction buffer management area CA contains the number of stored instructions CBSTK, the Hough 7y size CB51ZE,
The final limit value CBE is stored. Instruction memory number CBSTK
For a write type command, the number of prefetched instructions that have not yet been executed is stored in the instruction buffer area CBUF, and for a read type command, the number of prefetched blocks is stored, and the buffer size CBS i ZE is stored in the instruction buffer area CBUF. The size of the CBUF is expressed by the number of instructions, and the final limit value is the final limit value for the number of write-related instructions prefetched in EWA in the physical EOT mode when not in the logical EOT mode.

データバッファ管理エリアDAには、データバッファの
空き容量を単位数(I KByte  単位)で示すバ
ッファ空き容量FSEGと、データバッファへの書込み
を行うデータ転送時のデータバッファの先頭アドレスを
示すバッファアドレスBADRと、処理の対象となるデ
ータブロックの最大径を示す最大ブロック長MAXLと
が格納される。
The data buffer management area DA contains a buffer free capacity FSEG indicating the free capacity of the data buffer in units (I KByte) and a buffer address BADR indicating the start address of the data buffer at the time of data transfer for writing to the data buffer. and a maximum block length MAXL indicating the maximum diameter of the data block to be processed.

モード管理エリアEAには、口〜トポインドからの書込
み時の記録密度(1600rpi又は6250rpi)
を決定するための書込み記録密度とロジカルEOTモー
ドであることを示すLEOTフラグと、ロジカルEOT
モード時にEWA検出後のテープ走行距離を格納する走
行カウンタECTRが格納される。
The mode management area EA has recording density (1600rpi or 6250rpi) when writing from the beginning to the end point.
The write recording density to determine the logical EOT mode, the LEOT flag indicating the logical EOT mode, and the logical EOT
In the mode, a travel counter ECTR is stored which stores the tape travel distance after EWA detection.

32aはドライブインターフェイス回路であり、ドライ
ブ制御部2との間で制御信号等のやりとりを行うための
もの、32bはホストインターフェイス回路であり、ホ
ストコントローラとの間で制御信号等のやりとりをする
もの、33はデータ転送制御回路であり、後述するデー
タバッファを制御してホストコントローラ或いはドライ
ブ制御部2との間のデータ転送を制御するものであり、
ホストコントローラへデータ転送要求信号を発し且つド
ライブ制御部2からのデータ転送要求信号を受はデータ
転送制御を行うものであり、データバッファへのストア
アドレスカウンタ5CTR,データバッファからのロー
ドアドレスカウンタLCTR,バンファロード時のバイ
トカウンタBCTRなどを有するものである。
32a is a drive interface circuit for exchanging control signals and the like with the drive control unit 2; 32b is a host interface circuit for exchanging control signals and the like with the host controller; 33 is a data transfer control circuit that controls a data buffer to be described later to control data transfer with the host controller or drive control unit 2;
The device that issues a data transfer request signal to the host controller and receives the data transfer request signal from the drive control unit 2 performs data transfer control, and includes a store address counter 5CTR to the data buffer, a load address counter LCTR from the data buffer, It has a byte counter BCTR and the like during buffer loading.

34はデータバッファであり、データ転送制御回路33
によって制御され、ホストコントローラからのライトデ
ータを蓄え、ドライブ制御部2へ転送し、逆にドライブ
制御部2からのリードデータを蓄え、ホストコントロー
ラへ転送するためのものであり、例えば256キロバイ
トの容量を持つもの、35はデータバスであり、MPU
30とプログラムメモリ31 a、RAM3 l b、
  ドライブインターフェイス回路32a、ホストイン
ターフェイス回路32b、データ転送制御回路33とを
接続しコマンド、データのやりとりを行うものである。
34 is a data buffer, and the data transfer control circuit 33
It stores write data from the host controller and transfers it to the drive control unit 2, and conversely stores read data from the drive control unit 2 and transfers it to the host controller. For example, it has a capacity of 256 kilobytes. The one with 35 is the data bus, and the MPU
30, program memory 31 a, RAM3 l b,
The drive interface circuit 32a, host interface circuit 32b, and data transfer control circuit 33 are connected to exchange commands and data.

36aは制御信号線であり、ドライブ制御部2ヘコマン
ド等を送信し、逆にドライブ制御部2からステータス等
を受信するためのもの、36bはテープエンド近傍領域
検出信1号線であり、ドライブ制御部2からのテープエ
ンド近傍領域検出(EWA)信号の転送のためのもの、
36cは割込み線であり、ドライブインターフェイス回
路32aよりMPU30へ割込みを通知するもの、37
aはデータ転送制御信号線であり、ドライブ制御部2か
らデータ転送要求信号をデータ転送制御回路33へ伝え
、データ転送終了信号をドライブ制御部2へ伝えるため
のもの、37bはライトデータバスであり、データバッ
ファ34からライトデータをドライブ制御部2へ伝える
ためのもの、37Cはリードデータバスであり、ドライ
ブ制御部2からのリードデータをデータバッファ34へ
伝えるためのもの、38は制御信号線であり、ホストコ
ントローラとコマンド、ステータスのやリトリを行うた
めのもの、39aはデータ転送制御信号線であり、ホス
トコントローラへデータ転送要求信号を伝え、ホストコ
ントローラからのデータ転送終了信号を伝えるためのも
の、39bはライトデータバスであり、ホストコントロ
ーラからのライトデータをデータバッファ34へ伝える
ための、もの、39cはす=ドデータバスであり、ホス
トコントローラへデータバッファ34からリードデータ
を伝えるためのものである。
36a is a control signal line for transmitting commands etc. to the drive control unit 2 and conversely receiving status etc. from the drive control unit 2; 36b is a tape end vicinity area detection signal line 1; 2 for the transfer of tape end near area detection (EWA) signals from
36c is an interrupt line that notifies the MPU 30 of an interrupt from the drive interface circuit 32a; 37;
37b is a data transfer control signal line for transmitting a data transfer request signal from the drive control unit 2 to the data transfer control circuit 33 and a data transfer end signal to the drive control unit 2; 37b is a write data bus; , 37C is a read data bus for transmitting write data from the data buffer 34 to the drive control unit 2, 38 is a control signal line. 39a is a data transfer control signal line, which is used to transmit a data transfer request signal to the host controller and a data transfer end signal from the host controller. , 39b is a write data bus for transmitting write data from the host controller to the data buffer 34, and 39c is a write data bus for transmitting read data from the data buffer 34 to the host controller. .

従って、MPU30はデータバス35を介しRAM3 
l b、ホストインターフェイス回路32b1ドライブ
インターフエイス回路32a、データ転送制御回路33
との間で書込み、読出しを行い、所望の処理を行う。
Therefore, the MPU 30 connects the RAM 3 via the data bus 35.
l b, host interface circuit 32b1 drive interface circuit 32a, data transfer control circuit 33
Write and read between the two and perform the desired processing.

即ち、ホストコントローラと制御信号線38を介しMP
U30の制御によりホストインターフェイス回路32b
がコマンド、ステータスのやりとりを行い、ドライブ制
御部2と制御信号線36aを介しMPU30の制御によ
りドライブインターフェイス回路32aがコマンド、ス
テータスのやりとりを行う。
That is, the MP
The host interface circuit 32b is controlled by U30.
The drive interface circuit 32a exchanges commands and status with the drive control unit 2 under the control of the MPU 30 via the control signal line 36a.

一方、MPU30の指示によりデータ転送制御回路33
が、データ転送制御信号線39aを介しホストコントロ
ーラにデータ転送要求を発し、これに応じてホストコン
トローラはライトデータをライトデータバス39bを介
しデータバッファ34へ送り、蓄積せしめる。又、ドラ
イブ制御部2からのデータ転送制御信号線37aのデー
タ転送要求により、データ転送制御回路33はライトデ
ータバス37bを介しデータバッファ34のライトデー
タをドライブ制御部2へ発する。
On the other hand, the data transfer control circuit 33
issues a data transfer request to the host controller via the data transfer control signal line 39a, and in response, the host controller sends write data to the data buffer 34 via the write data bus 39b to be stored therein. Further, in response to a data transfer request from the drive control section 2 on the data transfer control signal line 37a, the data transfer control circuit 33 issues write data from the data buffer 34 to the drive control section 2 via the write data bus 37b.

更に、データ転送制御回路33はMPU30の指示によ
りドライブ制御部2からリードデータバス37cを介す
るリードデータをデータバッファ34に蓄え、ホストコ
ントローラへリードデータバス39cを介しデータバッ
ファ34のリードデータを送信する。
Furthermore, the data transfer control circuit 33 stores read data from the drive control unit 2 via the read data bus 37c in the data buffer 34 according to instructions from the MPU 30, and transmits the read data from the data buffer 34 to the host controller via the read data bus 39c. .

尚、ドライブ制御部2は、ロータリーエンコーダ19a
による走行位置の監視によってテープ終端領域近傍を検
出してEWA信号を信号線36bに発し、EOT検出に
よってTWA信号を信号線36aに発する。
Note that the drive control section 2 includes a rotary encoder 19a.
By monitoring the running position, the vicinity of the tape end area is detected and an EWA signal is issued to the signal line 36b, and when EOT is detected, a TWA signal is issued to the signal line 36a.

このような先取り制御部3とホストコントローラ、デバ
イス1間のインターフェイスは、第4図(A)に示す如
く、ホストコントローラからの起動信号GOとコマンド
信号が与えられることによってMPU30はホストイン
ターフェイス回路32bを介し応答信号FBYをホスト
コントローラへ返答し、更にコマンド実行中を示すデー
タビジーDBYをホストコントローラへ与える。
As shown in FIG. 4(A), such an interface between the preemption control unit 3, the host controller, and the device 1 is such that the MPU 30 activates the host interface circuit 32b by receiving the activation signal GO and command signal from the host controller. A response signal FBY is sent to the host controller via the host controller, and a data busy DBY indicating that the command is being executed is given to the host controller.

コマンド信号がデータ転送を伴うライト系コマンドなら
、データ転送制御回路33からホストコントローラへラ
イトストローブパルスWSTBを与えて、ホストコント
ローラからはライトストローブパルスWSTHに同期し
てライトデータが転送され、データバッファに順次格納
される。ホストコントローラは最終のライトデータと同
時にラストワード信号LWDをデータ転送制御回路33
へ送出し、制御回路33はこのラストワード信号LWD
を検出するとライトストローブパルスWSTBの送出を
止め、データ転送を終了し、受信動作の正常/異常を示
すステータス信号をホストコントローラへ与え、データ
ビジーDBYをオフしてライトデータの転送動作を終了
する。尚、受信コマンドは命令バッファCBUFに格納
される。
If the command signal is a write-related command that involves data transfer, the data transfer control circuit 33 gives a write strobe pulse WSTB to the host controller, and the host controller transfers the write data in synchronization with the write strobe pulse WSTH to the data buffer. Stored sequentially. The host controller sends the last word signal LWD to the data transfer control circuit 33 at the same time as the final write data.
The control circuit 33 sends this last word signal LWD to
When detected, it stops sending out the write strobe pulse WSTB, ends the data transfer, gives a status signal indicating normality/abnormality of the reception operation to the host controller, turns off the data busy DBY, and ends the write data transfer operation. Note that the received command is stored in the command buffer CBUF.

一方、コマンドがリードコマンドなら、テープドライブ
1から読取ったリードデータをリードストローブパルス
RSTBとともにホストコントローラへ転送する。リー
ドデータ転送の終了はデータビジーDBYをオフするこ
とによってホストコントローラへ通知される。
On the other hand, if the command is a read command, the read data read from the tape drive 1 is transferred to the host controller together with the read strobe pulse RSTB. The end of the read data transfer is notified to the host controller by turning off the data busy DBY.

このようなインターフェイス手順は、第4図(B)に示
す如く先取り部3とドライブ1との間も同一であり、先
取り部3の命令バッファCBUF、データバッファ34
がフルの状態では、ホストコントローラからGO倍信号
ライトコマンドが到来してもバッファCBUF、データ
バッファ34が空くまでデータビジーDBYを上げない
ようにしてデータ転送を待たせるようにしている。
Such an interface procedure is the same between the prefetch unit 3 and the drive 1 as shown in FIG. 4(B), and the instruction buffer CBUF and data buffer 34 of the prefetch unit 3
In the full state, even if a GO double signal write command arrives from the host controller, the data busy DBY is not raised until the buffer CBUF and data buffer 34 are free, so that data transfer is made to wait.

(C1一実施例の起動処理動作の説明 第5図は本発明の一実施例動作の起動処理フロー図、第
6図は第5図における初期設定処理フロー図である。
(Explanation of startup processing operation of C1 embodiment) FIG. 5 is a startup processing flow diagram of an embodiment of the present invention, and FIG. 6 is an initialization processing flowchart in FIG. 5.

■電源が投入されると、MPU30はドライブインター
フェイス回路32aを介し、ドライブの書込み記録密度
設定を調べ、RAM3 l bのエリアEAの書込み記
録密度にドライブの書込み記録密度設定を記憶する。そ
して第6図(A)の初期設定処理(1)を行う。
(2) When the power is turned on, the MPU 30 checks the write recording density setting of the drive via the drive interface circuit 32a, and stores the write recording density setting of the drive in the write recording density of the area EA of the RAM 3 lb. Then, the initial setting process (1) shown in FIG. 6(A) is performed.

即ち、MPU30はRAM31の命令バッファ管理エリ
アCAの命令記憶数CBSTKを零クリアし、データバ
ッファ管理エリアDAのバッファ空き容量FSEGを最
大の256単位(256KByte)とし、データバッ
ファアドレスBADRを“00”に設定する。
That is, the MPU 30 clears the instruction storage number CBSTK in the instruction buffer management area CA of the RAM 31 to zero, sets the buffer free capacity FSEG in the data buffer management area DA to the maximum of 256 units (256 KB), and sets the data buffer address BADR to "00". Set.

更に、データバッファ管理エリアDAの最大ブロック長
MAILを最小の8単位(8KByte)に設定し、エ
リアEAのロジカルEOTモードフラグをオフとして初
期設定(1)を終了する。
Furthermore, the maximum block length MAIL of the data buffer management area DA is set to the minimum 8 units (8 KB), and the logical EOT mode flag of the area EA is turned off to complete the initial setting (1).

■次に電源投入時あるいはREW命令、UNL命令実行
後の初期設定終了後又はホストからの起動待ちルーチン
において、MPU30はバス35を介しドライブインタ
ーフェイス回路32aを介し磁気テープが供給リール1
2にセットされたオンライン状態にあるかを調べる。
■Next, when the power is turned on, after the initial settings are completed after executing the REW command or the UNL command, or in the startup waiting routine from the host, the MPU 30 sends the magnetic tape to the supply reel 1 via the bus 35 and the drive interface circuit 32a.
Check whether it is in the online state set to 2.

オンライン状態にあれば、MPU30はバス35を介し
ホストインターフェイス回路32bのレジスタの内容を
調べ、ホストからREW (リワインド)命令又はUN
L (アンロード)命令が到来しているかを調べる。
If the MPU 30 is in the online state, the MPU 30 checks the register contents of the host interface circuit 32b via the bus 35, and receives a REW (rewind) command or UN from the host.
Check whether an L (unload) command has arrived.

■REW命令又はUNL命令が到来していれば、MPU
30はドライブ制御部2の実行処理モードがリード系か
、ライト系か又は実行中でないかを調べる。
■If a REW command or UNL command has arrived, the MPU
30 checks whether the execution processing mode of the drive control unit 2 is read type, write type, or not being executed.

実行処理モードがリード系なら、ドライブ1の先読みを
停止させる。即ち、ドライブ制御部2が実行中の処理を
終了したならばドライブインターフェイス回路32aを
介し制御線36aよりドライブ制御部2に、新たな処理
を命じないようにし、リード系処理を停止させる。
If the execution processing mode is read type, pre-reading of drive 1 is stopped. That is, when the drive control section 2 finishes the process being executed, the drive control section 2 is not instructed to perform any new processing via the control line 36a via the drive interface circuit 32a, and the read-related processing is stopped.

一方、実行処理モードがライト系なら、命令バッファC
BUF内の全てのライト系命令を実行させる。
On the other hand, if the execution processing mode is write, the instruction buffer C
Executes all write instructions in the BUF.

そして、全命令の実行後、実行中の処理なしの場合又は
ドライブの先読み処理の停止後、MPU30はドライブ
インターフェイス回路32aを介しREW命令(テープ
をBOTまで戻す)又はUNL命令(テープを巻取る)
を与えてドライブ1にこれを実行させ、ステップ■の初
期設定+1)へ戻る。
Then, after all instructions have been executed, if there is no process being executed, or after the prefetch process of the drive has stopped, the MPU 30 sends a REW instruction (returns the tape to BOT) or a UNL instruction (winds up the tape) via the drive interface circuit 32a.
is given to drive 1 to execute this, and the process returns to step (2) initialization +1).

■一方、REW命令又はUNL命令が到来していないと
、MPU30はバス35を介しホストインターフェイス
回路32bのレジスタの内容を調べ、ホストからの起動
(G O)があるかを調べる。
(2) On the other hand, if the REW instruction or UNL instruction has not arrived, the MPU 30 checks the contents of the register of the host interface circuit 32b via the bus 35 to see if there is activation (GO) from the host.

ホストからの起動がなければ、起動待ちとなり、ステッ
プ■へ戻る。
If there is no activation from the host, the process waits for activation and returns to step (■).

■ホストからの起動あり、即ちGO信号受信と判断する
と、MPU30はバス35を介しホストインターフェイ
ス回路32bのレジスタの内容を調べ、与えられた命令
が何かを判断する。
(2) When it is determined that there is activation from the host, that is, a GO signal has been received, the MPU 30 checks the contents of the register of the host interface circuit 32b via the bus 35, and determines what the given command is.

与えられた命令がリード系ならステップ[相]へ、記録
密度設定ならステップ■へ進み、その処理ルーチンを実
行する。
If the given command is a read-related command, the process goes to step [phase], and if it is a recording density setting, goes to step (2) to execute the processing routine.

■命令が記録密度設定なら、MPU30はホストインタ
ーフェイス回路32bを介しデータビジーDBYをオン
として通知し、更にドライブインターフェイス回路32
aを介しドライブ1の磁気テープ16がロードポイント
LDP、即ちBOTの位置にあるかを調べる。
■If the command is recording density setting, the MPU 30 notifies the host interface circuit 32b that the data busy DBY is turned on, and also notifies the drive interface circuit 32
It is checked whether the magnetic tape 16 of the drive 1 is located at the load point LDP, ie, BOT, via a.

ロードポイントLDPにあれば、記録密度設定命令が有
効であるので、MPU30はドライブインターフェイス
回路32aを介し、ドライブに対して記録密度設定命令
を実行した後に、RAM3ibのエリアEAの書込み記
録密度にホストから指示された記録密度をセントする。
If it is at the load point LDP, the recording density setting command is valid, so the MPU 30 executes the recording density setting command to the drive via the drive interface circuit 32a, and then changes the write recording density of the area EA of the RAM 3ib from the host. Cent the indicated recording density.

ロードポイン)LDPになければ、記録布゛度設定命令
は無効でありドライブに対する記録密度設定命令の実行
及び書込み記録密度のセントは必要ない。
(Load point) If it is not in the LDP, the recording density setting command is invalid, and there is no need to execute the recording density setting command to the drive and write recording density cents.

その後、MPU30はホストインターフェイス回路32
bを介しホストへ終了報告し、データビジーDBYをオ
フして、ステップ■へ戻る。
After that, the MPU 30 uses the host interface circuit 32
A completion report is sent to the host via b, the data busy DBY is turned off, and the process returns to step (2).

■一方、与えられた命令がライト系なら、MPU30は
ドライブ制御部2の実行処理モードがリード系か、ライ
ト系か又は実行中でないかを調べる。
(2) On the other hand, if the given command is a write type command, the MPU 30 checks whether the execution processing mode of the drive control section 2 is read type, write type, or is not currently being executed.

実行処理モードがリード系なら、ドライブ1の先読み処
理を停止させる。即ち、ドライブ制御部2が実行中の処
理を終了したならばドライブインターフェイス回路32
aを介し制御線36aよりドライブ制御部2に、新たな
処理を命じないようにし、リード系処理を停止させる。
If the execution processing mode is read type, the preread processing of drive 1 is stopped. That is, when the drive control unit 2 finishes the process being executed, the drive interface circuit 32
The drive control section 2 is not instructed to perform new processing from the control line 36a via the control line 36a, and the read-related processing is stopped.

次に、第6図(B)の初期設定(2)を実行し、MPU
30はRAM31bの命令バッファ管理エリアCAの命
令記憶数CBSTKを零クリアし、データバッファ管理
エリアDAのバッファ空き容量FSEGを最大の256
とし、データバッファアドレスBADRを′00″に設
定する。
Next, execute the initial setting (2) in FIG. 6(B), and
30 clears the instruction storage number CBSTK of the instruction buffer management area CA of the RAM 31b to zero, and sets the buffer free capacity FSEG of the data buffer management area DA to the maximum of 256.
and set the data buffer address BADR to '00''.

■このステップ■の終了後又はドライブ制御部2が実行
中でなければ、第6図(C)の初期設定(3)のバッフ
1サイズのセントを行う。
(2) After completing this step (2) or if the drive control unit 2 is not in execution, the buffer 1 size cents in the initial setting (3) of FIG. 6(C) is performed.

先づ、MPU30は、ドライブインターフェイス回路3
2aを介し信号線36bのEWA (テープ終端近傍領
域)信号がオンかオフかを調べ、オフ(未だテープ終端
近傍領域へ到っていない)なら、RAM3 l bのエ
リアEAのLIF、OTモードフラグをオンし、走行カ
ウンタECTRを零クリアする。
First, the MPU 30 is a drive interface circuit 3.
Check whether the EWA (area near the end of the tape) signal on the signal line 36b is on or off via the signal line 2a, and if it is off (has not yet reached the area near the end of the tape), set the LIF and OT mode flags in area EA of RAM3 lb. Turn on and clear the travel counter ECTR to zero.

一方、EWA信号がオンなら、RAM3 l bOLE
OTモードフラグがオン(YES)、オフ(No)かを
調べ、オフなら、命令バッファ管理エリアCAの最終制
限値CBEをバッファサイズCBS i ZEへ移し、
リターンする。
On the other hand, if the EWA signal is on, RAM3 l bOLE
Check whether the OT mode flag is on (YES) or off (No), and if it is off, move the final limit value CBE of the instruction buffer management area CA to the buffer size CBS i ZE,
Return.

逆にLEOTモードフラグがオン又は前述の走行カウン
タECTRの零クリア後、MPU30は、RAM3 l
 bの命令バッファ管理エリアCAのバッファサイズC
BS i ZHに最大値のr64J ヲセットし、リタ
ーンする。
Conversely, after the LEOT mode flag is turned on or the aforementioned travel counter ECTR is cleared to zero, the MPU 30 controls the RAM 3
Buffer size C of instruction buffer management area CA of b
Set the maximum value r64J to BS i ZH and return.

次に、MPU30はテープ位置を調整すべく、ドライブ
制御部2にテープ位置調整のための命令(スペースまた
はバックスペース)をドライブインターフェイス回路3
2aを介し命じる。
Next, in order to adjust the tape position, the MPU 30 sends a tape position adjustment command (space or backspace) to the drive control unit 2 to the drive interface circuit 3.
Command via 2a.

そして第7図の後述するライト系処理ルーチンへ進む。The program then proceeds to a write-related processing routine in FIG. 7, which will be described later.

■一方、ステップ■で実行処理モードがライト系なら直
ちにライト系処理ルーチンへ進む。
(2) On the other hand, if the execution processing mode is write type in step (2), the process immediately proceeds to the write type processing routine.

[相]ステップ■で転送された命令がリード系なら、M
PU30はドライブ制御部2の実行処理モードがリード
系か、ライト系か又は実行中でないかを調べる。
[Phase] If the instruction transferred in step ■ is a read type, M
The PU 30 checks whether the execution processing mode of the drive control unit 2 is read type, write type, or not currently being executed.

実行処理モードがリード系なら、MPU30は先づリー
ド方向が一致しているかを調ベリード方向不一致ならド
ライブ1の先読み処理を停止させる。即ち、ドライブ制
御部2が実行中の処理を終了したならばドライブインタ
ーフェイス回路32aを介し制御線36aよりドライブ
制御部2に、新たな処理を命じないようにし、リード系
処理を停止させる。
If the execution processing mode is a read system, the MPU 30 first checks whether the read directions match and stops the preread processing of the drive 1 if the read directions do not match. That is, when the drive control section 2 finishes the process being executed, the drive control section 2 is not instructed to perform any new processing via the control line 36a via the drive interface circuit 32a, and the read-related processing is stopped.

更に、MPU30はステップ■と同一の初期設定(2)
を実行し、次にステップ■と同一のテープ位置調整を行
う。
Furthermore, the MPU 30 has the same initial settings as step ■ (2)
, and then perform the same tape position adjustment as in step (3).

一方、実行処理モードがライト系なら、命令バッファC
BUF内の全ての命令を実行させる。
On the other hand, if the execution processing mode is write, the instruction buffer C
Execute all instructions in BUF.

そして、全命令の実行後、実行中の処理なしの場合又は
ドライブ処理の停止後、前述の先読みリード系命令をR
AM3 l bのリード命令レジスタRCにセットする
Then, after all instructions have been executed, if there is no process being executed, or after the drive process has stopped, the above-mentioned prefetch read instruction is
Set in read command register RC of AM3 lb.

そして、このセット後又は、リード方向一致なら、第8
図のリード系処理ルーチンへ進む。
After this set or if the lead direction matches, the 8th
Proceed to the read-related processing routine shown in the figure.

従って、ホストからの起動がライト系コマンドであれば
、リード系処理中でも、ライト系処理に切換わり、ライ
ト系処理なら、ライト系処理を続行する。
Therefore, if the activation from the host is a write-related command, even if read-related processing is in progress, it switches to write-related processing, and if it is write-related processing, write-related processing is continued.

そして初期設定(1)で最大ブロック長MAXLは最小
の8単位に、初期設定(1)又は(2)で命令記憶数C
BSTKは零、データバッファ空き容量FSEGは最大
の256、データバッファアドレスBADRは(OO)
に、更に初期設定(3)でバッファサイズCBS i 
ZEは、LEOTモードのオン/オフに応じ、最大の6
4又は最終制限値CBEにセットされる。
In the initial setting (1), the maximum block length MAXL is set to the minimum unit of 8, and in the initial setting (1) or (2), the instruction memory number C
BSTK is 0, data buffer free space FSEG is maximum 256, data buffer address BADR is (OO)
In addition, in the initial setting (3), the buffer size CBS i
ZE is up to 6 depending on LEOT mode on/off.
4 or the final limit value CBE.

又、ロードポイントLDPからの書込み時における記録
密度がRAM31bのエリアEAに設定される。
Also, the recording density at the time of writing from the load point LDP is set in area EA of the RAM 31b.

(d1対ホスト処理動作の説明 第7図は対ホストライト系処理フロー図である。(Explanation of d1 vs. host processing operation FIG. 7 is a flowchart of host write system processing.

■MPU30は第5図によってホストコントローラから
ライト系コマンドによって起動されると、ライト系コマ
ンドが格納可能かを調べるため、RAM31bの命令バ
ッファ管理エリアCAの命令記憶数CBSTKと命令バ
ッファサイズCB51ZEをバス35を介し読み出し比
較する。CB51ZE≦CBSTK、即ち記憶可能な命
令数までライト系命令が命令バッファCBUFに格納さ
れていると、命令バッファCBUFへのライト系コマン
ドの格納を保留する。
■When the MPU 30 is activated by a write command from the host controller as shown in FIG. Read and compare via . If CB51ZE≦CBSTK, that is, the write-related commands are stored in the instruction buffer CBUF up to the number of instructions that can be stored, storage of the write-related commands in the instruction buffer CBUF is suspended.

一方、CBS i ZE>CBSTKであれば、ライト
系命令の命令バッファCBUFへの格納可能なため、M
PU30は係るライト系命令がデータバッファ34を使
用するものかどうかを調べる。
On the other hand, if CBS i ZE>CBSTK, write instructions can be stored in the instruction buffer CBUF, so M
The PU 30 checks whether the write-related instruction uses the data buffer 34 or not.

イレーズ、ライトテープマークのデータバッファ34を
使用しないものであれば、データビジーDBYをオンと
し、ステップ■の最終制限値CBHの初期設定ステップ
に進む。
If the erase/write tape mark data buffer 34 is not to be used, the data busy DBY is turned on and the process proceeds to step (2), the step of initializing the final limit value CBH.

第5図(A)で示した如く上位(ホスト)から起動(G
O)とコマンドが与えられると、下位(先取り制御部3
)はその命令が実行可能なら、実行中であることを示す
データビジーDBY信号をオンとし上位へ返す。この関
係は先取り制御部3を上位とし、ドライブ制御部2を下
位とした場合も同様である。
As shown in Figure 5 (A), the startup (G
When the command O) is given, the lower order (preemption control unit 3
) turns on the data busy DBY signal indicating that the instruction is being executed and returns it to the upper level. This relationship is the same even when the prefetch control section 3 is placed at the upper level and the drive control section 2 is placed at the lower level.

逆に、MPU30はライト系命令がデータバッファ34
を使用する通常のライト命令であると、データバラフナ
34への自動転送の許可判断を行う。
Conversely, the MPU 30 writes write instructions to the data buffer 34.
If it is a normal write command using , it is determined whether automatic transfer to the data barafuna 34 is permitted.

即ち、先づ、MPU30はRAM31bのデータバッフ
ァ管理エリアDAの空きバッファ容量FSEGと最大ブ
ロック長MAXLを読出し、空きバッファ容量FSEG
が最大ブロック長MAXL以上か否かを調べる。空きバ
ッファ容量FSEGが最大ブロック長MAXL以下なら
、ライトデータの受信を保留し、データバッファ34が
最大ブロック長MAXL分空くまで待ち、空きバッファ
容量FSEGが最大ブロック長MAXL以上なら、転送
許可する。従って、前述のデータビジーDBY信号をオ
ンとして、ホストコントローラへ転送可を通知する。
That is, first, the MPU 30 reads the free buffer capacity FSEG and the maximum block length MAXL of the data buffer management area DA of the RAM 31b, and reads the free buffer capacity FSEG.
Check whether or not is greater than or equal to the maximum block length MAXL. If the free buffer capacity FSEG is less than or equal to the maximum block length MAXL, reception of write data is suspended and waits until the data buffer 34 becomes free by the maximum block length MAXL, and if the free buffer capacity FSEG is greater than or equal to the maximum block length MAXL, transfer is permitted. Therefore, the aforementioned data busy DBY signal is turned on to notify the host controller that transfer is possible.

[F]次に、MPU30は、ドライブインターフェイス
回路32aを介しドライブ1の磁気テープ16がロード
ポイン1−LDPの位置にあるかを調べる。
[F] Next, the MPU 30 checks whether the magnetic tape 16 of the drive 1 is located at the load point 1-LDP via the drive interface circuit 32a.

ロードポイントLDPの位置になければ、既に最終制限
値CBEはセットされているので、次の自動転送ステッ
プ■へ進む。一方、ロードポイントLDPの位置にあれ
ば、書込み記録密度によって最終制限値CBEの初期セ
ットを行う。
If it is not at the load point LDP, the final limit value CBE has already been set, and the process proceeds to the next automatic transfer step (2). On the other hand, if it is at the load point LDP, the final limit value CBE is initialized according to the write recording density.

即ち、MPU30は、RAM31bのモードエリアEA
の書込み記録密度を調べ、書込み記録密度が1600r
piなら、RAM3 l bの命令バッファ管理エリア
CAの最終制限値CBEに「8」を、6250rptな
ら同様に最終制限値CBEに「16」を初期セットし、
ステップ■に進む。
That is, the MPU 30 uses the mode area EA of the RAM 31b.
Check the write recording density of , and find that the write recording density is 1600r
For pi, the final limit value CBE of the instruction buffer management area CA of RAM3 lb is initially set to ``8'', and for 6250rpt, the final limit value CBE is initially set to ``16''.
Proceed to step ■.

0次に、MPU30は係るライト系命令がデータバッフ
ァ34を使用するものかどうかを調べる。
Next, the MPU 30 checks whether the write-related instruction uses the data buffer 34 or not.

データバッファ34を使用しないものなら、ステップ[
F]の命令格納ステップへ進む。
If the data buffer 34 is not used, step [
Proceed to the instruction storage step of [F].

一方、データバッファ34を使用するものなら、データ
転送を実行する。
On the other hand, if the data buffer 34 is used, data transfer is executed.

即ち、MPU30は、RAM3 l bのデータバッフ
ァ管理エリアDAの先頭バッファアドレスBADRを読
出し、データ転送制御回路33のストアアドレスカウン
タ5CTRにセットし、データ転送制御回路33を起動
する。これによってデータ転送制御回路33はデータ転
送制御信号線39aよりデータ転送要求をホストコント
ローラへ発する。
That is, the MPU 30 reads the first buffer address BADR of the data buffer management area DA of the RAM 3 lb, sets it in the store address counter 5CTR of the data transfer control circuit 33, and activates the data transfer control circuit 33. As a result, the data transfer control circuit 33 issues a data transfer request to the host controller via the data transfer control signal line 39a.

従って、ホストコントローラはライトデータをライトデ
ータバス39bよりデータバッファ34へ転送し、デー
タ転送制御回路33のストアアドレスカウンタ5CTR
のアドレスに従ってライトデータがデータバッファ34
へ蓄積される。ストアアドレスカウンタ5CTRはライ
トデータが1バイト転送される毎にカウントアンプする
Therefore, the host controller transfers the write data from the write data bus 39b to the data buffer 34, and stores the write data in the store address counter 5CTR of the data transfer control circuit 33.
The write data is transferred to the data buffer 34 according to the address of
is stored in The store address counter 5CTR performs a count amplification every time one byte of write data is transferred.

Oデータ転送制御回路33がデータ転送終了と判定する
と、MPU30はデータ転送制御回路33のストアアド
レスカウンタ5CTRを読出しデータバッファ管理エリ
アDAのバッファアドレスBADRとの差を計算して転
送されたライトデータのバイト数BCを求める。
O When the data transfer control circuit 33 determines that the data transfer has ended, the MPU 30 reads the store address counter 5CTR of the data transfer control circuit 33, calculates the difference between it and the buffer address BADR of the data buffer management area DA, and calculates the difference between the data transfer control circuit 33 and the buffer address BADR of the transferred write data. Find the number of bytes BC.

次に、MPU30はRAM3 l bの命令バッファC
BUF及びデータバッファ管理エリアDAの更新を行う
Next, the MPU 30 uses the instruction buffer C of the RAM 3 lb.
Updates the BUF and data buffer management area DA.

先づ、RAM31bの命令バッファCBUFの当該命令
欄にRAM3 l bのデータバッファ管理エリアDA
のバッファアドレス(即ちライトデータの先頭アドレス
)BADRと、算出されたライトデータのバイト数BC
を格納する。
First, the data buffer management area DA of RAM3 lb is placed in the relevant instruction column of the instruction buffer CBUF of RAM31b.
buffer address (that is, the start address of write data) BADR and the calculated number of bytes of write data BC
Store.

次に、RAM31bのデータバッファ管理エリアDAの
空き容量FSEGからデータバッファ34の使用単位数
USF、Gを差し引き、この空き容量FSEGを更新し
、更に、バッファアドレスBADRに使用単位数USE
Gを加算し、先頭アドレスBADRを更新する。
Next, the number of used units USF, G of the data buffer 34 is subtracted from the free capacity FSEG of the data buffer management area DA of the RAM 31b, this free capacity FSEG is updated, and the number of used units USE is added to the buffer address BADR.
G is added and the start address BADR is updated.

0次に、MPU30は前述の使用単位数(受信ブロック
長)USEGとRAM3 l bのデータバッファ管理
エリアDAの最大ブロック長MAXLとを比較する。
Next, the MPU 30 compares the above-mentioned number of used units (reception block length) USEG with the maximum block length MAXL of the data buffer management area DA of the RAM 3 lb.

この比較によって、使用単位数USEGが最大ブロック
長MAXLより大なら、データバッファ管理エリアDA
の最大ブロック長MAILをこの使用単位数USEGに
更新する。更に、記録密度と最大ブロック長MAXLに
応じて最終制限値CBEを変更する。
By this comparison, if the number of used units USEG is larger than the maximum block length MAXL, the data buffer management area DA
The maximum block length MAIL is updated to the number of used units USEG. Furthermore, the final limit value CBE is changed according to the recording density and the maximum block length MAXL.

即ち、MPU30はRAM3 l bのエリアEAの書
込み記録密度とエリアDAの最大ブロック長MAILを
読出し、記録密度が1600rpiの場合には、最大ブ
ロック長MAILが「16」より大なら最終制限値を最
小の「2」に、最大ブロック長が「16」以下なら最終
制限値CBEを「4」に設定する。
That is, the MPU 30 reads the write recording density of area EA of RAM3 lb and the maximum block length MAIL of area DA, and when the recording density is 1600 rpi, if the maximum block length MAIL is greater than "16", the final limit value is set to the minimum value. If the maximum block length is "16" or less, the final limit value CBE is set to "4".

同様に記録密度が6250rpiの場合には、最大ブロ
ック長MAXLが「32」より大なら最終制限値CBE
を「2」に、最大ブロック長MAXLが「17」〜「3
2」の間では最終制限値CBEを「4」に、最大ブロッ
ク長MAXLが「16」以下なら最終制限値CBEを「
8」に設定する。
Similarly, when the recording density is 6250 rpi, if the maximum block length MAXL is greater than "32", the final limit value CBE
is set to "2", and the maximum block length MAXL is set to "17" to "3".
2", the final limit value CBE is set to "4", and if the maximum block length MAXL is "16" or less, the final limit value CBE is set to "4".
8”.

逆に、使用単位数USEGが最大ブロック長MAXL以
下なら、最大ブロック長MAXL、最終制限値CBEの
更新は行わず、ステップのへ進む。
Conversely, if the number of used units USEG is less than or equal to the maximum block length MAXL, the maximum block length MAXL and the final limit value CBE are not updated and the process proceeds to step.

■次に、MPU30は受信したライト系命令の格納処理
を行う。
(2) Next, the MPU 30 performs storage processing of the received write-related command.

先づ、MPU30はRAM3 l bの命令バッファC
BUFにホストインターフェイス回路32bの受信コマ
ンドを格納する。
First, the MPU 30 uses the instruction buffer C of the RAM 3 lb.
The received command of the host interface circuit 32b is stored in the BUF.

次に、MPU30はRAM3 l bの命令バッファ管
理エリアCAを更新すべく、命令記憶数CBSTKに「
1」加算して更新する。
Next, the MPU 30 sets the instruction storage number CBSTK to "
1” is added and updated.

■更に、MPU30は、ドライブインターフェイス回路
32aを調べ、制御線36bのEWA (テープ終端近
傍検出)信号がオンかオフかを調べる。オフであれば、
磁気テープ16がテープ終端近傍に達していないので、
ステップ■へ進む。
(2) Furthermore, the MPU 30 checks the drive interface circuit 32a and checks whether the EWA (tape end vicinity detection) signal on the control line 36b is on or off. If it's off,
Since the magnetic tape 16 has not reached the vicinity of the end of the tape,
Proceed to step ■.

一方、オンであれば、テープ終端近傍に達しているので
、RAM31bのエリアEAのLEOTフラグを調べL
EOTモードなら、命令バッファサイズCBS i Z
Eの変更を要しないので、ステップ■に進む。
On the other hand, if it is on, the tape has reached the vicinity of the end, so check the LEOT flag in area EA of RAM 31b.
In EOT mode, instruction buffer size CBS i Z
Since there is no need to change E, proceed to step (■).

逆に、LEOTモードでなければ、MPU30はRAM
3 l bのエリアCAの命令バッファサイズCBS 
i ZEと最終制限値CBEを読み出し比較する。
Conversely, if it is not the LEOT mode, the MPU 30 is RAM
3lb area CA instruction buffer size CBS
Read and compare i ZE and final limit value CBE.

命令バッファサイズCBS i ZEが最終制限値CB
E以下ならば、命令バッファサイズCB51ZEを変更
せず、ステップ■へ進む。逆に命令バッファサイズCB
S i ZEが最終制限値CBEより大ならば、命令バ
ッファサイズCBS i ZEから「2」を減算し、更
新してステップ■へ進む。
Instruction buffer size CBS i ZE is the final limit value CB
If it is less than E, the instruction buffer size CB51ZE is not changed and the process proceeds to step (2). Conversely, the instruction buffer size CB
If S i ZE is greater than the final limit value CBE, "2" is subtracted from the instruction buffer size CBS i ZE, updated, and the process proceeds to step (2).

0次に、MPU30はドライブ制御部2が処理実行中か
を調べ、処理実行中でなければ(停止中であれば)、第
9図にて後述するドライブ起動処理を行う。
Next, the MPU 30 checks whether the drive control unit 2 is executing a process, and if it is not executing a process (if it is stopped), performs a drive activation process which will be described later with reference to FIG.

■処理実行中又はドライブ起動処理が行われると、MP
U30は、ドライブインターフェイス回路32aを介し
ドライブ制御部2がEOTを検出したことを示すTWA
信号が制御線36aより生じているかを調べる。
■During processing or when drive startup processing is performed, MP
U30 is TWA indicating that the drive control unit 2 has detected EOT via the drive interface circuit 32a.
Check whether a signal is generated from the control line 36a.

又、LEOTモードなら、MPU30は、後述する第1
0図の対ドライブ処理によって更新される走行カウンタ
ECTRが一定値EPTRを越えたロジカルEOT検出
(オン)かを調べる。
In addition, in the LEOT mode, the MPU 30 operates in the first
It is checked whether the traveling counter ECTR updated by the drive-related processing shown in FIG.

EOT検出でTWA信号が生じていれば又はLEOT検
出(オン)ならば、MPU30はRAM31bの命令バ
ッファ管理エリアCAの命令記憶数(未実行命令数)C
BSTKが零かを調べ、零でなければ、ドライブの実行
によって零になるまで待つ。これはEOT、LEOT以
降の処理においてはホストからの命令とドライブが実行
する命令の同期をとるためである。
If the TWA signal is generated upon EOT detection, or if LEOT is detected (on), the MPU 30 stores the number of stored instructions (number of unexecuted instructions) C in the instruction buffer management area CA of the RAM 31b.
Check whether BSTK is zero, and if it is not zero, wait until it becomes zero by executing the drive. This is to synchronize the commands from the host and the commands executed by the drive in the processing after EOT and LEOT.

TWA信号が生じていない時には、又はLEOTがオフ
である時には、MPU30はデータ転送制御回路33の
状態から前述のステップ■のライトデータ転送がデータ
バッファ34の空き容量不足によってオーバーフローし
たかを調べる。
When the TWA signal is not generated or when LEOT is off, the MPU 30 checks the state of the data transfer control circuit 33 to determine whether the write data transfer in step (3) has overflowed due to insufficient free space in the data buffer 34.

オーバーフローした場合には、前述と同様同期をとるた
め、MPU30はRAM3 l bの命令バッファ管理
エリアCAの命令記憶数(未実行命令数)CBSTKが
零かを調べ、零でなければ、ドライブの実行によって零
になるまで待つ。
If an overflow occurs, in order to synchronize as described above, the MPU 30 checks whether the number of stored instructions (number of unexecuted instructions) CBSTK in the instruction buffer management area CA of the RAM 3 lb is zero, and if it is not zero, executes the drive. Wait until it becomes zero.

バッファオーバーフローが生じていない時又はCBST
Kが零となると、ホストコントローラへMPU30はホ
ストインターフェイス回路32bより終了報告(正常受
信又はエラー)するとともにデータビジーDBY信号を
オフとし、第5図の起動待ちルーチンへ戻る。
When no buffer overflow occurs or CBST
When K becomes zero, the MPU 30 reports completion (normal reception or error) to the host controller from the host interface circuit 32b, turns off the data busy DBY signal, and returns to the start-up waiting routine of FIG.

第8図は対ホストリード系処理フロー図である。FIG. 8 is a flowchart of host read system processing.

■第5図の起動処理フローのステップ[相]によってリ
ード系命令を受け、起動処理が行われると、MPU30
はホストインターフェイス回路32bを介しデータビジ
ーDBYをオンにし、ホストコントローラへ実行開始を
通知する。
■When a read-related command is received in step [phase] of the startup processing flow in FIG. 5 and startup processing is performed, the MPU 30
turns on the data busy DBY via the host interface circuit 32b and notifies the host controller of the start of execution.

0次に、MPU30は、RAM3 l bのエリアCA
の先読みブロック数CBSTKに「1」減算する。
0 Next, the MPU 30 uses the area CA of RAM 3 l b.
"1" is subtracted from the number of pre-read blocks CBSTK.

更に、MPU30はドライブ制御部2が処理実行中かを
調べ、処理実行中でなければ(停止中であれば)、第9
図にそ後述するドライブ起動処理を行う。
Furthermore, the MPU 30 checks whether the drive control unit 2 is executing a process, and if it is not executing a process (if it is stopped), the MPU 30
Drive startup processing, which will be described later in the figure, is performed.

又、MPU30は前述のエリアCAの命令記憶数(先読
みブロック数)CBSTKが「0」以上かを調べ、「0
」より小のマイナスであれば、リードデータはデータバ
ッファ34に転送されていないから、CBSTKが「0
」以上、即ち、ドライブ1からリードデータが1ブロッ
ク以上データバッファ34に転送されるまで待つ。
In addition, the MPU 30 checks whether the instruction storage number (preread block number) CBSTK in the area CA mentioned above is "0" or more, and determines whether it is "0" or more.
”, the read data has not been transferred to the data buffer 34, so CBSTK is “0”.
'', that is, wait until one or more blocks of read data from the drive 1 is transferred to the data buffer 34.

先読みブロック数CBSTKがrOJ以上となると、ド
ライブ1からリードデータがデータバッファ34に転送
されているはずであるから、MPU30は、RAM3 
l bの命令バッファCBUFからリード実行結果と、
リードデータのデータバッファ34内先頭アドレスRA
DRと、リードバイト数RBCを読出す。
When the number of pre-read blocks CBSTK becomes rOJ or more, the read data should have been transferred from the drive 1 to the data buffer 34, so the MPU 30 transfers the read data from the RAM 3.
The read execution result from the instruction buffer CBUF of lb,
Leading address RA of read data in data buffer 34
Read DR and number of read bytes RBC.

0次にMPU30は前述のステップ■でRAM31bの
命令バッファCBUFから読出したリード実行結果から
、ドライブが当該ブロックを処理した時にロードポイン
トLDPを検出していたかどうかを調べる、ロードポイ
ントLDPを検出していたならばリード方向を調べ、リ
ードリバース方向ならブロック検出以前にBOTに達し
てしまっており、リードデータはデータバッファ34に
転送されていないためステップ■へ進む。
0 Next, the MPU 30 checks whether the load point LDP was detected when the drive processed the block based on the read execution result read from the instruction buffer CBUF of the RAM 31b in step (3) described above. If so, check the read direction, and if it is in the read reverse direction, the BOT has been reached before block detection, and the read data has not been transferred to the data buffer 34, so proceed to step (2).

一方、リード方向がリードフォワード方向ならロードポ
イントLDPから最初のブロックのリードであったので
、リード実行結果から記録密度を調べる。リード実行結
果の記録密度は読取った磁気テープの記録密度を示して
いる。
On the other hand, if the read direction is the read forward direction, the first block was read from the load point LDP, so the recording density is checked from the read execution result. The recording density of the read execution result indicates the recording density of the read magnetic tape.

そして記録密度が1600rpiなら、RAM31bの
命令バッファ管理エリアCAの最終制限値CBEに「8
」を、6250rpiなら同様に最終制限値CBEに「
16」をセントする。
If the recording density is 1600 rpi, the final limit value CBE of the instruction buffer management area CA of the RAM 31b is set to "8".
”, and if the speed is 6250rpi, the final limit value CBE is “
16” cents.

更にMPU30は、ロードポイントLDPを検出してい
なかった場合又は最終制限値CBHのセット後、リード
実行結果から、リード実行時にファイルの区切りを示す
テープマークが検出されたかを調べ、テープマークが検
出されたのであればリードデータはデータバッファ34
に転送されていないので、データ転送を行わず、ステッ
プ■へ進む。
Furthermore, if the load point LDP has not been detected or after setting the final limit value CBH, the MPU 30 checks from the read execution result whether a tape mark indicating a file break was detected at the time of read execution, and determines whether a tape mark is detected. If so, the read data is stored in the data buffer 34.
Since the data has not been transferred, the data is not transferred and the process proceeds to step (■).

逆にテープマークが検出されていなければ、ステップ@
の自動転送ステップへ進む。
Conversely, if no tape mark is detected, step @
Proceed to the automatic transfer step.

[相]先づ、MPU30は前述のリード系命令がデータ
転送を伴うものか否かを判別する。データ転送を伴なわ
ないリード系命令としては、スペース(Space)、
バックスペース(Back−3pace)、スペースフ
ァイル(Space  Fi 1 e) 、バックスペ
ースファイル(BackSpace  File)があ
る。
[Phase] First, the MPU 30 determines whether the aforementioned read-related command involves data transfer. Read commands that do not involve data transfer include Space,
There are backspace (Back-3pace), space file (Space Fi 1 e), and backspace file (BackSpace File).

データ転送を伴うリード系命令なら、ホストコントロー
ラへのデータ転送を実行する。
If it is a read-related command that involves data transfer, the data transfer to the host controller is executed.

即ち、MPU30は、RAM3 l bの命令バッファ
CBUFから読出した先頭バッファアドレスRADRを
データ転送制御回路33のロードアドレスカウンタLC
TRに、リードバイト数をバイトカウンタBCTRにセ
ットし、データ転送制御回路33を起動する。
That is, the MPU 30 inputs the first buffer address RADR read from the instruction buffer CBUF of the RAM 3 lb to the load address counter LC of the data transfer control circuit 33.
The number of read bytes is set in TR and the byte counter BCTR, and the data transfer control circuit 33 is activated.

これによってデータ転送制御回路33は、リードストロ
ーブパルスR3TB (第4図(A))とともにロード
アドレスカウンタLCTRのアドレスに従ってデータバ
ッファ34内のり−ドデータをホストコントローラに転
送する。ロードアドレスカウンタLCTRは、リードデ
ータを1バイト転送する毎にカウントアツプする。
Thereby, the data transfer control circuit 33 transfers the read data in the data buffer 34 to the host controller in accordance with the address of the load address counter LCTR together with the read strobe pulse R3TB (FIG. 4(A)). The load address counter LCTR counts up every time one byte of read data is transferred.

■データ転送制御回路33がリードバイト数分のデータ
転送終了と判定すると、MPU30はRAM31bのエ
リアDAの空き容量FSEGに使用単位数USEGを加
算し、更新する。
(2) When the data transfer control circuit 33 determines that the data transfer for the number of read bytes has been completed, the MPU 30 adds the number of used units USEG to the free capacity FSEG of the area DA of the RAM 31b and updates it.

一方、データ転送を伴わないリード系命令でもリードデ
ータはデータバッファ34内に転送されているので、同
様に空き容量PSEGの更新を行う。
On the other hand, since the read data is transferred to the data buffer 34 even in a read-related instruction that does not involve data transfer, the free capacity PSEG is updated in the same way.

次に、MPU30は前述のリード系命令がファイルサー
チ(File  5earch)系命令(スペースファ
イル又はバックスペースファイル)かを調べ、ファイル
サーチ系命令なら、ステップ■に戻る。即ち、ファイル
サーチ系命令をリード(Re a d)命令に分割して
いることになる。
Next, the MPU 30 checks whether the above-mentioned read-related command is a file search (File 5 search)-based command (space file or backspace file), and if it is a file search-based command, returns to step (2). In other words, the file search type command is divided into read commands.

■一方、ステップOでファイルサーチ系命令でない時又
はステップ■でリード方向がリバースの場合又はテープ
マーク検出の場合には、ホストコントローラへMPU3
0はホストインターフェイス回路32bより終了報告(
正常受信又はエラー)するとともにデータビジーDBY
信号をオフとし、第5図の起動待ちルーチンへ戻る。
■On the other hand, if it is not a file search type command in step O, or if the read direction is reverse in step ■, or if a tape mark is detected, the MPU3 is sent to the host controller.
0 indicates completion report from host interface circuit 32b (
Normal reception or error) and data busy DBY
The signal is turned off and the process returns to the startup waiting routine shown in FIG.

このようにして、ライト系処理では、ロジカルEOTモ
ードでは、バッファサイズCB51ZEはステップ■で
減少制限せずに、ロジカルEOTオンによってステップ
■で通常のEOTオンと同様に先取り命令の禁止を行う
In this way, in write-related processing, in the logical EOT mode, the buffer size CB51ZE is not reduced and limited in step (2), but when logical EOT is turned on, prefetching instructions are prohibited in step (2) in the same way as when normal EOT is turned on.

一方、ロジカルEOTモードでないフィジカルEOTモ
ードの時には、記録密度と最大ブロック長MAXLに応
じて最終制限値CBEが変更され(ステップ■) 、E
WAにおいては、ステップ■でバッファサイズが順次減
少される。
On the other hand, when the physical EOT mode is not the logical EOT mode, the final limit value CBE is changed according to the recording density and the maximum block length MAXL (step ■), and E
In the WA, the buffer size is sequentially reduced in step (2).

又、リード系処理では、リード系命令の種類を問わず先
読みが行われる。
Further, in read-related processing, prefetching is performed regardless of the type of read-related instruction.

(e)対ドライブ処理動作の説明 第9図は対ドライブ起動処理フロー図である。(e) Explanation of drive processing operation FIG. 9 is a flowchart of drive activation processing.

(i)MPU30はドライブ起動を行うべく、RAM3
 l bの命令バッファCBUF・より次に実行すべき
命令を読み出し、ライト系命令かを調べる。
(i) The MPU 30 uses the RAM 3 to start the drive.
The next instruction to be executed is read from the instruction buffer CBUF of lb, and it is checked whether it is a write type instruction.

ライト系命令でなければ、即ち、リード系命令なら、M
PU30は、RAM3 l bのエリアCAの先読みブ
ロック数CBSTKが零より小のマイナスかを調べるC
BSTKが零以上であればすでに先読みを行っているの
で起動しても良いかを調べる。起動不可(先読み時にエ
ラーを検出して停止している)の時はリターンする。
If it is not a write-related instruction, that is, if it is a read-related instruction, M
PU30 checks whether the number of pre-read blocks CBSTK in area CA of RAM3 lb is a negative value smaller than zero.
If BSTK is greater than or equal to zero, prefetching has already been performed, so check whether it is okay to start. Returns if it cannot be started (an error was detected during read ahead and stopped).

一方、起動可なら、RAM3 l bのエリアCAの先
読みブロック数CBSTKが「63」より小かを調べる
。小でなければRAM31bの命令バッファCBUFが
フルのため、リターンする。
On the other hand, if activation is possible, it is checked whether the number of pre-read blocks CBSTK in area CA of RAM3 lb is smaller than "63". If it is not, the instruction buffer CBUF in the RAM 31b is full, and the process returns.

一方、先読みブロック数が63ケより小なら、空き容量
FSEGが64にバイト以上かを調べ、以下ならデータ
転送不可としてリターンする。
On the other hand, if the number of pre-read blocks is less than 63, it is checked whether the free space FSEG is 64 bytes or more, and if it is less than 64 bytes, the process returns as data transfer is not possible.

(ii )ステップ(i)で空き容量FSEGが64に
バイト以上なら、ドライブ1からのデータ転送可能なた
め、MPU30はRAM3 l bの先頭アドレスBA
DRをデータ転送制御回路33のストアアドレスカウン
タ5CTRにセットし、データ転送制御回路33をスタ
ンバイ状態とする。
(ii) If the free space FSEG is 64 bytes or more in step (i), it is possible to transfer data from drive 1, so the MPU 30 moves to the starting address BA of RAM 3 l b.
DR is set in the store address counter 5CTR of the data transfer control circuit 33, and the data transfer control circuit 33 is placed in a standby state.

次に、MPU30はドライブインターフェイス回路32
aよりEWA信号がオンか、オフかを調べ、オン(YE
S)なら、EWAにあるから、RAM31bのLEOT
モードフラグをオフとし、LEOTモードを解除する。
Next, the MPU 30 drives the drive interface circuit 32
Check whether the EWA signal is on or off from a, and turn it on (YE
S), it is in EWA, so LEOT of RAM31b
Turn off the mode flag and cancel LEOT mode.

更に、MPU30はリード系命令がリードリバースかを
関べ、リードリバースならロジカルEOTをオフとする
Furthermore, the MPU 30 determines whether the read-related command is a read reverse, and if it is a read reverse, turns off the logical EOT.

このオフの後又は、EWA信号オフ又はリードリバース
でない場合には、MPU30はドライブインターフェイ
ス回路32aを介し、起動(GO)信号と当該リード系
命令とをドライブ1へ発行し、リターンする。
After this off, or when the EWA signal is not off or read reverse, the MPU 30 issues a start (GO) signal and the read related command to the drive 1 via the drive interface circuit 32a, and returns.

(iii )一方、ステップ(i)でライト系命令と判
定すると、ドライブへの自動転送準備を行う。
(iii) On the other hand, if it is determined in step (i) that it is a write-related command, preparations for automatic transfer to the drive are made.

即ち、MPtJ30はRAM31bの命令バッファCB
UFから当該ライト系命令を読出し、この命令がデータ
転送を伴う命令かを調べる。データ転送を伴う命令であ
れば、MPU30はRAM31bの命令バッファCBU
Fの先頭アドレスWADR及びバイト数WBCをデータ
転送制御回路33のロードアドレスカウンタLATR,
バイトカウンタBCTRに各々セットする。
That is, MPtJ30 is the instruction buffer CB of RAM31b.
Read the write-related instruction from the UF and check whether this instruction involves data transfer. If the instruction involves data transfer, the MPU 30 uses the instruction buffer CBU of the RAM 31b.
The start address WADR and the number of bytes WBC of F are sent to the load address counter LATR of the data transfer control circuit 33,
Set each byte counter BCTR.

更にデータ転送制御回路33をスタンバイ状態にする。Furthermore, the data transfer control circuit 33 is put into a standby state.

このスタンバイ状態後又は、前述のデータ転送を伴なわ
ないライト系命令(イレーズ、ライトテープマーク等)
であれば、MPU30は読出した命令と、起動(GO)
信号をドライブインターフェイス回路32aを介し制御
線36aよりドライブ制御部2へ発行し、リターンする
After this standby state, or write commands that do not involve data transfer as described above (erase, write tape mark, etc.)
If so, the MPU 30 reads the read instruction and starts (GO)
A signal is issued to the drive control section 2 from the control line 36a via the drive interface circuit 32a, and then returned.

一方、ドライブ制御B2は、前述のステップ(ii )
、(iii >で起動信号及び命令を受けると、データ
ビジー〇BYをオンとして返答し、当該命令の実行に入
る。
On the other hand, the drive control B2 performs step (ii) described above.
, (iii) When receiving the activation signal and command, it responds by turning on data busy 0BY and starts executing the command.

例えばデータ転送を伴うライト系命令なら、データ転送
準備完了後、データ転送制御信号線37aよりデータ転
送要求をデータ転送制御回路33へ送る。これによって
データ転送制御回路33はデータバッファ34のロード
アドレスカウンタしCTRで示す先頭アドレスからバイ
トカウンタBCTRのバイト数分ライトデータをライト
データバス37bを介しドライブ制御部2へ送り、これ
を実行せしめ磁気テープ16にライトさせる。
For example, in the case of a write command that involves data transfer, a data transfer request is sent to the data transfer control circuit 33 from the data transfer control signal line 37a after data transfer preparation is completed. As a result, the data transfer control circuit 33 sends write data for the number of bytes of the byte counter BCTR from the start address indicated by the load address counter CTR of the data buffer 34 to the drive control unit 2 via the write data bus 37b, and executes the write data. The tape 16 is written.

また、ドライブ制御部2において係るライト系コマンド
の実行が終了すると、終了報告を制御線36aを介しド
ライブインターフェイス回路32aへ上げる。ドライブ
インターフェイス回路32aは、これによってMPU3
0に割込みをかけ、第5図乃至第8図の処理を中断せし
める。
Furthermore, when the execution of the write-related command in the drive control section 2 is completed, a completion report is sent to the drive interface circuit 32a via the control line 36a. The drive interface circuit 32a thereby
0 and interrupts the processing shown in FIGS. 5 to 8.

第10図は対ドライブライド/リード処理フロー図であ
る。
FIG. 10 is a flowchart of the drive drive/read processing.

(iv) MP U 30はドライブより終了報告を受
けると、終了した命令種別がリード系かライト系かを調
べ、リード系ならステップ(vi)へ進む。
(iv) When the MPU 30 receives the completion report from the drive, it checks whether the type of the completed instruction is read or write, and if it is read, it proceeds to step (vi).

一方、終了した命令種別がライト系なら、MPU30は
ドライブインターフェイス回路32aを介しEWA信号
がオンかオフかを調べる。オフ(No)であればステッ
プ(vi )へ進む。
On the other hand, if the completed instruction type is a write type, the MPU 30 checks whether the EWA signal is on or off via the drive interface circuit 32a. If it is off (No), proceed to step (vi).

EWA信号がオン(YES)であれば、終端近傍領域(
EWA)内であるから、MPU30はRAM3 l b
のエリアEAのLEOTモードフラグを開べLEOTモ
ードかを判別する。
If the EWA signal is on (YES), the area near the termination (
EWA), the MPU 30 uses RAM 3 l b
Open the LEOT mode flag of area EA to determine whether it is in LEOT mode.

LEOTモードでなければ、通常のフィジカルEOTモ
ードであるから、ステップ(vi )へ進む。
If it is not the LEOT mode, it is the normal physical EOT mode, and the process proceeds to step (vi).

逆にLEOTモードなら、走行カウンタの歩進及びLE
OT検出点の検出のためステップ(v)へ進む。
Conversely, in LEOT mode, the progress of the travel counter and the LE
Proceed to step (v) to detect the OT detection point.

(v)先づ、MPU30はRAM3 l bのエリアE
Aの書込み記録密度を調べる。
(v) First, the MPU 30 uses area E of RAM 3 l b.
Check the write recording density of A.

記録密度が6250rpiか1600rp iかの判断
は、以下の走行カウンタの歩進及びLH,OT検出点の
検出処理におけるライトテープマーク長WTM、イレー
ズ長ER3,IBG長、判定値EPTRを異ならせるた
めであり、処理自体は全く同一である。
The determination as to whether the recording density is 6250rpi or 1600rpi is made by changing the write tape mark length WTM, erase length ER3, IBG length, and judgment value EPTR in the following travel counter increment and LH, OT detection point detection processing. Yes, and the processing itself is exactly the same.

即ち、MPU30は命令バッファCBUFの命令がライ
ト命令、イレーズバリアプル命令、ライトテープマーク
命令、イレーズ固定命令かを調べる。
That is, the MPU 30 checks whether the instruction in the instruction buffer CBUF is a write instruction, erase variable pull instruction, write tape mark instruction, or fixed erase instruction.

命令がライト命令又はイレーズバリアプル命令なら、命
令バッファCBUFのバイト数RBCを使用単位数US
EGに変換し、RAM3 l bのエリアEAの走行カ
ウント値ECTRに加算更新する。又、命令がライトテ
ープマーク命令なら、固定値であるライトテープマーク
長WTMを同様に走行カウント値ECTRに加算更新す
る。
If the instruction is a write instruction or an erase variable pull instruction, the number of bytes RBC of the instruction buffer CBUF is the number of units used US
It is converted into EG and updated by adding it to the travel count value ECTR in area EA of RAM3 lb. If the command is a write tape mark command, the write tape mark length WTM, which is a fixed value, is similarly added and updated to the running count value ECTR.

更に、命令がイレーズ固定命令なら、固定イレーズ長E
R8を同様に走行カウント値ECTRに加算更新する。
Furthermore, if the instruction is a fixed erase instruction, the fixed erase length E
Similarly, R8 is added and updated to the traveling count value ECTR.

そして、更に、IBG長を走行カウント値ECTRに加
算更新する。
Further, the IBG length is added to the running count value ECTR and updated.

次に、MPU30は、LEOT検出点の検出のため、こ
の走行カウント値ECTRと判定値EPTRとを比較す
る。
Next, the MPU 30 compares this running count value ECTR and the determination value EPTR in order to detect the LEOT detection point.

ECTR≧EPTRならLEOT検出点に達しているた
め、ロジカルEOTオンとする。ECTR<EPTRな
らロジカルEOTはオンとしない。
If ECTR≧EPTR, the LEOT detection point has been reached, so logical EOT is turned on. If ECTR<EPTR, logical EOT is not turned on.

(vi)次に、MPU30は、係るライト系命令がデー
タバッファ34を使用する命令かを調べ、使用する命令
であれば、RAM3 l bのデータバッファ管理エリ
アDAの空き容量FSEGに使用単位数USEGを加算
し、空き容量FSEGを更新する。
(vi) Next, the MPU 30 checks whether the write-related instruction uses the data buffer 34, and if the instruction uses the data buffer 34, the MPU 30 sets the number of used units USEG to the free capacity FSEG of the data buffer management area DA of the RAM 3 lb. is added and the free capacity FSEG is updated.

次に、この更新後、又はデータバッファ34を使用して
いない時には、RAM3 l bの命令バ・ノファ管理
エリアCAの命令記憶数CBSTKを「1」減算し、更
新する。
Next, after this update, or when the data buffer 34 is not in use, the instruction storage number CBSTK in the instruction buffer management area CA of the RAM 3 lb is subtracted by "1" and updated.

更に、MPU30は、RAM3 l bの命令記憶数C
BSTKが零かを調べ、零なら第5図又は第7図のルー
チンへ戻り、零でなければ、第9図のステップ(iii
 )以降を実行する。
Furthermore, the MPU 30 has the instruction storage number C of the RAM 3 lb.
Check whether BSTK is zero, and if it is zero, return to the routine in Figure 5 or Figure 7; if not, go to step (iii) in Figure 9.
) and the rest.

このようにしてドライブはホストコントローラと非同期
に命令バッファの命令を順次実行していく。
In this way, the drive sequentially executes the instructions in the instruction buffer asynchronously with the host controller.

(vii )一方、ステップ(iv >で命令種別がリ
ード系と判定されると、MPU30は命令がリードリバ
ースであったかを調べ、リードリバースであったならば
ドライブインターフェイス回路32aを介し、ドライブ
1がロードポイントLDPを検出しているかどうかを調
べる。ロードポイント検出信号が上がっていない場合、
及び命令がリードフォワードであった場合はドライブイ
ンターフェイス回路32aを介しテープマーク検出信号
が上っているかを調べる。
(vii) On the other hand, if the instruction type is determined to be read in step (iv>), the MPU 30 checks whether the instruction is a read reverse, and if it is a read reverse, the drive 1 performs the load via the drive interface circuit 32a. Check whether point LDP is detected.If the load point detection signal is not rising,
If the command is read forward, it is checked whether the tape mark detection signal is rising via the drive interface circuit 32a.

テープマーク検出信号も上っていなければ、ドライブ処
理終了によるデータバッファ34に転送されたリードデ
ータのバイト数BCを計算する。
If the tape mark detection signal is not rising, the number of bytes BC of read data transferred to the data buffer 34 upon completion of drive processing is calculated.

即ち、MPU30はデータ転送制御回路33のストアア
ドレスカウンタ5CTRを読出しデータバッファ管理エ
リアDAのバッファアドレスBADRとの差を計算して
転送されたリードデータのバイト数BCを求める。
That is, the MPU 30 reads out the store address counter 5CTR of the data transfer control circuit 33, calculates the difference between it and the buffer address BADR of the data buffer management area DA, and obtains the number of bytes BC of the transferred read data.

次に、MPU30はRAM31bの命令バッファCBU
F及びデータバッファ管理エリアDAの更新を行う。
Next, the MPU 30 uses the instruction buffer CBU of the RAM 31b.
F and data buffer management area DA are updated.

先づ、RAM31 bの命令バッファCBUFの当該命
令欄にRAM3 l bのデータバッファ管理エリアD
Aのバッファアドレス(即ぢ先読みリードデータの先頭
アドレス”)BADRと、算出されたリードデータのバ
イト数BCを格納する。
First, the data buffer management area D of RAM3 lb is placed in the relevant instruction column of the instruction buffer CBUF of RAM31b.
The buffer address of A (i.e., the start address of pre-read read data) BADR and the calculated number of bytes of read data BC are stored.

次に、RAM3 l bのデータバッファ管理エリアD
Aの空き容量FSEGからデータバッファ34の使用単
位数USEGを差し引き、この空き容量FSEGを更新
し、更に、バッファアドレスBADRに使用単位数US
EGを加算し、先頭アドレスBADRを更新する。
Next, data buffer management area D of RAM3 lb
The number of used units USEG of the data buffer 34 is subtracted from the free capacity FSEG of A, this free capacity FSEG is updated, and the number of used units USEG is added to the buffer address BADR.
EG is added and the start address BADR is updated.

更にMPU30はドライブ1がフォワード方向の動作で
且つEOTの検出をしたかを調べる。
Furthermore, the MPU 30 checks whether the drive 1 operates in the forward direction and detects EOT.

これによってYESであれば、リード実行結果(EOT
検出)を命令バッファCBUFの当該リードデータの格
納欄に格納し、第5図又は第8図のルーチンへ戻る。
If YES, read execution result (EOT)
Detection) is stored in the corresponding read data storage column of the instruction buffer CBUF, and the process returns to the routine of FIG. 5 or FIG. 8.

同様にテープマーク検出、リードリバースにおいてロー
ドポイントLDP検出の場合も、命令バッファCBUF
にこれを格納し、第5図又は第8図のルーチンへ戻る。
Similarly, in the case of tape mark detection and load point LDP detection in read reverse, the instruction buffer CBUF
This is stored in , and the process returns to the routine shown in FIG. 5 or 8.

一方、前述のMPU30のEOT検出等の調べによって
Noであれば、同様にリード実行結果(不検出)を命令
バ・7フアCBUFの当該リードデータの格納欄に格納
する。
On the other hand, if the result of the above-mentioned EOT detection etc. of the MPU 30 is No, the read execution result (non-detection) is similarly stored in the corresponding read data storage column of the instruction bar 7 CBUF.

更に、MPU30はRAM3 l bのエリアCAの先
読みブロック数CBSTKが63以上かを調べ、63以
上なら、先読みリード不可として第5図又は第8図のル
ーチンへ戻り、63より小なら先読みリードを実行すべ
く第9図のステップ(i)へ戻る。
Furthermore, the MPU 30 checks whether the number of pre-read blocks CBSTK in area CA of RAM3 lb is 63 or more, and if it is 63 or more, returns to the routine of FIG. 5 or FIG. To do so, return to step (i) in FIG.

(f)全体動作の説明 以上、第5図から第10までの動作を要約すると、次の
如くなる。
(f) Description of overall operation The operations shown in FIGS. 5 to 10 can be summarized as follows.

ライト系動作においては、 (1)通常のフィジカルEOTモードとは別にロジカル
EOTモードが設けられている。
In the write system operation, (1) A logical EOT mode is provided in addition to the normal physical EOT mode.

即ち、第11図(A)に示す如く、磁気テープドライブ
部1が磁気テープ16を走行して、磁気テープの終端近
傍領域(EWA)を検出すると、先取り制御部3が終端
領域近傍時点から磁気テープの走行距離を計数し、計数
値ECTRが一定値EPTRに達すると、テープ終端領
域検出とみなし、疑似的なEOTを得るようにしている
That is, as shown in FIG. 11(A), when the magnetic tape drive unit 1 runs the magnetic tape 16 and detects an area near the end of the magnetic tape (EWA), the prefetch control unit 3 starts the magnetic tape from the time near the end area. The running distance of the tape is counted, and when the counted value ECTR reaches a certain value EPTR, it is considered that the tape end area has been detected, and a pseudo EOT is obtained.

この疑似EOT (ロジカルEOT)は通常のフィジカ
ルEOT検出と同一の効果を持ち、これによって実際に
磁気テープに設けられたEOTマーカを検出することな
く、それ以前にEOTの取扱いが行われる。
This pseudo EOT (logical EOT) has the same effect as normal physical EOT detection, whereby the EOT is handled before actually detecting the EOT marker provided on the magnetic tape.

これによって第11図(A)に示す如<EOT検出時点
を早くすることにより、TWAを長(できる。このため
、TWAに書込むことのできるブロック数が多くなるた
め、第11図(B)の実線に示す如く、EWAにおける
ライト系命令の先取り数を減らす必要がなくなる。
As a result, as shown in FIG. 11(A), the TWA can be lengthened by making the EOT detection time earlier. Therefore, the number of blocks that can be written to the TWA increases, as shown in FIG. 11(B). As shown by the solid line, there is no need to reduce the number of write instructions in EWA.

従って、ホストコントローラは、ライト系命令の先取り
制限をEWAにおいては受けないのでストリーミング走
行の性能低下を防止できる。
Therefore, the host controller is not subject to any prefetch restrictions for write-related commands in the EWA, so it is possible to prevent performance deterioration in streaming running.

即ち、第11図(C)の実線の如(、EOT付近までは
、命令先取り数はできるだけ多くし、EOTが近づいた
ら、書込み可能な数に減らすという理想的な先取り制御
が可能となる。
That is, as shown by the solid line in FIG. 11(C), ideal prefetch control is possible in which the number of instructions prefetched is as large as possible until near the EOT, and as the EOT approaches, the number is reduced to a writable number.

これによって、TWAに書込み不能となることもなく、
性能低下を防止することができる。
As a result, it will not become impossible to write to TWA,
Performance deterioration can be prevented.

(2)従って、第5図ステップ■の初期設定(III)
、即ち第6図(C)において、LEOTモードならバッ
ファサイズCBS i ZEは最大の「64」で減少制
限を受けない。
(2) Therefore, the initial setting (III) of step ■ in Figure 5
That is, in FIG. 6(C), in the LEOT mode, the buffer size CBS i ZE is the maximum "64" and is not subject to reduction restrictions.

即ち、ロジカルEOTモードであれば、第7図のステッ
プ■において、バッファサイズCB51ZEの漸次減少
、即ち減少制限は行われない。
That is, in the logical EOT mode, the buffer size CB51ZE is not gradually reduced, ie, the reduction limit is not performed in step (2) in FIG.

そして、第10図のステップ(V)において、アーリー
ウオーニングエリアEWA検出からテープ走行距離が走
行カウント値ECTRとして計測され、これが制限値E
PTRに達すると、ロジカルEOTポイント検出として
、LEOTオンとなり、第7図のステップ■で通常のフ
ィジカルEOT検出と同一の扱いが行われる。
Then, in step (V) of FIG. 10, the tape running distance from the detection of the early warning area EWA is measured as the running count value ECTR, and this is the limit value E
When the PTR is reached, LEOT is turned on as logical EOT point detection, and the same treatment as normal physical EOT detection is performed in step (2) in FIG.

従って、LEOTモードでは、LEOT点検出まで第1
1図(B)の実線の如くバッファサイズCBS i Z
Hの制限を受けず、LEOT点検出で、EOTモードと
同様、実質的にCBS i ZEは零となる。
Therefore, in LEOT mode, the first
As shown by the solid line in Figure 1 (B), the buffer size CBS i Z
Without being limited by H, when LEOT point is detected, CBS i ZE becomes substantially zero as in the EOT mode.

このため、LEOTモードでは、第1図(C)の実線の
如く、LEOT点検出から命令記憶数CBSTKが減少
していく。
Therefore, in the LEOT mode, the number of stored instructions CBSTK decreases from the detection of the LEOT point, as shown by the solid line in FIG. 1(C).

(3)更にLEOTモードにおいて、第9図のステップ
(ii )の如く、テープ走行距離計数開始後(EWA
オン後)に、リード系命令の受信、実行などにより計数
値の保証ができなくなった時には、ロジカルEOTモー
ドがオフとなって、フィジカルEOTモードに移行する
(3) Furthermore, in the LEOT mode, as shown in step (ii) in FIG.
After turning on), when the count value cannot be guaranteed due to reception or execution of a read-related command, the logical EOT mode is turned off and shifts to the physical EOT mode.

(4)一方、通常のフィジカルEOTモードであれば、
第5図のステップ■の初期設定(■)、即ち第6図(C
)においてバッファサイズCB51ZEは最終制限値C
BEにより変更される。
(4) On the other hand, in normal physical EOT mode,
Initial setting (■) of step ■ in Fig. 5, that is, Fig. 6 (C
), the buffer size CB51ZE is the final limit value C
Changed by BE.

又、第7図のステップ■において、この最終制限値CB
Eは記録密度と最大ブロック長により変更される。
Also, in step ① of Fig. 7, this final limit value CB
E changes depending on the recording density and maximum block length.

即ち、最終制限値CBEは、第11図(C1及び(D)
の如く記録密度と最大ブロック長により決定するように
したものである。
That is, the final limit value CBE is as shown in FIG. 11 (C1 and (D)
This is determined based on the recording density and maximum block length, as shown in FIG.

例えば、第11図(C)の記録密度6250rpiの高
密度記録においては、最大ブロック長MAXLに応じて
命令先取り最終期限値CBEを「16」から「8」、「
4」、「2」に、記録密度1600rpiの低密度記録
においては、最大ブロック長MAXLに応じて命令先取
り最終制限値CBEを「8」から「4」、「2」に変更
するようにしたものである。
For example, in high-density recording with a recording density of 6250 rpi as shown in FIG.
4" and "2", in low-density recording with a recording density of 1600 rpi, the final limit value CBE for instruction preemption is changed from "8" to "4" and "2" according to the maximum block length MAXL. It is.

このため、EOT検出時には、記録密度と最大ブロック
長に応じTWAを十分利用できる分のライト系命令を先
取りすることができ、TWAを有効に利用することがで
きる。
Therefore, at the time of EOT detection, it is possible to pre-fetch write-related commands that can fully utilize TWA according to the recording density and maximum block length, and it is possible to use TWA effectively.

更に、フィジカルEOTモードであれば、第7図のステ
ップ■においてアーリーウオーニングエリアEWA内で
は、バッファサイズCBS i ZEは最終制限値CB
E以上なら「2」づつ減少していく。
Furthermore, in the physical EOT mode, the buffer size CBS i ZE is equal to the final limit value CB in the early warning area EWA in step ① of FIG.
If it is E or higher, it will decrease by "2".

例えば、命令バッファに蓄積しうるライト系命令が64
であったものを第11図(B)の点線の如く、漸次減少
するようにする。
For example, the number of write instructions that can be accumulated in the instruction buffer is 64.
is gradually decreased as shown by the dotted line in FIG. 11(B).

従って、ライト系命令の蓄積可能数を制限するため、ラ
イトデータを伴わないイレーズ、ライトテープマーク等
のライト系命令も制限されるから、磁気テープ内(特に
TWA内)に全てのライト系命令の実行ができ、ライト
系命令の処理不能を防止することができる。
Therefore, in order to limit the number of write-related instructions that can be stored, write-related instructions such as erase and write tape mark that do not involve write data are also limited, so all write-related instructions can be stored within the magnetic tape (especially within the TWA). can be executed, and can prevent write-related instructions from being unable to be processed.

即ち、テープ終端近傍に達しEWA信号がオンとなると
、バッファサイズCBS i ZEば最大値「64」か
らホストコントローラからのライト系コマンド受信毎に
「2」づつ減少され、即ち命令格納許可数が漸次減少す
る。更にTWA (EOT)信号が発せられると、命令
記憶数CBSTKが零となるまで終了報告をしない。
That is, when the tape reaches near the end and the EWA signal turns on, the buffer size CBS i ZE is decreased from the maximum value "64" by "2" each time a write command is received from the host controller, that is, the number of commands allowed to be stored gradually decreases. Decrease. Furthermore, when the TWA (EOT) signal is issued, no completion report is made until the instruction storage number CBSTK becomes zero.

このため、先取り命令数は第1図(C)の点線で示す如
く漸次減少する。
Therefore, the number of prefetch instructions gradually decreases as shown by the dotted line in FIG. 1(C).

このような漸次減少する様にすると、ホストコントロー
ラは次のコマンドを受付けるまでの時間が極度に長びか
されることがない。これに対し一挙に減少してしまうと
、ホストコントローラは、(M積済の命令数)−(減少
後の蓄積可能命令数−1)だけの数の命令をドライブが
実行するまで次の命令が受付けられないので、ホストコ
ントロ−ラの時間監視によってタイムオーバーによる装
置異常と見なされてしまい不都合が生じてしまう。
This gradual decrease prevents the host controller from taking an extremely long time to accept the next command. On the other hand, if the number decreases all at once, the host controller will wait until the drive executes the number of instructions equal to (Number of accumulated instructions) - (Number of instructions that can be accumulated after reduction - 1) until the next instruction is executed. Since the request is not accepted, the host controller's time monitoring detects that the device is abnormal due to a timeout, resulting in an inconvenience.

従って漸次減少によりこの不都合が防止できる。Therefore, this inconvenience can be prevented by gradual reduction.

この漸次減少は、最終制限値CBE以上である時に行わ
れ、最終制限値CBEは記録密度と最大ブロック長に応
じて順次変更される。
This gradual reduction is performed when the value is equal to or greater than the final limit value CBE, and the final limit value CBE is sequentially changed according to the recording density and the maximum block length.

(5)又、第7図のステップ■の如く、ホストコントロ
ーラから起動(Go)がかかり、ライト系コマンドが与
えられると、先づ命令バッファの命令記憶可能数内であ
るかを調べ、命令記憶可能数内であれば、このコマンド
を受付け、命令記憶可能数を越えると、このコマンドの
受付けを保留してデータビジーDBYを上げない。
(5) Also, as shown in step ① in Figure 7, when the host controller activates (Go) and a write command is given, it is first checked to see if the number of instructions that can be stored in the instruction buffer is within the number of instructions that can be stored. If the number is within the allowable number, this command is accepted; if the number exceeds the storable number of commands, acceptance of this command is suspended and the data busy DBY is not raised.

即ち、第4図(B)の如く、ドライブ側が命令ハソファ
内の命令を実行し、命令記憶可能数以内になるまでデー
タビジーを上げず、命令記憶可能数以内となると、デー
タビジーを上げ、処理実行中をホストコントローラへ通
知する。
That is, as shown in FIG. 4(B), the drive side executes the instructions in the instruction processor and does not increase the data busy until the number of instructions is within the storable number of instructions. Notify the host controller that it is being executed.

同様に、ステップ■において、データバッファの空き容
量が最大ブロック長以上であるかを調べ最大ブロック長
以上であれば、ホストコントローラからのライトデータ
の転送を受け、最大ブロック長以下なら、データ転送を
保留してデータビジ−DBYを上げない。
Similarly, in step (2), it is checked whether the free space in the data buffer is greater than or equal to the maximum block length, and if it is greater than or equal to the maximum block length, the write data is transferred from the host controller, and if it is less than the maximum block length, data transfer is not performed. Do not raise data busy DBY on hold.

従って、ドライブ側が命令バッファ内の命令を実行し、
データバッファの空き容量が最大ブロンク長以上になる
までデータビジーを上げず、最大ブロック長以上になる
と、データビジーを上げ、転送受付けを可能とする。
Therefore, the drive side executes the instructions in the instruction buffer,
Data busy is not raised until the free capacity of the data buffer exceeds the maximum block length, and when it becomes equal to or greater than the maximum block length, data busy is raised to enable transfer acceptance.

そして、ステップ■において、転送されたブロック長が
最大ブロック長より大なら、実際に転送されたブロック
長を次回より最大ブロック長として採用する。
Then, in step (2), if the transferred block length is larger than the maximum block length, the actually transferred block length is adopted as the maximum block length from next time onwards.

このため、リトライ回数の減少及び待ち時間の短縮の効
果が生じる。
Therefore, the effect of reducing the number of retries and shortening waiting time is produced.

(g+他の実施例の説明 上述の実施例では、ロジカルEOTモードで動作中にリ
ード系命令の受信実行によって前述の(3)で説明した
如く走行カウンタの計数値が保証できなくなった場合に
フィジカルEOTモードに移行するようにしているが、
操作パネルよりの措示でRAM3 l bのエリアEA
のLEOTモードフラグを強制オフすることによって、
フィジカルEOTモードのみの動作が可能とするように
してもよい。
(g + Description of other embodiments In the above embodiment, when the count value of the running counter cannot be guaranteed as explained in (3) above due to the reception and execution of a read-related command while operating in the logical EOT mode, the physical I am trying to transition to EOT mode, but
Area EA of RAM 3 l b can be set using the operation panel.
By forcibly turning off the LEOT mode flag of
It may be possible to enable operation only in the physical EOT mode.

又、上述の実施例では、フィジカルEOTモードにおい
て、ライト系の命令の蓄積可能数をホストからのライト
系コマンド受信毎に漸次減少しているが、−挙に減少し
てもよく、ドライブ側の複数命令実行毎に漸次減少する
ようにしてもよい。
Furthermore, in the above embodiment, in the physical EOT mode, the number of write-related commands that can be stored is gradually reduced each time a write-related command is received from the host, but it may be reduced all at once, and The number may be gradually decreased each time a plurality of instructions are executed.

更にドライブ制御s2と命令データ先取り制御部が一体
であってもよく、ドライブ1もテープバッファを有する
ものであってもよい。
Further, the drive control s2 and the command data prefetch control section may be integrated, and the drive 1 may also have a tape buffer.

しかも、最大ブロック長MAXLも受信ブロックにより
変更せず、ステップ的に変更するようにしてもよい。
Moreover, the maximum block length MAXL may not be changed depending on the received block, but may be changed in steps.

以上本発明を実施例により説明したが、本発明は本発明
の主旨に従い種々の変形が可能であり、本発明からこれ
らを排除するものではない。
Although the present invention has been described above using examples, the present invention can be modified in various ways according to the gist of the present invention, and these are not excluded from the present invention.

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

以上説明した様に、本発明によれば、第1のモード(ロ
ジカルEOTモード)と第2のモード(フィジカルEO
Tモード)との両方の命令先取り制御モードを有してい
るので、アーリーウオーニングエリアEWAにおいても
、ライト系命令先取り数を制限せず、ストリーミング走
行を長く維持でる第1のモードと、EWAにおいて、ラ
イト系命令先取り数を適度に制限し、ストリーミング走
行を効率良(維持しながらテープウオーニングエリアT
WAに書込めるブロックを最大としうる第2のモードと
を自動又は手動によって選択することができるという効
果を奏し、ストリーミング動作を円滑且つ効率良くテー
プ終端近傍領域EWAで実行しうる命令先取り制御が可
能となる。
As explained above, according to the present invention, there are two modes: a first mode (logical EOT mode) and a second mode (physical EOT mode).
Since it has both instruction prefetch control modes (T mode), even in early warning area EWA, the first mode does not limit the number of write instructions prefetch and can maintain streaming for a long time, and in EWA , the number of prefetching of write instructions is moderately limited, and the streaming run is made efficient (while maintaining the tape walking area T
The second mode that can maximize the number of blocks that can be written to the WA can be selected automatically or manually, and command preemption control that allows streaming operations to be executed smoothly and efficiently in the area EWA near the end of the tape is possible. becomes.

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

第1図は本発明の原理説明図、 第2図は本発明の一実施例全体構成図、第3図は第2図
構成の要部構成図、 第4図は第2図構成のデータ転送動作説明図、第5図は
本発明の一実施例起動処理フロー図、第6図は第5図の
初期設定処理フロー図、第7図は本発明の一実施例のホ
ストに対するライト系処理フロー図、 第8図はホストに対するリード系処理フロー図、第9図
はドライブに対する起動処理フロー図、第10図はドラ
イブに対するライト/リード処理フロー図、 第11図は全体動作の説明図、 第12図は磁気テープ装置の命令先取り制御説明図、 第13図は従来技術の説明図である。 図中、  1−・−磁気テープドライブ部、2− ドラ
イブ制御部、 3−命令・データ先取り制御部、 CBUF−命令バッファ、 34−データバッファ。
Fig. 1 is a diagram explaining the principle of the present invention, Fig. 2 is an overall configuration diagram of an embodiment of the present invention, Fig. 3 is a main part configuration diagram of the configuration shown in Fig. 2, and Fig. 4 is a data transfer diagram of the configuration shown in Fig. 2. 5 is a flowchart of startup processing according to an embodiment of the present invention, FIG. 6 is a flowchart of initialization processing of FIG. 5, and FIG. 7 is a flowchart of write-related processing for a host according to an embodiment of the present invention. Figure 8 is a flow diagram of read processing for the host, Figure 9 is a flow diagram of startup processing for the drive, Figure 10 is a flow diagram of write/read processing for the drive, Figure 11 is an explanatory diagram of the overall operation, The figure is an explanatory diagram of command prefetch control of a magnetic tape device, and FIG. 13 is an explanatory diagram of the prior art. In the figure, 1--magnetic tape drive section, 2-- drive control section, 3-- instruction/data prefetch control section, CBUF-- instruction buffer, 34-- data buffer.

Claims (2)

【特許請求の範囲】[Claims] (1)磁気ヘッドと磁気テープ駆動機構を有する磁気テ
ープドライブ部と、 上位から与えられた命令を複数先取り蓄積しうるバッフ
ァ部と、 該バッファ部の蓄積された命令に従って該磁気テープド
ライブ部を制御して該命令を実行する制御部とを備える
磁気テープ装置において、 該制御部が該磁気テープドライブ部によって走行される
磁気テープの終端領域近傍を検出した後、ライト系命令
の実行中に該終端領域近傍検出時から該磁気テープの走
行距離を計数し、 該計数値が一定値に達したことでテープ終端領域を検出
したものとみなし、該終端領域近傍検出から該テープ終
端領域検出とみなした時までの間該先取りしうる命令数
を減少しない第1のモードを実行し、 且つ該第1のモードの実行を中断した場合又は該第1の
モードを実行しない場合に、 該終端領域近傍検出に基づいて該磁気テープの終端領域
検出までの間該先取りしうる命令数を減少するようにし
たことを特徴とする磁気テープ装置の命令先取り制御方
法。
(1) A magnetic tape drive unit having a magnetic head and a magnetic tape drive mechanism; a buffer unit capable of preemptively storing multiple commands given from a higher level; and controlling the magnetic tape drive unit according to the commands stored in the buffer unit. and a control unit that executes the command, after the control unit detects the vicinity of the end area of the magnetic tape run by the magnetic tape drive unit, the end area of the magnetic tape is detected during execution of the write command. The running distance of the magnetic tape was counted from the time of detecting the vicinity of the area, and when the counted value reached a certain value, it was considered that the tape end area was detected, and the detection of the vicinity of the end area was considered as the detection of the tape end area. Detecting the vicinity of the terminal area when executing the first mode that does not reduce the number of instructions that can be prefetched until the end of the first mode, and interrupting the execution of the first mode or not executing the first mode. A method for prefetching instructions in a magnetic tape device, characterized in that the number of instructions that can be prefetched until detection of the end area of the magnetic tape is reduced based on the following.
(2)磁気ヘッドと磁気テープ駆動機構を有する磁気テ
ープドライブ部と、 上位から与えられた命令を複数先取り蓄積しうるバッフ
ァ部を有する命令先取り制御部と、該バッファ部の蓄積
された命令に従って該磁気テープドライブ部を制御して
該命令を実行するドライブ制御部とを備える磁気テープ
装置であって、該命令先取り制御部は、該バッファ部に
先取りしうる命令数を管理するとともに、 ライト系命令実行中に該ドライブ制御部からの該磁気テ
ープの終端領域近傍を示す検出信号に基いて該磁気テー
プの走行距離を計数し、該計数値が一定値に達したこと
でテープ終端領域検出とみなし、該終端領域近傍検出か
ら該テープ終端領域検出とみなした時までの間該先取り
しうる命令数を減少しない第1のモードと、 該終端領域近傍検出信号に基づいて該終端領域近傍検出
から該ドライブ制御部からの終端領域検出時までの間該
先取りしうる命令数を減少する第2のモードとを有する
ことを特徴とする磁気テープ装置の命令先取り制御装置
(2) a magnetic tape drive section having a magnetic head and a magnetic tape drive mechanism; an instruction prefetch control section having a buffer section capable of preemptively storing a plurality of instructions given from a higher level; A magnetic tape device comprising: a drive control unit that controls a magnetic tape drive unit to execute the instruction; the instruction prefetch control unit manages the number of instructions that can be prefetched into the buffer unit; During execution, the running distance of the magnetic tape is counted based on a detection signal indicating the vicinity of the end area of the magnetic tape from the drive control unit, and when the counted value reaches a certain value, it is considered that the end area of the tape has been detected. , a first mode in which the number of instructions that can be prefetched is not reduced from the detection of the vicinity of the end area until the time when the tape end area is deemed detected; An instruction prefetch control device for a magnetic tape device, comprising a second mode in which the number of instructions that can be prefetched is reduced until an end area is detected from a drive control unit.
JP60235807A 1985-07-12 1985-10-22 Method and apparatus for controlling instruction prefetching of magnetic tape device Granted JPS6295755A (en)

Priority Applications (8)

Application Number Priority Date Filing Date Title
JP60235807A JPS6295755A (en) 1985-10-22 1985-10-22 Method and apparatus for controlling instruction prefetching of magnetic tape device
US06/883,630 US4757396A (en) 1985-07-12 1986-07-09 Magnetic tape system with command prefetch means
AU60031/86A AU576090B2 (en) 1985-07-12 1986-07-10 Magnetic tape system
CA513624A CA1273710C (en) 1985-07-12 1986-07-11 Magnetic tape system with command prefetch means
DE86305345T DE3689021T2 (en) 1985-07-12 1986-07-11 Magnetic tape system with command preselection means.
EP86305345A EP0213703B1 (en) 1985-07-12 1986-07-11 Magnetic tape system with command prefetch means
KR8605635A KR920004769B1 (en) 1985-07-12 1986-07-12 Magnetic tape system having command pretetching means
CA000614390A CA1280510C (en) 1985-07-12 1989-09-28 Magnetic tape system with command prefetch means

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60235807A JPS6295755A (en) 1985-10-22 1985-10-22 Method and apparatus for controlling instruction prefetching of magnetic tape device

Publications (2)

Publication Number Publication Date
JPS6295755A true JPS6295755A (en) 1987-05-02
JPH0452967B2 JPH0452967B2 (en) 1992-08-25

Family

ID=16991540

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60235807A Granted JPS6295755A (en) 1985-07-12 1985-10-22 Method and apparatus for controlling instruction prefetching of magnetic tape device

Country Status (1)

Country Link
JP (1) JPS6295755A (en)

Also Published As

Publication number Publication date
JPH0452967B2 (en) 1992-08-25

Similar Documents

Publication Publication Date Title
US5249271A (en) Buffer memory data flow controller
EP0093239A2 (en) Lookahead I/O device control subsystem
US5606684A (en) On-line dumping system and disk sub-system
US6826636B2 (en) Method and architecture capable of programming and controlling access data and instructions
KR900001695B1 (en) Magnetic tape prefetch control system
JPH08212015A (en) Driving device
JPS6292022A (en) Control system for transfer of data
JPS6295755A (en) Method and apparatus for controlling instruction prefetching of magnetic tape device
US4757396A (en) Magnetic tape system with command prefetch means
JPS6214305A (en) Writing error processing method for magnetic tape device
JPH07105084A (en) Magnetic tape look-ahead controller
JPS6284331A (en) Method and device for controlling prefetch of instruction of magnetic tape device
US6535953B1 (en) Magnetic disk, method of accessing magnetic disk device, and recording medium storing disk access control program for magnetic disk device
JPH0452965B2 (en)
JPS6215627A (en) Method and device for instruction prefetch control of magnetic tape device
JP3122702B2 (en) Disk device write-back control method
JPH0456334B2 (en)
US4977495A (en) System and method for accessing a cache memory which is located in the main memory of a large data processing system
EP0278425B1 (en) Data processing system and method with management of a mass storage buffer
US20060031604A1 (en) DMA transfer apparatus and method of controlling data transfer
JP2982910B2 (en) Disk drive seek control method and apparatus
JPH0219541B2 (en)
JPH0477942A (en) Stop system for pre-fetch function for cache memory
JPS59173867A (en) Control system for transfer of disk cache data
JPH02201678A (en) Channel device

Legal Events

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