[go: up one dir, main page]

JPH0578107B2 - - Google Patents

Info

Publication number
JPH0578107B2
JPH0578107B2 JP3607786A JP3607786A JPH0578107B2 JP H0578107 B2 JPH0578107 B2 JP H0578107B2 JP 3607786 A JP3607786 A JP 3607786A JP 3607786 A JP3607786 A JP 3607786A JP H0578107 B2 JPH0578107 B2 JP H0578107B2
Authority
JP
Japan
Prior art keywords
sector
hard disk
format data
bad sector
bad
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP3607786A
Other languages
Japanese (ja)
Other versions
JPS62192975A (en
Inventor
Kazunori Ishii
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.)
Alps Alpine Co Ltd
Original Assignee
Alps Electric Co 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 Alps Electric Co Ltd filed Critical Alps Electric Co Ltd
Priority to JP3607786A priority Critical patent/JPS62192975A/en
Publication of JPS62192975A publication Critical patent/JPS62192975A/en
Publication of JPH0578107B2 publication Critical patent/JPH0578107B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、ハードデイスク制御方式に関し、特
に中央処理装置がハードデイスクコントローラを
介してハードデイスク装置を制御するハードデイ
スク制御方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a hard disk control system, and particularly to a hard disk control system in which a central processing unit controls a hard disk device via a hard disk controller.

〔従来の技術〕 従来、この種のハードデイスク制御方式では、
ハードデイスクコントローラを使用してハードデ
イスク装置を制御しているので、仕様変更等によ
りハードデイスクコントローラを変更した場合に
は、そのハードデイスクコントローラに合わせて
ハードデイスク装置のフオーマツト形式やハード
デイスクコントローラに与えるコマンド形式を変
更しなければならない場合が生じる。
[Conventional technology] Conventionally, in this type of hard disk control method,
Since the hard disk device is controlled using a hard disk controller, if the hard disk controller is changed due to a change in specifications, etc., the format of the hard disk device and the command format given to the hard disk controller must be changed to match the hard disk controller. There may be cases where this is necessary.

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

上述した従来のハードデイスク制御方式では、
ハードデイスクコントローラの変更によりハード
デイスク装置のフオーマツト形式やハードデイス
クコントローラに与えるコマンドの変更が必要に
なる場合があるので、このような場合にはデータ
の書き直しやプログラムの手直しが必要となり、
既存のプログラムやデータ等のソフトウエア資産
の継承が困難になるという問題点があつた。
In the conventional hard disk control method described above,
Changing the hard disk controller may require changing the format of the hard disk device or the commands given to the hard disk controller. In such cases, it may be necessary to rewrite data or modify the program.
There was a problem that it became difficult to inherit software assets such as existing programs and data.

本発明の目的は、上述の点に鑑み、ハードデイ
スクコントローラの変更によつてもフオーマツト
形式やコマンド形式の変更の必要のないハードデ
イスク制御方式を提供することにある。
SUMMARY OF THE INVENTION In view of the above points, an object of the present invention is to provide a hard disk control method that does not require changing the format or command format even when changing the hard disk controller.

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

本発明のハードデイスク制御方式は、中央処理
装置がハードデイスクコントローラを介してハー
ドデイスク装置を制御するハードデイスク制御方
式において、上記ハードデイスク装置のフオーマ
ツト時に上記中央処理装置から供給される不良セ
クタフラグおよびセクタ番号を含む第1のフオー
マツトデータを上記ハードデイスクコントローラ
で使用されるシリンダ番号、ヘツド番号およびセ
クタ番号を含む第2のフオーマツトデータに変換
しながら上記第1のフオーマツトデータの不良セ
クタフラグと上記第2のフオーマツトデータのヘ
ツド番号との論理和を上記第2のフオーマツトデ
ータの新たなヘツド番号とすることにより不良セ
クタを登録する不良セクタ登録手段と、リード/
ライトコマンド実行時に不良セクタフラグとヘツ
ド番号との論理和を新たなヘツド番号とすること
により不良セクタを検出する不良セクタ検出手段
とを備える。
The hard disk control method of the present invention includes a hard disk control method in which a central processing unit controls a hard disk device via a hard disk controller, in which a first hard disk drive including a bad sector flag and a sector number supplied from the central processing unit at the time of formatting the hard disk device is provided. While converting the format data into second format data including the cylinder number, head number, and sector number used in the hard disk controller, the bad sector flag of the first format data and the second format data are converted. a bad sector registration means for registering a bad sector by logically ORing it with the head number of the second format data as a new head number of the second format data;
A bad sector detection means is provided for detecting a bad sector by using the logical sum of a bad sector flag and a head number as a new head number when a write command is executed.

〔作用〕[Effect]

本発明のハードデイスク制御方式では、ハード
デイスク装置のフオーマツト時に中央処理装置か
ら供給される第1のフオーマツトデータの不良セ
クタフラグとハードデイスクコントローラが使用
する第2のフオーマツトデータのヘツド番号との
論理和を第2のフオーマツトデータの新たなヘツ
ド番号とすることにより不良セクタを登録し、リ
ード/ライトコマンド実行時に不良セクタフラグ
とヘツド番号との論理和を新たなヘツド番号とす
ることにより不良セクタを検出する。
In the hard disk control method of the present invention, the logical sum of the bad sector flag of the first format data supplied from the central processing unit when formatting the hard disk device and the head number of the second format data used by the hard disk controller is calculated. A defective sector is registered by setting it as a new head number of format data No. 2, and a defective sector is detected by setting the logical sum of the defective sector flag and the head number as a new head number when executing a read/write command.

〔実施例〕〔Example〕

以下、本発明について図面を参照して詳細に説
明する。
Hereinafter, the present invention will be explained in detail with reference to the drawings.

本発明の一実施例に係るハードデイスク制御方
式は、中央処理装置(以下、CPUと略記する)
1と、メインメモリ2と、制御部3と、ハードデ
イスク制御機構(以下、HD制御機構と略記す
る)4と、不良セクタ登録手段5と、不良セクタ
検出手段6と、キヤツシユメモリ7と、ハードデ
イスクコントローラ(以下、HDコントローラと
略記する)8と、ハードデイスク装置(以下、
HD装置と略記する)9とから構成されている。
A hard disk control method according to an embodiment of the present invention is a central processing unit (hereinafter abbreviated as CPU).
1, main memory 2, control unit 3, hard disk control mechanism (hereinafter abbreviated as HD control mechanism) 4, bad sector registration means 5, bad sector detection means 6, cache memory 7, hard disk A controller (hereinafter abbreviated as HD controller) 8 and a hard disk device (hereinafter referred to as HD controller)
It consists of 9 (abbreviated as HD device).

CPU1およびメインメモリ2はホスト側にあ
り、制御部3、HD制御機構4、不良セクタ登録
手段5および不良セクタ検出手段6はデイスクキ
ヤツシユシステムに含まれている。
The CPU 1 and main memory 2 are located on the host side, and the control section 3, HD control mechanism 4, bad sector registration means 5, and bad sector detection means 6 are included in the disk cache system.

第2図を参照すると、本実施例のハードデイス
ク制御方式におけるデイスクフオーマツト時の不
良セクタ登録処理は、フオーマツトデータ受取り
ステツプ21と、論理和ステツプ22と、フオーマツ
トデータ生成ステツプ23と、フオーマツトデータ
送出ステツプ24と、最終セクタ判定ステツプ25と
からなる。
Referring to FIG. 2, the bad sector registration process during disk formatting in the hard disk control system of this embodiment includes a format data receiving step 21, an OR step 22, a format data generation step 23, and a format data generation step 23. It consists of a data sending step 24 and a final sector determination step 25.

第3図を参照すると、リード/ライトコマンド
実行時の不良セクタ検出処理は、リード/ライト
コマンド送出ステツプ31と、セクタ検出ステツプ
32と論理和ステツプ33と、リード/ライトコマン
ド再送ステツプ34と、セクタ検出ステツプ35と、
正常終了ステツプ36と、不良セクタ通知ステツプ
37と、エラー処理ステツプ38とからなる。
Referring to FIG. 3, the defective sector detection process when executing a read/write command consists of a read/write command sending step 31 and a sector detection step.
32, a logical sum step 33, a read/write command retransmission step 34, a sector detection step 35,
Normal completion step 36 and bad sector notification step
37 and an error handling step 38.

第4図を参照すると、CPU1から送られてく
る2バイトのフオーマツトデータ41は、不良セ
クタフラグBFおよびセクタ番号SNからなる。不
良セクタフラグBFは、対応するセクタ番号SNの
セクタが不良であるときに80H(Hは16進数であ
るを示す。以下同様)となり、正常であるときに
00Hとなるフラグである。
Referring to FIG. 4, the 2-byte format data 41 sent from the CPU 1 consists of a bad sector flag BF and a sector number SN. The bad sector flag BF becomes 80H (H indicates a hexadecimal number. The same applies hereinafter) when the sector with the corresponding sector number SN is bad, and when it is normal.
This is a flag that becomes 00H.

一方、HDコントローラ8に供給される4バイ
トのフオーマツトデータ42は、シリンダ番号
(上位)CH、シリンダ番号(下位)CL、ヘツド
番号HNおよびセクタ番号SNからなる。
On the other hand, the 4-byte format data 42 supplied to the HD controller 8 consists of a cylinder number (upper) CH, a cylinder number (lower) CL, a head number HN, and a sector number SN.

第5図を参照すると、HD装置9におけるトラ
ツクは複数のセクタの連なりでなり、各セクタは
その先頭にシリンダ番号(上位)CH、シリンダ
番号(下位)CL、ヘツド番号HNおよびセクタ
番号SNからなる4バイトの識別子(ID)が書き
込まれることによつてフオーマツトされている。
Referring to FIG. 5, a track in the HD device 9 is a series of sectors, and each sector has a cylinder number (upper) CH, a cylinder number (lower) CL, a head number HN, and a sector number SN at the beginning. It is formatted by writing a 4-byte identifier (ID).

次に、このように構成された本実施例のハード
デイスク制御方式の動作について説明する。
Next, the operation of the hard disk control system of this embodiment configured as described above will be explained.

デイスクフオーマツト時には、第2図に示す不
良セクタ登録処理が行われる。まず、制御部3
は、ステツプ21でCPU1からフオーマツトデー
タ41を受け取る。次に、ステツプ22で不良セク
タフラグBFとヘツド番号HNとの論理和をとる。
CPU1から送られてくるフオーマツトデータ4
1の不良セクタフラグBFは、対応するセクタ番
号SNのセクタが不良であるときに80H(Hは16進
数であるを示す。以下同様)であり、正常である
ときに00Hである。したがつて、この不良セクタ
フラグBFとHDコントローラ8に供給されるフ
オーマツトデータ42のヘツド番号HNとの論理
和をとると、不良セクタの場合には82Hとなり、
正常セクタの場合には02Hとなる。
During disk formatting, a bad sector registration process shown in FIG. 2 is performed. First, the control section 3
receives the format data 41 from the CPU 1 in step 21. Next, in step 22, the logical sum of the bad sector flag BF and the head number HN is calculated.
Format data 4 sent from CPU1
The bad sector flag BF of 1 is 80H (H indicates a hexadecimal number; the same applies hereinafter) when the sector with the corresponding sector number SN is bad, and is 00H when it is normal. Therefore, the logical sum of this bad sector flag BF and the head number HN of the format data 42 supplied to the HD controller 8 is 82H in the case of a bad sector.
If it is a normal sector, it will be 02H.

続いて、ステツプ23でHDコントローラ8に送
出するフオーマツトデータ42を作成する。この
場合には、シリンダ番号(上位)CHおよびシリ
ンダ番号(下位)CLには、00Hおよび01Hが、
ヘツド番号HNには上記論理和が、セクタ番号
SNにはフオーマツトデータ41のセクタ番号SN
がそれぞれ格納されてフオーマツトデータ42が
作成される。
Next, in step 23, format data 42 to be sent to the HD controller 8 is created. In this case, the cylinder number (upper) CH and cylinder number (lower) CL are 00H and 01H.
The head number HN is the logical sum of the above, and the sector number
SN is the sector number SN of format data 41
are stored, respectively, and format data 42 is created.

次に、ステツプ24でHDコントローラ8にフオ
ーマツトコマンドを送出する。すると、フオーマ
ツトデータ42に基づいて、第5図に示すよう
に、各セクタ毎にその先頭に識別子(ID)とし
てシリンダ番号(上位)CH、シリンダ番号(下
位)CL、ヘツド番号HNおよびセクタ番号SNが
順次書き込まれ、不良セクタの場合にはヘツド番
号HNが本来有りえない82Hとなつて不良セクタ
であることを表し、正常セクタの場合にはヘツド
番号HNが02Hとなつて正常セクタであることを
表す。
Next, in step 24, a format command is sent to the HD controller 8. Then, based on the format data 42, as shown in FIG. 5, the cylinder number (upper) CH, cylinder number (lower) CL, head number HN, and sector number are placed at the beginning of each sector as an identifier (ID). SN is written sequentially, and in the case of a bad sector, the head number HN becomes 82H, which is not possible in the first place, indicating that it is a bad sector, and in the case of a normal sector, the head number HN becomes 02H, indicating that it is a normal sector. represents something.

リード/ライトコマンド実行時には、第3図に
示す不良セクタ検出処理が行われる。まず、ステ
ツプ31でHDコントローラ8にリード/ライト
コマンドを送出すると、ステツプ32で該当するセ
クタがHD装置9上に見つかつたか否かが検出さ
れる。見つかつた場合には、ステツプ36で該当す
るセクタが見つかつた旨を通知して正常終了す
る。見つからなかつた場合には、ステツプ33で不
良セクタフラグBFとヘツド番号HNとの論理和
をとり、ステツプ34でこの論理和のヘツド番号
HNを有するセクタをリードまたはライトするよ
うに再度リード/ライトコマンドをHDコントロ
ーラ8に送出する。この後、ステツプ35で再度セ
クタが見つかつたか否かの検出を行い、該当する
セクタが見つかつた場合にはステツプ37で該当す
るセクタが不良セクタである旨を通知して処理を
終了する。該当するセクタが見つからない場合に
は、ステツプ38で該当するセクタが全く見つから
ないのでエラーである旨を通知して処理を終了す
る。
When a read/write command is executed, a defective sector detection process shown in FIG. 3 is performed. First, when a read/write command is sent to the HD controller 8 in step 31, it is detected in step 32 whether or not the corresponding sector has been found on the HD device 9. If the sector is found, it is notified in step 36 that the corresponding sector has been found, and the process ends normally. If not found, in step 33 the bad sector flag BF is logically ORed with the head number HN, and in step 34 the head number of this logical sum is calculated.
A read/write command is again sent to the HD controller 8 to read or write the sector having HN. Thereafter, in step 35, it is again detected whether a sector has been found, and if a sector has been found, a notification that the sector is a bad sector is notified in step 37, and the process is terminated. If the corresponding sector is not found, it is notified in step 38 that an error has occurred since no corresponding sector has been found, and the process is terminated.

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

以上説明したように、本発明によれば、仕様変
更によりフオーマツトデータ形式が従前とは異な
るHDコントローラを用いても従前のHDコント
ローラを用いているときと同様なリード/ライト
コマンドでハードデイスク装置のリードおよびラ
イトを行うことができるので、プログラムの修正
やデータの変換を行うことなしにプログラムやデ
ータ等のソフトウエア資産をそのまま継承するこ
とができるという効果が得られる。
As explained above, according to the present invention, even if an HD controller whose format data format is different from the previous one due to specification changes is used, the same read/write commands as when using the previous HD controller can be used to control the hard disk drive. Since reading and writing can be performed, it is possible to inherit software assets such as programs and data as they are without modifying programs or converting data.

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

第1図は、本発明の一実施例に係るハードデイ
スク制御方式を示すブロツク図、第2図は、第1
図に示したハードデイスク制御方式における不良
セクタ登録処理を示すフローチヤート、第3図
は、第1図に示したハードデイスク制御方式にお
ける不良セクタ検出処理を示すフローチヤート、
第4図は、フオーマツトデータの形式を比較して
示す図、第5図は、トラツクフオーマツトを示す
図である。 図において、1……CPU、2……メインメモ
リ、3……制御部、4……HD制御機構、5……
不良セクタ登録手段、6……不良セクタ検出手
段、7……キヤツシユメモリ、8……HDコント
ローラ、9……HD装置である。
FIG. 1 is a block diagram showing a hard disk control method according to an embodiment of the present invention, and FIG.
3 is a flowchart showing a bad sector registration process in the hard disk control method shown in FIG. 1; FIG. 3 is a flowchart showing a bad sector detection process in the hard disk control method shown in FIG.
FIG. 4 is a diagram showing a comparison of format data formats, and FIG. 5 is a diagram showing a track format. In the figure, 1...CPU, 2...Main memory, 3...Control unit, 4...HD control mechanism, 5...
Bad sector registration means, 6... bad sector detection means, 7... cache memory, 8... HD controller, 9... HD device.

Claims (1)

【特許請求の範囲】 1 中央処理装置がハードデイスクコントローラ
を介してハードデイスク装置を制御するハードデ
イスク制御方式において、 上記ハードデイスク装置のフオーマツト時に上
記中央処理装置から供給される不良セクタフラグ
およびセクタ番号を含む第1のフオーマツトデー
タを上記ハードデイスクコントローラで使用され
るシリンダ番号、ヘツド番号およびセクタ番号を
含む第2のフオーマツトデータに変換しながら上
記第1のフオーマツトデータの不良セクタフラグ
と上記第2のフオーマツトデータのヘツド番号と
の論理和を上記第2のフオーマツトデータの新た
なヘツド番号とすることにより不良セクタを登録
する不良セクタ登録手段と、 リード/ライトコマンド実行時に不良セクタフ
ラグとヘツド番号との論理和を新たなヘツド番号
とすることにより不良セクタを検出する不良セク
タ検出手段と、 を備えることを特徴とするハードデイスク制御方
式。
[Scope of Claims] 1. In a hard disk control method in which a central processing unit controls a hard disk device via a hard disk controller, a first controller including a bad sector flag and a sector number supplied from the central processing unit when formatting the hard disk device is provided. While converting the format data to second format data including the cylinder number, head number, and sector number used in the hard disk controller, the bad sector flag of the first format data and the second format data are a bad sector registration means for registering a bad sector by logically ORing the head number with the head number as a new head number of the second format data; A hard disk control method comprising: bad sector detection means for detecting a bad sector by setting a new head number.
JP3607786A 1986-02-20 1986-02-20 Hard disk control system Granted JPS62192975A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3607786A JPS62192975A (en) 1986-02-20 1986-02-20 Hard disk control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3607786A JPS62192975A (en) 1986-02-20 1986-02-20 Hard disk control system

Publications (2)

Publication Number Publication Date
JPS62192975A JPS62192975A (en) 1987-08-24
JPH0578107B2 true JPH0578107B2 (en) 1993-10-28

Family

ID=12459677

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3607786A Granted JPS62192975A (en) 1986-02-20 1986-02-20 Hard disk control system

Country Status (1)

Country Link
JP (1) JPS62192975A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02502330A (en) * 1988-04-08 1990-07-26 ディジタル イクイプメント コーポレーション Encoding method and apparatus comprising forming a codeword by combining a first code sequence and a second code sequence

Also Published As

Publication number Publication date
JPS62192975A (en) 1987-08-24

Similar Documents

Publication Publication Date Title
US5159671A (en) Data transfer unit for small computer system with simultaneous transfer to two memories and error detection and rewrite to substitute address
US4525801A (en) Disk storage controller
EP0215184A2 (en) Data processing peripheral subsystems having a controller and a plurality of peripheral devices
JPH0578107B2 (en)
JPH0441375B2 (en)
JPH0431129B2 (en)
JPS592962B2 (en) Recording device control system
JP3130798B2 (en) Bus transfer device
JPS6050672A (en) Read control system of rotary memory
JPS58223860A (en) Magnetic disk controller
JPH0731639B2 (en) Magnetic disk controller
JPH04311218A (en) external storage controller
JPH08138391A (en) Flash memory control method
JPH05181613A (en) Information processor
JPS6217877Y2 (en)
JP2972365B2 (en) Access control method for magnetic tape storage
JPH0668876B2 (en) Magnetic disk controller
JPS61133433A (en) Defective sector alternate processing system in unrewritable data recording medium
JPS6113259B2 (en)
JPH036614A (en) Magnetic disk controller
JPS6363990B2 (en)
JPH03134869A (en) Test data preparing method and testing method
JPS6032165A (en) Control method for read-out of disk
JPH04311217A (en) External storage controller
JPS59157813A (en) Controller for magnetic memory of rotor