JP2001101075A - Disk storage device - Google Patents

Disk storage device

Info

Publication number
JP2001101075A
JP2001101075A JP27351899A JP27351899A JP2001101075A JP 2001101075 A JP2001101075 A JP 2001101075A JP 27351899 A JP27351899 A JP 27351899A JP 27351899 A JP27351899 A JP 27351899A JP 2001101075 A JP2001101075 A JP 2001101075A
Authority
JP
Japan
Prior art keywords
data
cache memory
read
host
disk
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP27351899A
Other languages
Japanese (ja)
Inventor
Shinya Iguchi
慎也 井口
Motoyasu Tsunoda
元泰 角田
Yukie Hiratsuka
幸恵 平塚
Manabu Nishikawa
西川  学
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP27351899A priority Critical patent/JP2001101075A/en
Publication of JP2001101075A publication Critical patent/JP2001101075A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve the speed of the interruption of pre-reading processing when a write/read command from a host is issued during the pre-reading processing of a cache memory in a disk device on which a cache memory is loaded. SOLUTION: An interface is provided with a function for detecting a command. Upon receiving the command from a host, the interface issues a command detection interfering signal to a sequencer, and the sequencer interrupts the transfer of pre-read data by controlling a data multiplexer, and stops pre-reading by stopping a disk formatter, and calculates the data transferring position of a cache memory by operating a sector boundary calculating circuit and a leading address register and an address pointer. Upon receiving a write command, write data are written from an address following the pre-read data interrupting position of the cache memory, and upon receiving a read command, when any data requested by the host are not present in the cache memory, the pre-reading is stopped, and seek is started.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、キャッシュメモリ
を搭載した記憶装置関し、特に先読み機能を持ったキャ
ッシュメモリの制御に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a storage device equipped with a cache memory, and more particularly to control of a cache memory having a prefetch function.

【0002】[0002]

【従来の技術】磁気ディスクを用いた記憶装置におい
て、磁気ディスクのアクセス速度は、それを使用するホ
ストのデータ転送速度と比較してかなり低速である。こ
のため、従来から磁気ディスクを用いた記憶装置にはキ
ャッシュメモリが搭載されてきた。これを用いて、一度
磁気ディスクから読み出されたデータをキャッシュメモ
リへ保存し、さらに、ホストが一度要求したデータのロ
ジカルブロックアドレス(以下、LBA)に後続するLB
Aのデータを磁気ディスクよりあらかじめ読み出す先読
みと呼ばれる機能を用いることで、ホストへのデータ転
送速度を向上させてきた。
2. Description of the Related Art In a storage device using a magnetic disk, an access speed of the magnetic disk is considerably lower than a data transfer speed of a host using the magnetic disk. For this reason, cache memories have conventionally been mounted on storage devices using magnetic disks. By using this, the data once read from the magnetic disk is stored in the cache memory, and the LB following the logical block address (hereinafter, LBA) of the data once requested by the host is used.
The data transfer speed to the host has been improved by using a function called read-ahead in which the data of A is read in advance from the magnetic disk.

【0003】ところで、磁気ディスクを用いた記憶装置
のインタフェースの仕様によっては、 ホストからライ
トコマンドとライトデータを連続して転送してくるもの
がある。この場合、ライトコマンドを受けると同時に、
キャッシュメモリへライトデータを転送する。そして、
先読みを行なっていた場合には先読みを停止してライト
データをキャッシュメモリに格納する。一方、磁気ディ
スク装置のCPUの制御によりサーボ系制御装置を動作
させて、磁気ディスク上のライトデータ記録位置のシー
クを行う。シークが完了するとキャッシュメモリに格納
されたライトデータをディスクドライブ上に書き込むと
いう処理をする。従来技術では、特開平11-110291に記
載されているように、先読みの制御をファームウェアレ
ベルで行なっている。ファームウェアで行なう制御は、
ハードウェアで行なわれている先読みの動作に比較して
遅いのが一般である。
By the way, depending on the specifications of an interface of a storage device using a magnetic disk, there is a case where a write command and write data are continuously transferred from a host. In this case, while receiving the write command,
Transfer the write data to the cache memory. And
If the prefetch is being performed, the prefetch is stopped and the write data is stored in the cache memory. On the other hand, the servo system control device is operated under the control of the CPU of the magnetic disk device to seek the write data recording position on the magnetic disk. When the seek is completed, the write data stored in the cache memory is written on the disk drive. In the prior art, as described in JP-A-11-110291, read-ahead control is performed at the firmware level. The control performed by the firmware is
Generally, the operation is slower than the prefetch operation performed by hardware.

【0004】また、ホストからリードコマンドを受けた
場合も、キャッシュメモリ上にリード要求のあったデー
タが存在せず、さらに先読み処理を行っている場合、フ
ァームウェアレベルで先読みを停止する。そして、リー
ド要求のあったデータが存在する磁気ディスクドライブ
上の領域をシークして該当データを読み出し、キャッシ
ュメモリへ転送し、格納せしめる。
Also, when a read command is received from the host, if there is no data requested to be read in the cache memory and further prefetching is being performed, prefetching is stopped at the firmware level. Then, an area on the magnetic disk drive where the data requested to be read exists is sought to read out the corresponding data, transferred to the cache memory, and stored.

【0005】[0005]

【発明が解決しようとする課題】一般に、ライトコマン
ドが来たときファームウェアの介在なしに、ハードウェ
アの制御によりディスク制御装置が自動的にキャッシュ
メモリへライトデータを転送するオートライトと呼ばれ
る機能が用いられる。一方、ディスク制御装置がキャッ
シュメモリに先読み処理を行なっているときは、ファー
ムウェアがライトコマンドに応答して実際に先読み中断
処理を完了するまでの間には時間がかかり、直ぐには先
読みが停止されず、先読みがある程度継続する。例えば
先読みが停止するまで数十から数百セクタの余裕を見な
ければならない場合がある。このため、キャッシュメモ
リ上の現在の先読み位置の直後へライトデータを転送
し、書き込みを行なうと、継続している次の先読みデー
タによってライトデータが上書きされてしまうという問
題が生じる。このため、現在の先読み位置から一定の間
隔を置いた位置にライトデータを転送するようにライト
データ転送開始位置を示すオートライトポインタを予め
設定する。即ち、ファームウェアの制御により実際に先
取りが停止されるまでの先取りされるセクタの最大予想
量だけ間隔をおいた位置にライトデータを書き込むよう
にしている。しかし、この手法だと実際に先読み(LA
H:Look Ahead)が停止した位置とライトデ
ータ書き込み開始位置の間の領域が無駄になる。
Generally, when a write command is received, a function called auto-write is used in which a disk controller automatically transfers write data to a cache memory under the control of hardware without the intervention of firmware. Can be On the other hand, when the disk controller is performing prefetch processing on the cache memory, it takes time until the firmware actually completes the prefetch suspension processing in response to the write command, and the prefetch is not immediately stopped. , Prefetching continues to some extent. For example, there is a case where it is necessary to look at a margin of several tens to several hundred sectors until the prefetch stops. For this reason, if write data is transferred to the cache memory immediately after the current prefetch position and writing is performed, a problem occurs that the write data is overwritten by the next prefetch data that continues. For this reason, an auto-write pointer indicating the write data transfer start position is set in advance so that the write data is transferred to a position at a fixed interval from the current pre-read position. That is, the write data is written at a position spaced by the maximum expected amount of the prefetched sector until the prefetch is actually stopped by the control of the firmware. However, with this method, look-ahead (LA)
The area between the position where H: Look Ahead stops and the write data write start position is wasted.

【0006】また、上記従来技術では、リードコマンド
を受領した場合、キャッシュメモリ内にホスト要求分の
データが存在しなければ、ファームウェアで先読みを中
断した後、磁気ディスクの該当データの存在する位置へ
シークを行うため、リードコマンド受領からシーク開始
まで時間がかかると言う問題がある。
Further, in the above-mentioned prior art, when a read command is received, if the data requested by the host does not exist in the cache memory, the pre-reading is interrupted by the firmware and then the magnetic disk is moved to the position where the data exists. Since the seek is performed, there is a problem that it takes time from the reception of the read command to the start of the seek.

【0007】本発明の目的は、キャッシュメモリへの先
読みを早く停止することにある。
An object of the present invention is to stop prefetching into a cache memory early.

【0008】本発明の別の目的は上記の先読みが停止し
た位置とライトデータ転送開始位置の間の領域が無駄に
なるという問題を改善し、キャッシュメモリの使用効率
を向上することにある。
Another object of the present invention is to improve the problem of wasting the area between the position where the prefetching is stopped and the write data transfer start position, and improve the efficiency of use of the cache memory.

【0009】また、本発明の別の目的は、ファームウェ
アにより先読み停止の制御をしていることに起因する上
記のリードコマンド受領からシーク開始まで時間がかか
るという問題を改善し、リードコマンド受領からシーク
開始までの時間を短縮することにある。
Another object of the present invention is to improve the problem that it takes a long time from the reception of the read command to the start of the seek due to the control of the prefetch by the firmware. The goal is to reduce the time to start.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するため
に、ホストからコマンドが送信されて来た場合にこれを
検出し割り込みを発生させる手段を有するコマンド検出
回路と、割り込みを受けてディスクフォーマッタからキ
ャッシュメモリへのデータ転送を遮断し、ディスクフォ
ーマッタを停止させることで先読みを中断するシーケン
サを有する。このようにハードウェアで先読みを中断さ
せる。そして、ライトコマンドの場合は、先読みを中断
したキャッシュメモリ上の位置を記録したアドレスポイ
ンタと、そのアドレスポインタの値から、最後に先読み
を行っていたセクタの先頭のキャッシュメモリ上のアド
レスを計算する手段を有するセクタ境界計算回路と、セ
クタ境界計算回路の計算結果をオートライトポインタへ
セットし、キャッシュメモリ上の先読みデータの直後へ
ライトデータを書き込むためにオートライトを実行する
手段を有するシーケンサを搭載したディスク記憶装置を
構成する。
In order to achieve the above object, when a command is transmitted from a host, a command detection circuit having means for detecting the command and generating an interrupt, and a disk formatter receiving the interrupt are provided. And a sequencer that interrupts the prefetching by interrupting data transfer from the cache memory to the cache memory and stopping the disk formatter. In this way, prefetching is interrupted by hardware. In the case of a write command, the address in the cache memory at the head of the last prefetched sector is calculated from the address pointer that records the position in the cache memory where the prefetch was interrupted and the value of the address pointer. Equipped with a sector boundary calculation circuit having means and a sequencer having means for setting a calculation result of the sector boundary calculation circuit to an auto-write pointer and executing auto-write to write write data immediately after pre-read data in the cache memory The disk storage device is configured.

【0011】リードコマンドの場合は同様に先読みの中
断を行ない、CPUの指示によりホストから要求された
データのキャッシュメモリへの記録をするか、先読みの
再開を行なう。
In the case of a read command, the prefetching is similarly interrupted, and the data requested by the host is recorded in the cache memory according to the instruction of the CPU, or the prefetching is restarted.

【0012】[0012]

【発明の実施の形態】図1は、本発明を用いて構成され
たハードディスクを用いた情報機器の構成図の一例であ
る。ここでは概略構成部分が示されており、詳細は後述
するものがある。ホスト101はバス118を用いてハ
ードディスク102と接続されている。 ディスク記憶
装置であるハードディスク102はディスク制御装置1
03、キャッシュメモリ104、ROM105、CPU
106、サーボ系制御回路107そしてディスクドライ
ブ108から構成されている。ディスク制御装置103
は、インタフェース109、シーケンサ110、セクタ
境界計算回路111、先頭アドレスレジスタ112、ア
ドレスポインタ113、アドレスマルチプレクサ11
4、データマルチプレクサ115、ECC116、ディ
スクフォーマッタ117を有している。
FIG. 1 is an example of a configuration diagram of an information device using a hard disk configured according to the present invention. Here, a schematic configuration portion is shown, and details will be described later. The host 101 is connected to the hard disk 102 using a bus 118. The hard disk 102 which is a disk storage device is a disk controller 1
03, cache memory 104, ROM 105, CPU
106, a servo system control circuit 107 and a disk drive 108. Disk control device 103
Are an interface 109, a sequencer 110, a sector boundary calculation circuit 111, a head address register 112, an address pointer 113, and an address multiplexer 11.
4. It has a data multiplexer 115, an ECC 116, and a disk formatter 117.

【0013】キャッシュメモリ104は、ハードディス
ク102とホスト101間で送受を行うデータを記憶し
ておくと共に、キャッシュメモリ104内のデータを管
理するためのセグメント管理テーブルなどの情報を記憶
する場合もある。本実施例においては、キャッシュメモ
リのワークエリア内にセグメント管理テーブルが格納さ
れている。ROM105はハードディスク102の制御
に必要なファームウェア、制御パラメータなどが記憶さ
れている。CPU106は、ファームウェアの実行、サ
ーボ系制御回路107の制御に用いられる。
The cache memory 104 may store data to be transmitted and received between the hard disk 102 and the host 101, and may also store information such as a segment management table for managing data in the cache memory 104. In this embodiment, a segment management table is stored in the work area of the cache memory. The ROM 105 stores firmware, control parameters, and the like necessary for controlling the hard disk 102. The CPU 106 is used for executing firmware and controlling the servo control circuit 107.

【0014】サーボ系制御回路107はディスクドライ
ブ108の機械系とそれに関連のある部分の制御(例え
ばライトコマンド、またはリードコマンドに応答したシ
ーク動作)を行う。ディスクドライブ108はデータを
記録する磁気ディスク、磁気ディスクからの信号と、デ
ィスクフォーマッタとの間のデータ変換を行い読み出し
書き込みを行うためのR/Wチャネル、磁気ディスクを
制御する機械系等から構成されている。
The servo system control circuit 107 controls the mechanical system of the disk drive 108 and related parts (for example, a seek operation in response to a write command or a read command). The disk drive 108 includes a magnetic disk for recording data, an R / W channel for performing data conversion between a signal from the magnetic disk and a disk formatter to perform read / write, and a mechanical system for controlling the magnetic disk. ing.

【0015】ディスクフォーマッタ117はディスクド
ライブへのデータのフォーマット管理回路、エラーチェ
ック回路、データを変調してディスクドライブ108に
書き込む回路、ディスクドライブ108から検出した信
号を復調して読み取る回路、リード、ライトを止める処
理をする回路などを含む。インタフェース109は、ホ
スト101とバス118を介して接続されており、ホス
ト101とハードディスク102間の実際のデータ転送
を制御し、必要なデータを内部データバス125へ載せ
る。そして、必要に応じて特定のコマンドを検出してコ
マンド検出割込み信号120を発行し、シーケンサ11
0へ特定のコマンドを受けたことを知らせる。
The disk formatter 117 includes a data format management circuit for the disk drive, an error check circuit, a circuit for modulating data and writing the data to the disk drive 108, a circuit for demodulating and reading a signal detected from the disk drive 108, and a read / write circuit. And a circuit for performing a process for stopping the operation. The interface 109 is connected to the host 101 via a bus 118, controls actual data transfer between the host 101 and the hard disk 102, and places necessary data on the internal data bus 125. Then, if necessary, a specific command is detected, a command detection interrupt signal 120 is issued, and the sequencer 11
Inform 0 that a particular command has been received.

【0016】シーケンサ110はハードウェアによる制
御回路であり、インタフェース制御信号119、モジュ
ール制御信号129を用いて、ディスク制御装置103
内の各モジュールおよびキャッシュメモリ104を制御
する。また、必要に応じてCPU106へ割り込みを発
生させる。セクタ境界計算回路111は、先読み停止時
にアドレスポインタ113の値を参照しアドレスポイン
タ113の値をセクタ境界に対応する値に修正する。そ
して、先頭アドレスレジスタ112に、修正したアドレ
スポインタ113の値をセットする。先頭アドレスレジ
スタ112は、データを転送するキャッシュメモリ10
4の先頭アドレスを記憶する。アドレスポインタ113
は先読み及びホスト101からキャッシュメモリ104
へライトデータを転送する際に、キャッシュメモリ10
4のアドレスをデータの書き込みに従って更新する。
The sequencer 110 is a hardware control circuit. The sequencer 110 uses the interface control signal 119 and the module control signal 129 to control the disk controller 103.
And the cache memory 104 are controlled. Further, an interrupt is generated to the CPU 106 as necessary. The sector boundary calculation circuit 111 refers to the value of the address pointer 113 at the time of stopping prefetching and corrects the value of the address pointer 113 to a value corresponding to the sector boundary. Then, the corrected value of the address pointer 113 is set in the head address register 112. The start address register 112 is provided in the cache memory 10 for transferring data.
4 is stored. Address pointer 113
Is the prefetch and the cache memory 104 from the host 101
When write data is transferred to the cache memory 10
4 is updated in accordance with the writing of data.

【0017】アドレスマルチプレクサ114は、キャッ
シュメモリ104と接続するディスク制御装置103内
の内部アドレスバス126とCPUアドレスバス122
及びフォーマッタアドレスバス127を切り替える。デ
ータマルチプレクサ115はCPUデータバス123及
びフォーマッタデータバス128とディスク制御装置1
03内の内部データバス125との接続を制御する。E
CC116はディスクフォーマッタ117とECCデー
タバス130を介して接続されており、ディスクドライ
ブ108より読み出したデータのエラー訂正を行う。デ
ィスクフォーマッタ117は、信号バス132を介して
ディスクドライブ108との間でデータ転送を行う。
The address multiplexer 114 has an internal address bus 126 and a CPU address bus 122 in the disk controller 103 connected to the cache memory 104.
And the formatter address bus 127 is switched. The data multiplexer 115 is connected to the CPU data bus 123, the formatter data bus 128, and the disk controller 1
3 controls the connection with the internal data bus 125. E
The CC 116 is connected to the disk formatter 117 via the ECC data bus 130, and performs error correction of data read from the disk drive 108. The disk formatter 117 performs data transfer with the disk drive 108 via the signal bus 132.

【0018】本発明で用いられるキャッシュメモリ10
4の構成について説明する。セグメントは可変長で有
り、固定長であるセクタ(例えば512バイト)を複数個
含む。図7にこの方式におけるキャッシュメモリ104
内の状態とセグメント管理テーブルを示す。キャッシュ
メモリ104はワークエリアとデータエリアに分けて使
用される。ワークエリアには、ファームウェアの情報お
よびセグメント管理テーブル等が記憶される。ただし、
セグメント管理テーブルは高速なアクセスが要求される
ので、キャッシュメモリ104以外の場所(ディスク制
御装置103内、CPU106内の作業用不揮発性メモ
リ等)の記録領域に記録される場合もある。
The cache memory 10 used in the present invention
4 will be described. The segment is variable in length and includes a plurality of fixed-length sectors (for example, 512 bytes). FIG. 7 shows the cache memory 104 in this system.
And the segment management table. The cache memory 104 is used separately for a work area and a data area. The work area stores firmware information, a segment management table, and the like. However,
Since high-speed access is required for the segment management table, the segment management table may be recorded in a recording area other than the cache memory 104 (such as a working nonvolatile memory in the disk control device 103 or the CPU 106).

【0019】データエリアはハードディスク102とホ
スト101間で送受されるデータが記憶される。本方式
では、データエリア内のLBAの連続するデータを一ま
とまりとしてセグメントとし、各セグメントをセグメン
ト管理テーブルで管理する。セグメント管理テーブルの
内容は、図7に示すように、各セグメント内のデータの
先頭LBA、キャッシュメモリ104内でのデータの先
頭アドレス、セグメントのデータサイズが記録されてい
る。新しくデータを記憶する場合、図1のアドレスポイ
ンタ113の示すアドレスからデータを記憶させ、デー
タの記憶が終了した時点で、データの記憶を開始した先
頭アドレスおよび対応するLBA、そして記憶したデー
タのサイズをセグメント管理テーブルに登録し、生成し
たセグメントの最後尾の次のアドレス値にアドレスポイ
ンタ113の値を更新する。
The data area stores data transmitted and received between the hard disk 102 and the host 101. In this method, continuous data of LBAs in the data area are grouped into segments, and each segment is managed by a segment management table. As shown in FIG. 7, the contents of the segment management table record the head LBA of the data in each segment, the head address of the data in the cache memory 104, and the data size of the segment. When new data is stored, the data is stored from the address indicated by the address pointer 113 in FIG. 1, and when the data storage is completed, the head address and the corresponding LBA at which the data storage was started, and the size of the stored data Is registered in the segment management table, and the value of the address pointer 113 is updated to the next address value at the end of the generated segment.

【0020】データエリアはリングバッファになってお
り、データエリアの最後までデータが記憶されると、デ
ータエリアの先頭に戻って後続のデータを記憶させる。
この時、新しいデータによって上書きされるセグメント
が存在する場合、そのセグメントを破棄し、セグメント
管理テーブルの対応するセグメント情報を無効にする。
The data area is a ring buffer. When data is stored to the end of the data area, the data area returns to the head of the data area to store subsequent data.
At this time, if there is a segment to be overwritten by new data, the segment is discarded and the corresponding segment information in the segment management table is invalidated.

【0021】以下にインタフェース109内でライトコ
マンドを検出する場合について説明する。インタフェー
ス109内でライトコマンドを検出するために構成した
インタフェース109の一例を図3に示す。バスコント
ローラ301は、バス制御信号304を用いてシーケン
サ110によって制御され、バス118と内部データバ
ス123とのデータの送受を制御する。ライトコマンド
検出回路302は、バス118を介してホスト101よ
り転送されてきたコマンドの中から、ライトコマンドを
検出し、ライト割り込み信号306(図1バス120の
一部)をシーケンサ110へ発行する。そして、FIF
O303を制御してライトコマンドに後続するデータを
FIFO303へ記憶させる。無論、ホスト101から
のライトデータを直接キャッシュメモリ104へ転送可
能な場合、FIFO303を搭載しない場合もある。F
IFO303はライトデータを一時格納するバッファメ
モリの役目をするものである。FIFO303のデータ
は適当な時期にキャッシュメモリ104に書き込まれ
る。
The case where a write command is detected in the interface 109 will be described below. An example of the interface 109 configured to detect a write command in the interface 109 is shown in FIG. The bus controller 301 is controlled by the sequencer 110 using a bus control signal 304, and controls transmission and reception of data between the bus 118 and the internal data bus 123. The write command detection circuit 302 detects a write command from the commands transferred from the host 101 via the bus 118, and issues a write interrupt signal 306 (part of the bus 120 in FIG. 1) to the sequencer 110. And FIF
By controlling the O303, the data following the write command is stored in the FIFO 303. Of course, when the write data from the host 101 can be directly transferred to the cache memory 104, the FIFO 303 may not be mounted. F
The I / F 303 serves as a buffer memory for temporarily storing write data. The data in the FIFO 303 is written to the cache memory 104 at an appropriate time.

【0022】ライトコマンド検出回路302は検出回路
制御信号305(図1のインタフェース信号119の一
部)によってシーケンサ110から操作することが可能
で、ライトコマンド検出処理をファームウェアで行う場
合等、ライトコマンド検出機能が不要な場合に停止させ
ることが可能である。即ち、従来と同じ機能のディスク
記憶装置としたいニーズがあった場合に対応できるよう
になっている。
The write command detection circuit 302 can be operated from the sequencer 110 by a detection circuit control signal 305 (part of the interface signal 119 in FIG. 1). If the function is unnecessary, it can be stopped. That is, it is possible to cope with a case where there is a need to make a disk storage device having the same function as the conventional one.

【0023】ハードディスク102内で先読みを行って
いる最中に、ホスト101からライトコマンドがハード
ディスク102へ発行された場合について図9のフロー
チャートを用いて説明する。ホスト101からライトコ
マンドが来るとインタフェース109内のライトコマン
ド検出回路302がライトコマンドを検出する(90
1)。同じくライトコマンド検出回路302がライト割
り込みをシーケンサ110に対して発行し、そして、F
IFO303を制御してライトコマンドに後続するデー
タを記憶させる。ホスト101からのデータが直接キャ
ッシュメモリ104へ転送可能な場合か、FIFO30
3をインタフェース109内に搭載していない場合はこ
の処理は行わない(902)。
A case in which a write command is issued from the host 101 to the hard disk 102 while pre-reading is being performed in the hard disk 102 will be described with reference to the flowchart of FIG. When a write command is received from the host 101, the write command detection circuit 302 in the interface 109 detects the write command (90
1). Similarly, the write command detection circuit 302 issues a write interrupt to the sequencer 110, and
It controls the IFO 303 to store the data following the write command. If the data from the host 101 can be directly transferred to the cache memory 104,
3 is not mounted in the interface 109, this processing is not performed (902).

【0024】ライト割り込みを受けたシーケンサ110
は、データマルチプレクサ115を制御してディスクフ
ォーマッタ117からキャッシュメモリ104へのデー
タ転送を遮断する。このとき、CPU106に対して先
読み停止割り込みを発生させる(903)。CPU10
6はサーボ系制御回路107を介してライトデータを格
納する記録位置をシークするようにディスクドライブ1
08へ指示を出す(911)。このとき、シーケンサ1
10は、ディスクフォーマッタ117を制御し、ディス
クドライブ108内のリードゲートを閉じ先読みを中断
させる(904)。
Sequencer 110 that has received a write interrupt
Controls the data multiplexer 115 to block data transfer from the disk formatter 117 to the cache memory 104. At this time, a prefetch stop interrupt is generated for the CPU 106 (903). CPU10
Numeral 6 designates a disk drive 1 via a servo system control circuit 107 for seeking a recording position for storing write data.
08 is instructed (911). At this time, sequencer 1
10 controls the disk formatter 117 to close the read gate in the disk drive 108 and interrupt prefetching (904).

【0025】以下図8、図5を参照しながら図9のフロ
ーの以下のステップを説明する。図8は先読み中断時の
先読み制御信号、リードゲート、キャッシュメモリへの
データ転送、バッファデータのタイミングとキャッシュ
メモリ104内の状態を示したものである。これを用い
て先読み中断時の状態について説明する。図の上部は時
間軸を横方向にとってセクタの書き込み状況を示したも
のである。下部左はキャッシュメモリのセクタが書き込
まれた状況を示し、下部右は書き込みが中途で中断され
た部分の拡大図である。ここで、セクタの先読みはセ
クタ境界に行くまでに停止されるが、ライトデータのオ
ートライト開始位置はセクタの先頭、即ち、セクタ境
界である。途中まで先読みされたセクタのデータはオ
ートライトにより上書きされ、破棄される。
The following steps in the flow of FIG. 9 will be described below with reference to FIGS. FIG. 8 shows the prefetch control signal, read gate, data transfer to the cache memory, the timing of buffer data, and the state in the cache memory 104 when prefetching is interrupted. The state at the time of prefetch interruption will be described using this. The upper part of the figure shows the writing state of the sector with the time axis taken in the horizontal direction. The lower left part shows the situation where the sector of the cache memory is written, and the lower right part is an enlarged view of the part where the writing was interrupted halfway. Here, pre-reading of the sector is stopped before reaching the sector boundary, but the auto-write start position of the write data is at the head of the sector, that is, at the sector boundary. The data of the sector pre-read halfway is overwritten by auto-write and discarded.

【0026】リードゲート自体が1セクタ単位でしか操
作できない場合、リードゲートは先読みを行っていた最
終セクタのデータまで読み出し動作を行う。本実施例で
は、先読み中断処理を迅速に行うために、データマルチ
プレクサ115でキャッシュメモリ102へのデータ転
送を中断した。このため、最終先読みセクタのデータが
一部しか読み出せないので、キャッシュメモリ104内
では最終先読みセクタのデータを読み出すべき領域に
一部しか読み出したデータが記憶されない。したがっ
て、ホストから転送されてくるライトデータは、キャッ
シュメモリ104上の最終先読みセクタの先頭アドレス
から書きこむべきである。(図8では、途中まで読まれ
た4番目のセクタの一部は破棄され、途中まで進んだア
ドレスポインタは無効となる。そして、次に書き込むべ
きアドレスは4番目のセクタの先頭アドレスであるべき
である。)この先頭アドレスを計算するために、セクタ
境界計算回路111を使用する。
When the read gate itself can be operated only in units of one sector, the read gate performs a read operation up to the data of the last sector which has been pre-read. In the present embodiment, the data transfer to the cache memory 102 is interrupted by the data multiplexer 115 in order to quickly perform the prefetch interruption process. For this reason, since only part of the data of the last prefetch sector can be read, only partially read data is stored in the area where the data of the last prefetch sector should be read in the cache memory 104. Therefore, the write data transferred from the host should be written from the start address of the last prefetch sector on the cache memory 104. (In FIG. 8, the part of the fourth sector that has been read halfway is discarded, and the halfway advanced address pointer becomes invalid. The next address to be written should be the top address of the fourth sector. The sector boundary calculation circuit 111 is used to calculate the start address.

【0027】セクタ境界計算回路111の構成の一例を
図5に示す。セクタサイズレジスタ501は、1セクタ
の大きさを記録する。下位ビットマスク回路502は、
セクタサイズレジスタ501からのマスク信号503に
よって、1セクタの大きさに対応する下位ビットをマス
クする。例えば1セクタの大きさが512バイトの場
合、セクタサイズレジスタ501に512バイトをセッ
トすると、このレジスタは下位ビットマスク回路502
に対して、0〜511までの値を示すのに使用される下
位9ビットをマスクするように指示を出す。(つまり、
下位9ビットを“0”とすればセクタ境界アドレスにな
る。)このようにして、予めセクタレジスタ501へ1
セクタの大きさを記憶させておき、内部データバス12
5を介して転送されてきたアドレス値に対して、下位ビ
ットマスク回路502がマスクを行いアドレス値をセク
タ境界の値に設定し直す。(図9、ステップ905)キャ
ッシュメモリ104上の最終先読み位置はアドレスポイ
ンタ113が示しているので、このセクタ境界計算回路
111を用いて、アドレスポインタ113の値からセク
タ境界を計算する。そして、アドレスポインタ113の
値を先頭アドレスレジスタ112に設定する。(図9、
ステップ906)次にシーケンサ110は、先頭アドレ
スレジスタ112の値を先頭アドレスとしてFIFO3
03からキャッシュメモリ104へライトデータを転送
する。無論、FIFO303を使用しないかインタフェ
ース109に搭載されていない場合は、ホスト101か
ら直接キャッシュメモリ104へライトデータを転送す
る。
FIG. 5 shows an example of the configuration of the sector boundary calculation circuit 111. The sector size register 501 records the size of one sector. The lower bit mask circuit 502
The lower bit corresponding to the size of one sector is masked by a mask signal 503 from the sector size register 501. For example, when the size of one sector is 512 bytes, if 512 bytes are set in the sector size register 501, this register
Is instructed to mask the lower 9 bits used to indicate values from 0 to 511. (That is,
If the lower 9 bits are set to "0", the address becomes the sector boundary address. In this way, 1 is previously stored in the sector register 501.
The size of the sector is stored, and the internal data bus 12
The lower bit mask circuit 502 masks the address value transferred via the address 5 and resets the address value to a value at the sector boundary. (FIG. 9, step 905) Since the address pointer 113 indicates the final read-ahead position on the cache memory 104, the sector boundary is calculated from the value of the address pointer 113 by using the sector boundary calculation circuit 111. Then, the value of the address pointer 113 is set in the start address register 112. (FIG. 9,
Step 906) Next, the sequencer 110 uses the value of the start address register 112 as the start address and
03 to the cache memory 104. Of course, when the FIFO 303 is not used or is not mounted on the interface 109, the write data is directly transferred from the host 101 to the cache memory 104.

【0028】オートライトが終了するとシーケンサ11
0はアドレスポインタ113をライトデータを転送した
分だけ増加させ更新し、オートライト終了割り込みをC
PU106に対して発行し(図9、907)、待機状態
になる(図9、ステップ908)。ここで、オートライ
トとはCPUの介在なしにディスク制御装置103(H
DC:Hard Disk Controllerともいう)がライト命令
をキャッシュメモリに保存することである。CPU10
6は先頭アドレスレジスタ112とアドレスポインタ1
13の値を参照し、セグメント管理テーブルを更新して
新しいセグメントを生成する(図9、ステップ91
3)。そして、ディスクフォーマッタ117のデータラ
イト位置レジスタにキャッシュメモリ上のライトデータ
の先頭アドレスを設定する(図9、ステップ914)。
ライトデータを書き込むためのシークが完了すると(図
9、ステップ912)、CPU106はディスク制御装
置を起動する(図9、ステップ915,909)。シー
ケンサ110はディスクフォーマッタ117を制御して
キャッシュメモリ104内のデータをディスクドライブ
108へ転送する(図9、ステップ910)。
When the automatic writing is completed, the sequencer 11
0 increments and updates the address pointer 113 by the amount of transfer of the write data, and sets the auto write end interrupt to C
It is issued to the PU 106 (907 in FIG. 9) and enters a standby state (step 908 in FIG. 9). Here, the auto light means the disk control device 103 (H
DC: Hard Disk Controller) stores the write command in the cache memory. CPU10
6 is the start address register 112 and the address pointer 1
13, the segment management table is updated to generate a new segment (FIG. 9, step 91).
3). Then, the head address of the write data in the cache memory is set in the data write position register of the disk formatter 117 (FIG. 9, step 914).
When the seek for writing the write data is completed (FIG. 9, step 912), the CPU 106 activates the disk control device (FIG. 9, steps 915, 909). The sequencer 110 controls the disk formatter 117 to transfer the data in the cache memory 104 to the disk drive 108 (FIG. 9, step 910).

【0029】以下にインタフェース109内でリードコ
マンドを検出する場合について説明する。インタフェー
ス109内でリードコマンドを検出するために構成した
インタフェース109の一例を図4に示す。無論、図3
の構成にリードコマンド検出回路402を同時に組み込
むことも可能である。バスコントローラ401は、バス
制御信号403によってシーケンサ110に制御され、
バス118と内部データバス123とのデータの送受を
制御する。リードコマンド検出回路402は、バス11
8を介してホスト101より転送されてきたコマンドの
中からリードコマンドを検出し、リード割り込み信号4
05をシーケンサ110へ発行する。リードコマンド検
出回路402は検出回路制御信号404によってシーケ
ンサ110から操作することが可能で、リードコマンド
検出処理をファームウェアで行う場合等、リードコマン
ド検出機能が不要な場合に(従来と同様の処理をさせた
い場合)停止させることが可能である。リードコマンド
検出回路402は検出回路制御信号404によってシー
ケンサ110から操作することが可能で、必要に応じて
リードコマンド検出機能を停止させることが可能であ
る。
A case where a read command is detected in the interface 109 will be described below. FIG. 4 shows an example of the interface 109 configured to detect a read command in the interface 109. Of course, Fig. 3
It is also possible to incorporate the read command detection circuit 402 into the configuration at the same time. The bus controller 401 is controlled by the sequencer 110 by a bus control signal 403,
The transmission and reception of data between the bus 118 and the internal data bus 123 are controlled. The read command detection circuit 402
8, a read command is detected from commands transferred from the host 101 through the read interrupt signal 4.
05 to the sequencer 110. The read command detection circuit 402 can be operated from the sequencer 110 by the detection circuit control signal 404, and when the read command detection function is not required, such as when the read command detection processing is performed by firmware (the same processing as in the related art is performed). It can be stopped if desired). The read command detection circuit 402 can be operated from the sequencer 110 by the detection circuit control signal 404, and the read command detection function can be stopped as needed.

【0030】ハードディスク102内で先読みを行って
いる最中に、ホスト101からリードコマンドがハード
ディスク102へ発行された場合について図10のフロ
ーチャートを用いて説明する。
A case in which a read command is issued from the host 101 to the hard disk 102 while pre-reading is being performed in the hard disk 102 will be described with reference to the flowchart of FIG.

【0031】ホスト101からリードコマンドが来ると
インタフェース109内のリードコマンド検出回路40
2がリードコマンドを検出し、リード割り込みをシーケ
ンサ110へ発行する。リード割り込みを受けたシーケ
ンサ110は、コマンド受領割り込みをCPU106に
対して発行する(1001)。CPU106は、図7の
セグメント管理テーブルを検索してリードデータがキャ
ッシュメモリ104内に存在するかどうかのヒット判定
を開始する(1015)。ヒット判定は図7のセグメン
ト管理テーブルのLBAの先頭アドレスをセグメント順
に読み出し、これがリードコマンドによって指定された
アドレスを含むアドレスかを、リードコマンドのアドレ
スとセグメント管理テーブル内のアドレスを比較するこ
とによって行なわれる。シーケンサ110は、データマ
ルチプレクサ115を制御してディスクフォーマッタ1
17からキャッシュメモリ104へのデータ転送を遮断
する(1002)。そして、ディスクフォーマッタ11
7を制御し、ディスクドライブ108内のリードゲート
を閉じ先読みを中断させる(1003)。
When a read command is received from the host 101, the read command detection circuit 40 in the interface 109
2 detects a read command and issues a read interrupt to the sequencer 110. The sequencer 110 that has received the read interrupt issues a command reception interrupt to the CPU 106 (1001). The CPU 106 searches the segment management table of FIG. 7 and starts hit determination as to whether or not the read data exists in the cache memory 104 (1015). The hit determination is performed by reading the head address of the LBA in the segment management table of FIG. 7 in the order of segments, and comparing the read address with the address in the segment management table to determine whether this is the address including the address specified by the read command. It is. The sequencer 110 controls the data multiplexer 115 to control the disk formatter 1
The transfer of data from 17 to the cache memory 104 is interrupted (1002). Then, the disk formatter 11
7 to close the read gate in the disk drive 108 and interrupt prefetching (1003).

【0032】キャッシュメモリ104上の最終先読み位
置はアドレスポインタ113が示している。セクタ境界
計算回路111を用いて、アドレスポインタ113の値
からセクタ境界を計算することで、先読み中断により読
み込みが完了していない最終セクタのデータを切り捨
て、最終セクタの前のセクタの最後尾のアドレスを求め
る。これは図8で説明したことと同様である。そして、
アドレスポインタ113へこの値をセットし、セグメン
ト更新割り込みをCPU106に対して発行し(100
4)、待機状態なる(1005)。CPU106は先頭
アドレスレジスタ112とアドレスポインタ113の値
を参照し、セグメント管理テーブルを更新して新しいセ
グメントを生成する(1017)。
The address pointer 113 indicates the final read-ahead position on the cache memory 104. By calculating the sector boundary from the value of the address pointer 113 using the sector boundary calculation circuit 111, the data of the last sector that has not been read due to the interruption of the prefetch is truncated, and the last address of the sector before the last sector is discarded. Ask for. This is the same as that described with reference to FIG. And
This value is set in the address pointer 113, and a segment update interrupt is issued to the CPU 106 (100
4) A standby state is entered (1005). The CPU 106 refers to the values of the start address register 112 and the address pointer 113, updates the segment management table, and generates a new segment (1017).

【0033】CPU106によるヒット判定の結果、キ
ャッシュメモリ104上のデータがヒットした場合、C
PU106はディスク制御装置103を起動する(10
06)。シーケンサ110は、キャッシュメモリ104
よりヒットしたデータをホスト101へ転送する(10
07)。そして、先読みを再開するためアドレスポイン
タ113の値を先頭アドレスレジスタ112にセットし
(1008)、ディスクフォーマッタ117を起動して
先読みを再開させる(1009)。キャッシュメモリ1
04上のデータにヒットしなかった場合、CPU106
はリードデータを読み込むためにシークするようにサー
ボ制御回路107を介してディスクドライブ108へ指
示を出し(1018)、シークが完了すると(101
9)、ディスク制御装置103を起動する(101
0)。シーケンサ110は、アドレスポインタ113の
値を先頭アドレスレジスタ112にセットし(101
1)、ディスクフォーマッタ117を起動して、ディス
クドライブ108からキャッシュメモリ104へデータ
を転送する(1012)。ホスト101要求分のデータ
がキャッシュメモリ104へディスクドライブ108か
ら転送されると、シーケンサ110はキャッシュメモリ
104からホスト101へリードデータを転送する(1
013)。そして先読みを継続する(1014)。
If the result of the hit determination by the CPU 106 is that the data in the cache memory 104 has hit,
The PU 106 starts the disk controller 103 (10
06). The sequencer 110 is provided in the cache memory 104
The more hit data is transferred to the host 101 (10
07). Then, the value of the address pointer 113 is set in the head address register 112 in order to restart the prefetch (1008), and the disk formatter 117 is activated to restart the prefetch (1009). Cache memory 1
If no data is found on the data on
Sends an instruction to the disk drive 108 via the servo control circuit 107 to seek to read the read data (1018), and when the seek is completed (101)
9), start the disk controller 103 (101)
0). The sequencer 110 sets the value of the address pointer 113 in the start address register 112 (101
1) Activate the disk formatter 117 to transfer data from the disk drive 108 to the cache memory 104 (1012). When the data requested by the host 101 is transferred from the disk drive 108 to the cache memory 104, the sequencer 110 transfers the read data from the cache memory 104 to the host 101 (1
013). Then, the prefetching is continued (1014).

【0034】次に、図10のステップ1005でCPU
106によって行なわれたキャッシュメモリのヒット検
索をディスク制御装置103でハードウェアにより行な
う場合について図2、図6を参照して説明する。
Next, at step 1005 in FIG.
A case in which the cache memory hit search performed by 106 is performed by hardware in the disk control device 103 will be described with reference to FIGS.

【0035】ディスク制御装置103でヒット判定を行
うためにセグメント管理回路201を搭載したところの
ディスク制御装置103の第2の実施例の構成の一例を
図2に示す。
FIG. 2 shows an example of the configuration of the second embodiment of the disk control device 103 in which a segment management circuit 201 is mounted so that the disk control device 103 makes a hit determination.

【0036】このセグメント管理回路201について説
明する。セグメント管理回路201は、セグメント管理
テーブルの内容を検索しヒット判定を行う回路で、この
回路構成の一例を図6に示す。最大セグメント数レジス
タ601は、セグメント管理回路201が扱う最大セグ
メント数(m)を保持する。セグメント先頭アドレスレ
ジスタ602は、キャッシュメモリ104上のワークエ
リア内のセグメント管理テーブルの先頭アドレスを保持
するもので、ワークエリアからセグメントテーブルを読
み出すために使用される。セグメントカウンタ603
は、現在ヒット判定を行っているセグメントの番号を示
すもので、セグメント管理テーブルの1行ずつを順に指
定するものである。セグメント情報レジスタ604は、
現在ヒット判定を行っているセグメント情報が1行分だ
け保持される。LBAレジスタ606は、ホストから要
求されたコマンド要求LBAが保持される。セクタレジ
スタ607はLBAレジスタ606のコマンド要求セク
タ数が保持される。ヒット判定回路605は、セグメン
ト情報レジスタ604とLBAレジスタ606、セクタ
レジスタ607の値を比較し、そのセグメントのヒット
判定を行う。
The segment management circuit 201 will be described. The segment management circuit 201 is a circuit that searches the contents of the segment management table and makes a hit determination. An example of this circuit configuration is shown in FIG. The maximum segment number register 601 holds the maximum segment number (m) handled by the segment management circuit 201. The segment start address register 602 holds the start address of the segment management table in the work area on the cache memory 104, and is used to read the segment table from the work area. Segment counter 603
Indicates the number of the segment for which hit determination is currently being performed, and designates one line at a time in the segment management table. The segment information register 604 is
The segment information for which hit determination is currently performed is held for one line. The LBA register 606 holds a command request LBA requested from the host. The sector register 607 holds the number of command request sectors of the LBA register 606. The hit determination circuit 605 compares the values of the segment information register 604 with the values of the LBA register 606 and the sector register 607, and performs a hit determination on the segment.

【0037】セグメント管理回路201の動作について
説明する。セグメント管理回路201は、シーケンサ1
10によって制御される。ヒット判定を行う前に、最大
セグメント数レジスタ601に最大セグメント数を、セ
グメント先頭アドレスレジスタ602にセグメント管理
テーブルの先頭アドレスを、LBAレジスタ606に、
コマンド要求LBAを、セクタレジスタ607にコマン
ド要求セクタ数をセットする。そして、セグメントカウ
ンタ603をクリアしておく。シーケンサ110がレジ
スタ制御信号609により、セグメント先頭アドレスレ
ジスタ602とセグメントカウンタ603を操作して、
内部アドレスバス126にヒット判定を行うセグメント
のアドレスを出力し、セグメント情報レジスタに対象セ
グメントの情報を読み込む。次に、シーケンサ110は
ヒット判定回路605を操作してヒット判定を行う。も
しヒットした場合、ヒット判定回路605がヒット信号
611をシーケンサ110へ出力する。ミスの場合、セ
グメントカウンタ603を増加させ同様の処理を行う。
セグメントカウンタ603の値が最大セグメント数レジ
スタ601と等しくなった時点でヒット判定を終了す
る。図2、図6で示した第2の実施例では一層の処理速
度の向上が達成できる。
The operation of the segment management circuit 201 will be described. The segment management circuit 201 includes the sequencer 1
Controlled by 10. Before performing the hit determination, the maximum segment number register 601 stores the maximum segment number, the segment head address register 602 stores the start address of the segment management table, and the LBA register 606 stores the start address.
The command request LBA is set in the sector register 607 to the number of command request sectors. Then, the segment counter 603 is cleared. The sequencer 110 operates the segment head address register 602 and the segment counter 603 according to the register control signal 609,
The address of the segment for which hit determination is performed is output to the internal address bus 126, and information on the target segment is read into the segment information register. Next, the sequencer 110 operates the hit determination circuit 605 to make a hit determination. If a hit occurs, the hit determination circuit 605 outputs a hit signal 611 to the sequencer 110. In the case of a mistake, the same processing is performed by increasing the segment counter 603.
When the value of the segment counter 603 becomes equal to the maximum segment number register 601, the hit determination ends. In the second embodiment shown in FIGS. 2 and 6, the processing speed can be further improved.

【0038】図2の実施例の場合に、ハードディスク1
02内で先読みを行っている最中に、ホスト101から
リードコマンドがハードディスク102へ発行された場
合について図11のフローチャートを用いて説明する。
ホスト101からリードコマンドが来るとインタフェー
ス109内のリードコマンド検出回路402がリードコ
マンドを検出し、リード割り込みをシーケンサ110へ
発行する(1101)。リード割り込みを受けたシーケ
ンサ110は、ヒット判定回路201を操作してヒット
判定を行う(1102)。ヒットした場合、CPU10
6に対してセグメント更新割り込みを発行すると共に、
キャッシュメモリ104からホスト101へリードデー
タを転送し(1104)、先読みを継続する(110
5)。CPU106はアドレスポインタ113の値を参
照し、セグメント管理テーブルの先読み対象セグメント
の情報を更新する(1117)。
In the case of the embodiment shown in FIG.
A case in which a read command is issued from the host 101 to the hard disk 102 while the pre-reading is being performed in 02 will be described with reference to the flowchart in FIG.
When a read command is received from the host 101, the read command detection circuit 402 in the interface 109 detects the read command and issues a read interrupt to the sequencer 110 (1101). The sequencer 110 that has received the read interrupt operates the hit determination circuit 201 to make a hit determination (1102). If hit, CPU 10
Issue a segment update interrupt for
The read data is transferred from the cache memory 104 to the host 101 (1104), and the prefetch is continued (110).
5). The CPU 106 refers to the value of the address pointer 113 and updates the information of the prefetch target segment in the segment management table (1117).

【0039】ヒット判定の結果がミスの場合、シーケン
サ110は、データマルチプレクサ115を制御してデ
ィスクフォーマッタ117からキャッシュメモリ104
へのデータ転送を遮断する。このとき、CPU106に
対して、先読み停止割り込みを発生させる(110
6)。CPU106はリードデータを読み込むためにシ
ークするようにサーボ制御回路107を介してディスク
ドライブ108へ指示を出す(1115)。シーケンサ
110は、データマルチプレクサ115を制御してディ
スクフォーマッタ117からキャッシュメモリ104へ
のデータ転送を遮断する(1106)。そして、ディス
クフォーマッタ117を制御し、ディスクドライブ10
8内のリードゲートを閉じ先読みを中断させる(110
7)。キャッシュメモリ104上の最終先読み位置はア
ドレスポインタ113が示しているので、セクタ境界計
算回路111を用いて、最終セクタの前のセクタの最後
尾のアドレスを求める。そして、アドレスポインタ11
3へセットし、セグメント更新割り込みをCPU106
に対して発行し(1108)、待機状態なる(110
9)。CPU106は先頭アドレスレジスタ112とア
ドレスポインタ113の値を参照し、セグメント管理テ
ーブルを更新して新しいセグメントを生成する(111
7)。CPU106は先読み停止割り込みにより開始し
たシークが完了すると(1116)、ディスク制御装置
103を起動する(1110)。シーケンサ110は、
アドレスポインタ113の値を先頭アドレスレジスタ1
12にセットし(1111)、ディスクフォーマッタ1
17を起動して、ディスクドライブ108からキャッシ
ュメモリ104へデータを転送する(1112)。ホス
ト101要求分のデータがキャッシュメモリ104へデ
ィスクドライブ108から転送されると、シーケンサ1
10はキャッシュメモリ104からホスト101へリー
ドデータを転送し(1113)、先読みを継続する(1
114)。
If the result of the hit determination is a miss, the sequencer 110 controls the data multiplexer 115 to send data from the disk formatter 117 to the cache memory 104.
Block data transfer to At this time, a prefetch stop interrupt is generated for the CPU 106 (110
6). The CPU 106 issues an instruction to the disk drive 108 via the servo control circuit 107 to seek to read the read data (1115). The sequencer 110 controls the data multiplexer 115 to block data transfer from the disk formatter 117 to the cache memory 104 (1106). Then, the disk formatter 117 is controlled, and the disk drive 10 is controlled.
8 and the pre-reading is interrupted (110).
7). Since the address pointer 113 indicates the last read-ahead position on the cache memory 104, the last address of the sector before the last sector is obtained by using the sector boundary calculation circuit 111. Then, the address pointer 11
3 and a segment update interrupt
(1108), and enters a standby state (110
9). The CPU 106 refers to the values of the start address register 112 and the address pointer 113, updates the segment management table, and generates a new segment (111).
7). When the seek started by the prefetch stop interrupt is completed (1116), the CPU 106 activates the disk controller 103 (1110). The sequencer 110
The value of the address pointer 113 is stored in the first address register 1
12 (1111), and the disk formatter 1
17 is started to transfer data from the disk drive 108 to the cache memory 104 (1112). When data requested by the host 101 is transferred from the disk drive 108 to the cache memory 104, the sequencer 1
10 transfers the read data from the cache memory 104 to the host 101 (1113) and continues the prefetch (1).
114).

【0040】本実施例では、磁気ディスクを記録媒体に
用いた場合について説明したが、無論、記録媒体が光磁
気ディスクなどの他の記録媒体を用いた場合についても
同様である。
In this embodiment, the case where the magnetic disk is used as the recording medium has been described. However, the same applies to the case where another recording medium such as a magneto-optical disk is used as the recording medium.

【0041】以上のような本発明の実施例では、ライト
コマンドをディスク制御装置内で検出してハードウェア
の制御により、キャッシュメモリへの先読みを中断し、
キャッシュメモリ上の先読みデータの直後にホストから
のライトデータを書き込むので、キャッシュメモリの使
用効率を改善できる。
In the embodiment of the present invention described above, the write command is detected in the disk controller, and the read-ahead to the cache memory is interrupted by the control of the hardware.
Since write data from the host is written immediately after the pre-read data in the cache memory, the use efficiency of the cache memory can be improved.

【0042】また、リードコマンドをディスク制御装置
内で検出して先読みを中断するので、リードコマンド受
領からシーク開始までの時間を短縮できる。
Further, since the read command is detected in the disk controller and the pre-reading is interrupted, the time from the reception of the read command to the start of the seek can be shortened.

【0043】[0043]

【発明の効果】本発明によれば、ホストからリード、ラ
イトなどのコマンドを受けたときにキャッシュメモリに
先読みを行なっている場合、先読みの停止を早くするこ
とが出来、ディスク記憶装置の性能向上ができる。
According to the present invention, when the cache memory is prefetched when a command such as read or write is received from the host, the prefetch can be stopped earlier, and the performance of the disk storage device can be improved. Can be.

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

【図1】本発明を用いて構成されたハードディスクを用
いた情報機器システムの構成図。
FIG. 1 is a configuration diagram of an information equipment system using a hard disk configured using the present invention.

【図2】図1のディスク制御装置にセグメント管理回路
を搭載した他の実施例の構成図。
FIG. 2 is a configuration diagram of another embodiment in which a segment management circuit is mounted on the disk control device of FIG. 1;

【図3】図1のインタフェースにライトコマンド検出回
路を搭載した場合の構成図。
FIG. 3 is a configuration diagram when a write command detection circuit is mounted on the interface of FIG. 1;

【図4】図1のインタフェースにリードコマンド検出回
路を搭載した場合の構成図。
FIG. 4 is a configuration diagram when a read command detection circuit is mounted on the interface of FIG. 1;

【図5】図1のセクタ境界計算回路の構成図。FIG. 5 is a configuration diagram of a sector boundary calculation circuit of FIG. 1;

【図6】図2のセグメント管理回路の構成図。FIG. 6 is a configuration diagram of a segment management circuit in FIG. 2;

【図7】可変セグメント方式を用いたキャッシュメモリ
の説明図。
FIG. 7 is an explanatory diagram of a cache memory using a variable segment system.

【図8】図1のハードディスクにおける先読み中断時の
説明図。
FIG. 8 is an explanatory diagram of the hard disk in FIG. 1 when prefetching is interrupted.

【図9】図3のインタフェースを搭載したハードディス
クにおける、ライトコマンド検出時のフローチャート。
FIG. 9 is a flowchart when a write command is detected in a hard disk equipped with the interface of FIG. 3;

【図10】図4のインタフェースを搭載したハードディ
スクにおける、リードコマンド検出時のフローチャー
ト。
FIG. 10 is a flowchart when a read command is detected in a hard disk equipped with the interface of FIG. 4;

【図11】図4のインタフェースと図6のセグメント管
理回路を搭載したハードディスクにおける、リードコマ
ンド検出時のフローチャート。
11 is a flowchart when a read command is detected in a hard disk equipped with the interface of FIG. 4 and the segment management circuit of FIG. 6;

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

101…ホスト、102…ハードディスク、103…デ
ィスク制御装置、104…キャッシュメモリ、105…
ROM、106…CPU、107…サーボ系制御回路、
108…ディスクドライブ、109…インタフェース、
110…シーケンサ、111…セクタ境界計算回路、1
12…先頭アドレスレジスタ、113…アドレスポイン
タ、114…アドレスマルチプレクサ、115…データ
マルチプレクサ、116…ECC、117…ディスクフ
ォーマッタ、118…バス、119…インタフェース制
御信号、120…コマンド検出割り込み信号、121…
CPU割込み信号、122…CPUアドレスバス、12
3…CPUデータバス、124…CPU制御信号、12
5…内部データバス、126…内部アドレスバス、12
7…フォーマッタアドレスバス、128…フォーマッタ
データバス、129…モジュール制御信号、130…E
CCデータバス、131…サーボ制御信号バス、132
…信号バス、201…セグメント管理回路、301…バ
スコントローラ、302…ライトコマンド検出回路、3
03…FIFO、304…バス制御信号、305…検出
回路制御信号、306…ライト割込み信号、307…F
IFO制御信号、308…FIFO制御信号2、309
…応答信号、401…バスコントローラ、402…リー
ドコマンド検出回路、403…バス制御信号、404…
検出回路制御信号、405…リード割り込み信号、50
1…セクタサイズレジスタ、502…下位ビットマスク
回路、503…マスク信号、504…セクタサイズレジ
スタ制御信号、505…マスク回路制御信号、507…
計算結果レジスタ制御信号、601…最大セグメント数
レジスタ、602…セグメント先頭アドレスレジスタ、
603…セグメントカウンタ、604…セグメント情報
レジスタ、605…ヒット判定回路、606…LBAレ
ジスタ、607…セクタレジスタ、608…レジスタ制
御信号、609…カウンタ制御信号、610…ヒット判
定回路制御信号、611…ヒット信号
101: Host, 102: Hard Disk, 103: Disk Controller, 104: Cache Memory, 105:
ROM, 106 CPU, 107 servo control circuit,
108: disk drive, 109: interface,
110: sequencer, 111: sector boundary calculation circuit, 1
12 ... head address register, 113 ... address pointer, 114 ... address multiplexer, 115 ... data multiplexer, 116 ... ECC, 117 ... disk formatter, 118 ... bus, 119 ... interface control signal, 120 ... command detection interrupt signal, 121 ...
CPU interrupt signal, 122 ... CPU address bus, 12
3 CPU data bus, 124 CPU control signal, 12
5 internal data bus, 126 internal address bus, 12
7: formatter address bus, 128: formatter data bus, 129: module control signal, 130: E
CC data bus, 131 ... servo control signal bus, 132
... Signal bus, 201 ... Segment management circuit, 301 ... Bus controller, 302 ... Write command detection circuit, 3
03: FIFO, 304: bus control signal, 305: detection circuit control signal, 306: write interrupt signal, 307: F
FIFO control signal, 308... FIFO control signal 2, 309
... response signal, 401 ... bus controller, 402 ... read command detection circuit, 403 ... bus control signal, 404 ...
Detection circuit control signal, 405 ... read interrupt signal, 50
1: Sector size register, 502: Lower bit mask circuit, 503: Mask signal, 504: Sector size register control signal, 505: Mask circuit control signal, 507 ...
Calculation result register control signal, 601: maximum segment number register, 602: segment head address register,
603: segment counter, 604: segment information register, 605: hit determination circuit, 606: LBA register, 607: sector register, 608: register control signal, 609: counter control signal, 610: hit determination circuit control signal, 611: hit signal

───────────────────────────────────────────────────── フロントページの続き (72)発明者 平塚 幸恵 神奈川県川崎市麻生区王禅寺1099番地 株 式会社日立製作所システム開発研究所内 (72)発明者 西川 学 神奈川県小田原市国府津2880番地 株式会 社日立製作所ストレージシステム事業部内 Fターム(参考) 5B005 JJ11 MM11 NN22 NN71 5B065 BA01 CA14 CA15 CC08 CH01 CH05  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Yukie Hiratsuka 1099 Ozenji Temple, Aso-ku, Kawasaki City, Kanagawa Prefecture Inside the Hitachi, Ltd.System Development Laboratory (72) Inventor Manabu Nishikawa 2880 Kozu, Kozu, Odawara City, Kanagawa Prefecture Hitachi, Ltd. 5B005 JJ11 MM11 NN22 NN71 5B065 BA01 CA14 CA15 CC08 CH01 CH05

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】キャッシュメモリを有し、当該キャッシュ
メモリにデータの先読みが行なわれるディスク記憶装置
において、ホストから送られた特定のコマンドを検出
し、割り込み信号を発生するするコマンド検出装置と、
前記割り込み信号を受けて前記キャッシュメモリへのデ
ータの転送を遮断すると共に前記データの先読みのため
のデータの読み出しを中断せしめるシーケンサとを備え
たことを特徴とするディスク記憶装置。
A command detection device for detecting a specific command sent from a host and generating an interrupt signal in a disk storage device having a cache memory and prefetching data in the cache memory;
A disk storage device, comprising: a sequencer for interrupting transfer of data to the cache memory in response to the interrupt signal and interrupting data read for pre-reading the data.
【請求項2】前記ディスク記憶装置は前記キャッシュメ
モリへの書き込みデータの出力を管理するデータゲート
と、データを記憶するディスクドライブと、前記ディス
クドライブの書き込み、読み出しを制御するディスクフ
ォーマッタとを有し、前記シーケンサは前記割り込み信
号を受けて前期データゲートにおいて前記キャッシュメ
モリへのデータの遮断を行ない、かつ、前記ディスクフ
ォーマッタにより先読みの読み出し動作を中断せしめる
ことを特徴とする請求項1記載のディスク記憶装置。
2. The disk storage device includes a data gate for managing output of write data to the cache memory, a disk drive for storing data, and a disk formatter for controlling writing and reading of the disk drive. 2. The disk storage according to claim 1, wherein said sequencer receives said interrupt signal, interrupts data to said cache memory at said data gate, and interrupts a read-ahead read operation by said disk formatter. apparatus.
【請求項3】キャッシュメモリを有し、当該キャッシュ
メモリにデータの先読みが行なわれるディスク記憶装置
において、ホストから送られた特定のコマンドを検出
し、割り込み信号を発生するコマンド検出装置と、デー
タを記憶するディスクドライブと、ファームウェアの実
行をする処理装置と、前記割り込み信号を受けて、前記
処理装置に先読み停止割り込みを発生するシーケンサと
を有し、前記処理装置は前記先読み停止割り込みに応答
して、前記ディスクドライブにシーク動作を開始せしめ
ることを特徴とするディスク記憶装置。
3. A disk storage device having a cache memory and prefetching data in the cache memory, a command detection device for detecting a specific command sent from a host and generating an interrupt signal, and A disk drive for storing, a processing device that executes firmware, and a sequencer that receives the interrupt signal and generates a prefetch stop interrupt to the processing device, wherein the processing device responds to the prefetch stop interrupt. And a disk drive for causing the disk drive to start a seek operation.
【請求項4】キャッシュメモリを有し、当該キャッシュ
メモリにデータの先読みが行なわれるディスク記憶装置
において、ホストから送られたライトコマンドを検出
し、ライト割り込み信号を発生するコマンド検出装置
と、前記ライト割り込み信号を受けて、前記先読みを停
止せしめるシーケンサと、前記キャッシュメモリのアド
レスポインタをセクタ境界の値に修正するセクタ境界計
算回路とを備え、ホストから送られたライトデータは前
記セクタ境界計算回路により求められたセクタ境界から
前記キャッシュメモリに書き込まれることを特徴とする
ディスク記憶装置。
4. A command detecting device for detecting a write command sent from a host and generating a write interrupt signal in a disk storage device having a cache memory and prefetching data in the cache memory, A sequencer for stopping the prefetch in response to the interrupt signal, and a sector boundary calculation circuit for correcting the address pointer of the cache memory to a value of a sector boundary, and the write data sent from the host is processed by the sector boundary calculation circuit. A disk storage device wherein data is written to the cache memory from a determined sector boundary.
【請求項5】キャッシュメモリを有し、当該キャッシュ
メモリにデータの先読みが行なわれるディスク記憶装置
において、ホストから送られたリードコマンドを検出
し、リード割り込み信号を発生するコマンド検出装置
と、前記リード割り込み信号を受けて前記キャッシュメ
モリへのデータの転送を遮断すると共に前記データの先
読みのためのデータの読み出しを中断せしめるシーケン
サと、ホストから要求されたデータが前記キャッシュメ
モリに格納されているかを判定する判定回路とを有し、
格納されていれば前記先読みを再開し、格納されていな
ければ、データを格納しているディスクドライブにホス
トが要求するデータを読み出すためのシーク動作を行な
わしめることを特徴とするディスク記憶装置。
5. A command detecting device for detecting a read command sent from a host and generating a read interrupt signal in a disk storage device having a cache memory and prefetching data in the cache memory, A sequencer for interrupting data transfer to the cache memory upon receiving an interrupt signal and interrupting data read for prefetching the data; and determining whether data requested by a host is stored in the cache memory. And a determination circuit that performs
A disk storage device wherein the pre-reading is resumed if the data is stored, and if the data is not stored, a seek operation for reading data requested by the host is performed to a disk drive storing the data.
JP27351899A 1999-09-28 1999-09-28 Disk storage device Pending JP2001101075A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27351899A JP2001101075A (en) 1999-09-28 1999-09-28 Disk storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27351899A JP2001101075A (en) 1999-09-28 1999-09-28 Disk storage device

Publications (1)

Publication Number Publication Date
JP2001101075A true JP2001101075A (en) 2001-04-13

Family

ID=17528985

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27351899A Pending JP2001101075A (en) 1999-09-28 1999-09-28 Disk storage device

Country Status (1)

Country Link
JP (1) JP2001101075A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009199665A (en) * 2008-02-21 2009-09-03 Hitachi Global Storage Technologies Netherlands Bv Data storage device, and data management method for the same
WO2015034082A1 (en) * 2013-09-06 2015-03-12 株式会社 東芝 Memory control circuit and cache memory

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009199665A (en) * 2008-02-21 2009-09-03 Hitachi Global Storage Technologies Netherlands Bv Data storage device, and data management method for the same
WO2015034082A1 (en) * 2013-09-06 2015-03-12 株式会社 東芝 Memory control circuit and cache memory
JP2015052940A (en) * 2013-09-06 2015-03-19 株式会社東芝 Memory control circuit and cache memory
US9786342B2 (en) 2013-09-06 2017-10-10 Kabushiki Kaisha Toshiba Memory control circuit and cache memory

Similar Documents

Publication Publication Date Title
JP3257916B2 (en) External storage device
JP3183993B2 (en) Disk control system
JP2003131942A (en) Apparatus and method for controlling cache of hard disk devices
JP4925230B2 (en) Storage device, storage control device, and control method
JP3087429B2 (en) Storage system
KR19980029917A (en) How to improve read cache performance on magnetic disk drives
JPH087662B2 (en) Data transfer control method
JP2001014109A (en) Storage device
JP2001101075A (en) Disk storage device
JPH076088A (en) Information storage device
JP2006185162A (en) Data storage device and control method for the same
US6957300B2 (en) Reducing delay of command completion due to overlap condition
JPH11212733A (en) External storage system
JP3122702B2 (en) Disk device write-back control method
JP2001350669A (en) Pre-read predicting device
JPH10171713A (en) Disk storage device and method for controlling cache applied to the same device
JP2003199014A (en) Disk storage device and command processing method
JP2002342038A (en) Disk device controlling execution order of commands
JPH0519981A (en) Data write normal end judging method for optical disk device
JP2005071399A (en) Device and method for access control of information recording and reproducing device
JPH10275425A (en) Disk device and method for rapidly transferring rearrangement data due to defect in it to host
JP3080758B2 (en) Magnetic disk drive
JP2004164144A (en) Disk device
JP2000347941A (en) Cache memory device
WO2001037074A1 (en) Method of caching data