CA1321837C - Method and apparatus for processing information data - Google Patents
Method and apparatus for processing information dataInfo
- Publication number
- CA1321837C CA1321837C CA000616298A CA616298A CA1321837C CA 1321837 C CA1321837 C CA 1321837C CA 000616298 A CA000616298 A CA 000616298A CA 616298 A CA616298 A CA 616298A CA 1321837 C CA1321837 C CA 1321837C
- Authority
- CA
- Canada
- Prior art keywords
- data
- error
- host computer
- correction
- register
- 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 - Fee Related
Links
Landscapes
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
ABSTRACT
Method and apparatus for processing data wherein control dependency on the host computer may be lower through an external control with the aid of a simpler program and wherein the data recording/reproduction may be performed efficient without lowering the processing efficiency of the host computer. And an error correction method wherein the error correction capability for the burst errors may be improved.
Method and apparatus for processing data wherein control dependency on the host computer may be lower through an external control with the aid of a simpler program and wherein the data recording/reproduction may be performed efficient without lowering the processing efficiency of the host computer. And an error correction method wherein the error correction capability for the burst errors may be improved.
Description
~32~g37 BAC};GROI~ND C)F THE INVENTION
This invention relates to a data processing apparatus and a method used therein for correcting data errors.
In a variety of data processing apparatus, such as personal computers or word proc:essors, the disk-shaped recording medium, such as the floppy disk, is widely used as the external storage medium.
The data writing and reading in the disk apparatus is I usually so performed that the host computer issues a series of control instructions to the disk for sequentially actuating a variety of functional blocks such as rotary drive means or data processing means and the computer operation is performed sequentially in such a manner that, after the end of a predetermined control operation is ascertained, the computer proceeds to the next control operation.
In the conventional floppy disk apparatus, it is therefore up to the host computer to control the operation of the disk apparatus since the start until the end of data recording and reproduction. Thus a major portion of the j processing capacity of the host computer is dedicated to controlling the disk operation such that the processing - efficiency of the host computer is lowered considerably.
On the other hand, when correcting the errors of the data recorded with error correction codes, flags are employed in the error correction or parity codes in the conventional triple erasure correcting routine in such a manner that, although the state of error correction is generally satisfactorily for random errors, the risk is high that a double error correction routine is executed on occurrence of burst errors, such that, when the 3-symbol error, for example, is taken for a 2-symbol error, the possibility is high that the correction is not feasible and the errors remain uncorrected.
OBJECT AND SUMMARY OF THE INVENTION
It is a general object of the present invention to provide a data processing apparatus free of the above problems and a method employed therein for correcting data err~rs.
It is a principal specific object of the present invention to provide a novel data processing apparatus wherein control dependency on the host computer may be l~wered through an external control with the aid of a simpler program and wherein the data recording/reproduction may be performed efficient without lowering the pr~cessing efficiency of the host computer.
It is another specific object of the present invention to provide an error correction method wherein the error correction capability for the burst errors may be improved.
Figs. 1 to 4 are diagrammatic views showing data formats 132~837 employed in the disk data recording/reproducing to which the present invention is applied.
Figs. 5A and ~B are diagrammatic views showing sub-code data formats composed of the sub-data having the formats shown in Figs. 3 and 4.
Pig. 6 is a diayrammatic view showing the arrangement of the error correction codes having the format shown in Fig. 4.
Fig. 7 is a block diagram showing the disk data recording/reproducing apparatus to which the present invention is applied.
Fig. 8 is a block diagram showing the connection between the host computer and the interface circuit.
Fig. 9 is a block diagram showing the reset register and the circuit in its vicinity.
Fig. 10 is a block diagram showing the memory control unit shown in Fig. 7.
Fig. 11 is a diagrammatic view showin~ a memory map of the buffer memory shown in Fig. 7.
Figs. 12A and 12B are diagrammatic views for understanding the read correction flag area on the memory map shown in Fig. 11.
Fig. 13A and 13B are flow charts showing the operation of the disk data recording/reproducing apparatus.
Fig. 14 is a diagrammatic view showing the buffer memory having on increas~ed capacity.
1321~37 Figure 15 is a flow chart showing a modification of the operation of the disk data recording/reproducing apparatus.
Figure 16 is a flow chart showiDg an example of application of the error correction algorithm of the present invention to the correction of the coding data.
Figure 17 is a flow chart sho~ving an example of application of the error correction algorithm of the present invention to the correction of the sub-codes.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
Before proceeding to description of the disk data recording/reproducing apparatus to which the data processing apparatus and the error correcting method according to the present invention are applied, the data formats employed therein with be explained by referring to Figures 1 to 6. However, those formats not pertinent directly to the present invention are not explained for simplicity.
First, the data format for the floppy disk will be explained.
!
~rack Format :
Figure 1 shows a track format. Each track is formed by an index and four sectors #0 to #3. Thus, from the start position on, each track is constituted by a gap 0 (pre-index gap), index, gap 1 (post-index gap), section #0, gap 2 (sector gap), sector #1, gap 2 (sector gap), sector #2, gap 2 (sector gap), sector #3, and a gap 3 (the last gap). The index - isa ~3~1837 continuous Tmax signal. It is noted that one frame (F) is c~mposed of 44 bytes ~B), in this ordr, with each byte including 10 channel bits.
PG denotes a rotational phase detection signal that is produced upon rotation of a spindle motor adapted for rotationally driving the floppy disk. The signal is correlated with the index.
Sector Format Fig. 2 shows a sector format. Each sector is formed by a preamble data "2BH", a sync frame, sub- rame, coding data (data frames O to 127 through n, and a post-amble data "2BH", in this order, and has a length of 5765 bytes.
Sub-frame Format Fig. 3 shows a sub-frame format. Each sub-frame is formed by sync data, sub-data, frame address, parity codes for the sub-data and address, mode data, track number, sector number (#0, ~1, #2 or ~3), head number, copy protection code, reserve area and parity codes (4 symbols~ for data following the frame address and mode data, in this order, and has a length of 44 bytes.
Data Frame Format Fig. 4 shows a data frame format. Each data frame is formed by sync data, sub-data, frame address, parity codes for sub-data and address, coding data (32 symbols), C2 and C1 parity codes (each 4 symbols) as later described, in this .: : ~ . , , ... : .
order, and has a length of 44 bytes.
Sub-Code Format The sub-code is formed as a sub-code assembly formed by 128 bytes each being the 1-byte sub-data of the data frame shown in Fig. 4A and each being cc~llected from each of the 128 data frames for one sector, as shown in Fig. 5A. It is constituted by the sub-codes #0, ~1, #2 and #3. As shown in Fig. 5B, each sub-code is formed by a mode data, track number, sector number, head number, copy protection code, reserve area and parity codes (4 symbols) for the a~ove data, in this order, and has a length of 32 bytes.
Data Frame Error Correction Code Format The C2 and C1 parity codies of the above described data frame will be explained by referring to Fig. 6, wherein, among the data constituting one sector, the data frames taking part in the formation of the C2 and C1 parity codes and the sub-frame ta~ing part in the formation of ~he C1 parity code, are shown. The C2 parity codes are constituted by plural symbols of the C2 series or the coding data o~tained on interleaving from a large number of symbols arranged in a matrix in a direction extending from the upper left towards the lower right in the figure. The C1 parity rodes are constituted by plural symbols of the ~1 series extending vertically from the upper side towards the lower side in the figure, that i5, the frame address, coding data -: : -i . ~ , . .:, .
:~ -: ,, - . . . . .. ..
132~837 and the C2 parity codes. ~or these Cl and C2 parity codes, the Reed-Solomon codes, for example, are employed.
DisX Data Recordinq/Reproducinq AP~)aratus The apparatus for recording and/or reproducing the data having the above described data formats on or from the disk will be explained by referring to ~ig. 7.
The data to be recorded are supplied from a host computer 1 to a buffer memory 2 by way of an interface '1 circuit 11 and a disk controller 12 within a disk control ~ection 10. An S-RAM having the storage capacity of the order of 8 k bytes for each sector, for example, is employed as the buffer memory 2. The data written into the buffer I memory 2 are subjected to an encoding processing shown in Fig. 6, that is, the formation and annexation of the C2 and C1 parity codes, by an error correction processor 13 having the encoding and decoding functions. The encoded output from thP buffer memory 2 is supplied to a modulating circuit 14, where it is subjected to a processing such as 8/10 conversion, before it is supplied to a magnetic head 4 via i recording/reproducing circuit 3 so as to be recorded on a floppy disk ~. The floppy disk is driven rotationally at ~ 3600 rpm, for example, by a spindle motor 7 controlled by a microcomputer 6 adapted to control the mechanical system.
The movement of the magnetic head 4 is also controlled by the microcomputer 6. A serial/parallel interface 15 is provided - . ~ ~ ., ; :-... .
~321837 between the microcomputer 6 and the disk controller 12 toeffect serial communication. It will be noted that the recording/reproducing circuit 3 also has the function as an erasure circuit.
The data read-out by the magnetic head 4 from the floppy disk 5 is supplied via recording/reproducing circuit 3 to a demodulating circuit 16. These data are subjected to a processing including 10/B conversion in the demodulating circuit 16 after which they are sent to and written in the buffer memory 2. The one-sector data written in the buffer ¦ memory 2 are subjected to a predetermined decoding, such as error correction by the C1 and C2 parity codes and removal of redundancy bits, before they are supplied via disk controller 12 and interface circuit 11 to the host computer 1.
The disk controller 12 is constituted by a microprogram control section 12a and an instruction command section 12b.
The microprogram control section 12a interpres or construes simple instructions supplied from the host computer 1 via interface circuit 11 to supply the micro-codes to the instruction execute section 12b for controlling a series of write/read control operations.
-- The control data formed in the disk controller 12 is supplied via internal bus to a memory management unit 17.
The disk control section 10, including the interface circuit 11, disk controller 12, an error correction processor . .: , . . ~ . , .......... .. . . .... :: .,, ,: :
::: :: . : - : . : . . . : :
- . :.
132183~
13, demodulating circuit 16, memory management unit 17 and the serial/parallel interface 15, may be constituted by, for example, a one-chip LSI(large-scale integrated circuit).
Interface Circuit In the present embudiment, the interface circuit 11 is provided with five kinds ~f registers for interfacing between the control decoder 20 and the host computer 1, namely a 1-; byte reset register 21, 1-byte status register 22, 1-byte , command register 23, 4-byte parameter register 24 and a 1-¦ byte data register 25.
¦ These five kinds of registers are selected at a control ¦ decoder 20 by 6-bit data, that is, address bits Ao~ A
supplied from the host computer 1, read command bit RD, write command bit WR, chip select bit CS obtained upon dec~ding the I adress at the decoder 1a and a DMA acknowledge bit DACK,as shown in Table 1.
Table 1: Operating State of Interface Circuit _ ._ l DACX CS A1 Ao RD WR Operating State . .
1 0 1 1 1 0 rest system 1 0 0 0 0 1 read status register 1 0 0 0 1 0 write command register 1 0 0 1 0 1 read parameter register 1 0 0 1 1 0 write parameter register 1 0 1 0 0 1 program reading of data 1 0 1 0 . 1 0 program writing of data 0 1 - - 0 1 DMA reading of data 0 1 - - 1 0 DMA writing of data Reset Re~ister .. : , .. . -- , -.: - ~ : --. : -. : . : . . .
:L32~837 Reset command data for initializing the floppy disk apparatus and calibratin~ the drive are supplied to the reset register 21. When the reset command is supplied to the reset register 21, the operation of thle spindle motor 27 ceases immediately in the floppy disk and the magnetic head 4 is returned to its home position.
As shown diagrammatically in Fig. 9, the interface circuit 11 is designed and constructed in such a manner that the 8-bit reset dat~ D7, D6, D5, D4, D3, D2, D1 and Do supplied from the host computer 1 via data bus are written in the reset register 21 by write pulses from the host computer 1. It is composed of a reset pulse generator 26 adapted to form reset pulses on the basis of the write pulses and gates 27, 28 for selectively outputting the reset pulses generated in the reset pulse generator 25 responsive to the reset data D7 to Do spplied to the reset register 21. In the present embodiment, the least significant bit Do and the second lower ~it D1 of the aforementioned 8-~it reset data D7 to DO are used as the reset flag for the m~croprogram control section 12a shown in Fig. 7 and as the reset flag for the microcomputer 6 of the mechanical deck system controller, also shown in Fig. 7, respectively, for separately resetting the microprogram control section 12 and the micro computer 6 of the mechanical deck system controller.
During the time the microprogram ccntrol section 12a is .,.- .-. , :
:. . : .~: . , :. , .. , : .. -~ , . :,.. .. .
1~2~837 performing a series of the above described control cperations for the floppy disk 10, the host computer 1 monitors the contents of the status register 22 or the parameter register 24 r in such a manner that, upon detection of an erroneous or mistaken operation, reset data are supplied to the reset register 21 of the interface circuit 11 for individually resettiny the microprogram control section 12 or the microcomputer 6 of the mechanical deck system controller.
By this resettinq operation, the floppy disk apparatus 10 may take proper measures in connection the mistaken operation or initialize the microcomputer 6 of the mechanical deck system controller for efficient data recording and reproduction to and from the disk 5 during the time the micropr~gram control section 12 alone is performing the processing operation.
! Although the microprogram control section 12 and the microcomputer 6 of the mechanical deck system controller are reset separately in the above embodiment, the number or the function of the devices to be reset may be correcpondingly increased by a number of bits of the reset register 21. ;~-Thus, in accordance with the present invention, recording and/or reproducing means for recording and/or reproducing data to and from the recording medium such as the disk can be externally controlled by microprogram control means by a simple program. In addition, the recording and/or reproducing means and the microprogram control means can be . -132~837 separately reset based on reset data supplied from the host computer to the register, so that the reset operation can be performed promptly and efficiently and the control dependency rate on the host computer is lowered for efficient data recording and reproduction without lowering the processing efficiency of the host computer.
Status Reqister The status register 22 indicates the statuses of the floppy disk by 8 bits. The status infDrmation is transmitted to the host computer 1.
In the status register 22, the most significant D7 bit or D7 (non-DMA data request) flag is used for hand-shaking in case of data transfer between the register and the external system, that is, the host computer 1, as shown in Fig. 8.
This D7 or non-DMA data request flag becomes "1" each time i data transfer is enabled, becomes "O" during data transfer and again becomes "1" on completion of a 1-byte data, such that it is repeàtedly inverted between the states "1" and "O"
until a predetermined number of times of transfer is reached.
The next bit D6 or D6 (no media) flag indicates the state of attachment of the floppy disk 5, thus becoming "1" when the floppy disk 5 is not attached or when the floppy disk S is pulled out during the attachment operation by actuation of an eject button. The next bit D5 or media change flag indicates the possibility of the floppy disk 5 having been changed, - . . ,: ~
132~837 thus becoming "1" when the resetting is made, when the floppy disk 5 once ejected is not as yet attached or when the disk 5 is pulled out during the disX attachment operation by actuation of the eject button. The D5 bit or the media change flag reverts to "O" when the data is read correctly from the floppy disk 5. The next D4 bit or write protect flag indicates the write inhibit state to the floppy disk 5.
Thus, when no floppy disk 5 is inserted or a floppy disk 5 to which writing is inhibited is inserted, the flag becomes "1"
and, when the floppy disk 5 on which writing can be made is inserted, it becomes "O". The next D3 bit or D3 (ECC error ~MSB)) flag and the D2 bit or D2 (Ecc error (LSB)) flag indicate in two bits in four status values what error has taken place in the course of the error detection and correction carried out automatically at the error correcting section 13 with the progress in the reading operation.
~ hus, in the course of decoding (correcting) with the two series C1 and C2, the bits become "00" when neither the correction routine by the~ C1 parity nor the correction routine by the C2 parity has been executed, that is, when no error has been caused. The bits become "01", "10" and "11"
when only the correction routine by the C1 parity code is executed, when the correction routine by the C2 parity code is also executed and when the correction is not possible, respectively.
~321~37 Thus, in the case of the cross interleave Reed Solomon code (CIRC) with a distance of 5, for example, the bits become "00" when no error has been caused, while they become "01" when the number of symbol errors is not more than two per frame, since the correction can then be made only by the C1 parity code. When the number oE symbol errors is not less than three per frame, the bits become "10" since the correction routine by the C2 parity is executed. When the number of symbol errors per frame is not less than three and not less than three symbol errors exist in ~he C2 series, or the erasure correction is not possible, the bits become "11".
The values of the D3 and D2 flags are effective at the time when the one-sector processing is completed and represent the error status of the sector.
The next D1 bit or the D1 ~drive error) flag indicates the mistaken drive operation. Thus, when the drive function is not executed correctly, it becomes "1" and is maintained in the "1" state until the read/write/erase operation is executed correctly next time or until the above reset command is received. The least significant Do bit or the Do (command busy) flag indicates the state of execution of the commands other than the above reset command. Thus it becomes "1"
during execution and practicity of the commands other than the above reset command and reverts to "O" with the end of processing.
~32~37 It this manner, the drive state and the state of deterioration of the floppy disk 5 as the recording medium can be grasped at the host computer 1 in dependence upon the contents of the status rPgister 22. Also, when the symbol error rate of the floppy disk 5 of the order of 10-3 is guaranteed, the kind of the error can be roughly identified from the bits, i.e. the error can be assumed to be a random error when the bits are "01" and a burst error (correctable) when the bits are "10", respectively, since it is presumably when the burst error exists that the correction routine by the C2 parity is performed.
Command Reqister All the command data for controlling the floppy disk apparatus are afforded to the command register 23 such that the respective basic functions are enabled when the corresponding bits are set to "1". The microprogram controller 12 interpres or construes the contents of the 1-byte command data afforded to the command register 23 at the host computer-l to c~use the instruction execute ~section 12b to carry out the data erasure, recording or reproduction automatically and at a prescribed order.
Referring to Fig. 8, drive designate commands tunit select 1, unit select 2~ are afforded to the upper D7 and D6 bits of the command register 23. Up to four at the maximum of the drive designations can be made by the above 2-bit . . ; . ~ . : . ;
132:1 83~
drive designation commands (unit select 1, unit select 2).
An execution inhibit command is afforded to the next D5 bit.
Setting the D5 bit to "0" invalidates the function specified or commanded at the lower D4 to Do bits. Whenthe processing accompanied by execution is carried out, the D5 bit is set to "1". The comand (Mon: Motor On) for commanding the on-state of the spindle motor 7 is affo:rded to the D4 bit. The spindle motor 7 is driven into rotation when the D4 bit is set to "1". The spindle motor 7 is halted after a predetermined time when the D4 bit is set to "0". 'When the spindle motor ~ starts its rotation, the magnetic head 4 is moved from its home position towards the outer periphery and, when the spindle motor 7 is halted, the magnetic head reverts to the home position from its current position. It is noted that the D4 bit need not be set to "t" for each ordinary read/write/erase operation, and the microproyram control section 12 is so designed and arranged that the rotation of the spindle motor 7 is automatically started with the read/write/erase operation even if the D~`bit is "0" and that the motor 7 is halted after the lapse of a certain predetermined time since the end of processing. The data ~ransfer command is supplied at the next D3 bit. With the D3 bit set to "1", data transmission and reception may occur between the floppy disk apparatus and the host computer 1.
The above dat~ transmission and reception occurs by 132~37 sequential transfer to the buffer memory 2 via data register.
In this case, one of 4 k bytes, 512 bytes or 256 bytes may be selected as the number of the triansferred data, while the address in each 4 k-byte address can be specified or designated. It is noted that the buffer memory 12 may be used as a transient bank memory for the host computer 1 without dependency on the operation of the floppy disk device. It may be accessed not only by the physical sector units of 4 k ~yt~s but by the logical sector units of 512 and i 256 bytes. The erasure command IER: erase) is afforded to i the next D2 ~it. With the D2 bit set to "1", erasure can be effected with the physical sector unit selected at the parameter register 24. The write command (WR: write) is afforded to the next D1 bit. With the D1 bit set to "1", ` writinq can be effected at the physical sector unit specified ! at the parameter register 24. Index signals are recorded when the index is specified at the parameter register 24.
Under the write command WR, the microprogram control section 12a performs a processiny in accoraance with a predetermined sequence for writing the data in the floppy disk ~. Thus the parity data/sub-code datatheader information for error correction is generated automatically in the error correction processor 13 and outputted sequentially in accordance with a predetermined format. Under the write command WR, a series of data transfer/erase/write operations can be executed, and " . , ,. ~ . ~ ,, , !,, .
:L321837 the microprogram control section 12 performs an automatic processing in accordance with a predetermined sequence. The read command (RD: read) is afforded to the next Do bit. With the Do bit set to "1", reading is performed with the physical sector unit designated at the parameter register 24. Index designation at the parameter register 24 is ineffective and re ults in a drive error in a ~tatus register 22. Vnder the read command (RD), the program control secton 12a performs a processing in accordance with a predetermined sequence for reading data from the floppy disk 5 and, at the s~ame time that the signals are read from the floppy disk 5, causes the error correction processor 13 to perform mistaken data detection/correction on the data read into the buffer memory 2 is accordance with the predetermined format. The transfer of data reproduced from the floppy disk S to the buffer memory 12 and the transfer of data from the buffer memory 12 to the host computer 1 are feasible under the above read command (RD), and are automatically effected by the microprogram control section `12 in accordance with a predetermined sequence. When the reading is completed in a regular manner, the reproduced track/sector number is written -into the parameter register 24.
Parameter Reqister The parameter data for designating the writing of the index signals, erasure of the track units and the . ............... : - ~
.. ... , . :.,, - : :
. :: , .: : , .. - .: .
., , ~ , . : . .: . .:
~32~
track/sector number when the reading/writing/erasure is performed by the physical sector units or on the physical sector basis are afforded to the parameter register 24. This parameter register 24 is composed ~Eor example of 4 bytes. A
register pointer, not shown, is advanced each time one byte is read or written, and reverts t~D the first byte when the accessing is continued further after completion of the reading of the last byte, herein the fourth byte, or after completion of the writing of the second byte. It is noted that the pointer reverts to the first byte at the time when accessiny to the register other than the parameter register 24 is performed to initialize the reception sequence of the parameter register 24.
The first byte of the parameter register 24 is used as the physical sector address accompanied by the reading/writing~erasure operation and as a sector register 24a for track erasure designation, index writing designation, logical sector size select designation and virtual logical sector address designation to- effect-the ~ata transfer between the buffer memory 2 and the host computer 1. The sector register 24a designates selectively the three kinds of the logical sector size at the upper side bits D7 and D6 while designating the index writing and erasure of one track in its entirety (1, 1.). When the write/erase combinational command is afforcled to the command register 23, with the upper two bits D7 and D6 f the sector register 24a being set to (l, 1~, the microprogram control section 12a causes the index signals to be written after erasure of the track in its entirety. With the index signa]s thus written into the floppy disk 5, the floppy disk 5 may then be accessed by physical sector units. The next two bits D5 and D4 designate the 4 k-byte physical sector address and assume ef~ective values when the reading operation is carried out as normally.
These bits can be colla~ed as the occasion may require with the physical sector address designated at the host~computer 1. The lower side four bits D3, D2, D1 and Do designate the logical sector address of the 512 byte units.
The second byte of the parameter register 24 is sued as the track register 24 b for designatiny the track number.
When the reading is performed in a regular manner, the lower seven bi~s of the track register 24 b become effective as the track number, and can be collated as the occasion may require with the track -address designated at the host computer l. The 2-~yte copy p~otection code ~PC is afforded to two registers 24c, 24d at the third and fourth bytes of the parameter register 24.
Data_Reqister The data register 25 is used for data transfer between the floppy disk and the host computer 1. Both the program and the DMA are transferred through thin register 25.
:~3~:3 8~7 Memorv Manaqement Unit The memory management unit 17 responsible for address management of the buffer memory 2 and h~ving the configuration as shown in Fig. 10 is able not only to read or write data on the sector basis in the aforementioned recordinq or reproducing mode, but also to read or write any desired number of data other than the number of one-sector unit data of 4096 bytes or the number of unit data prescribed by the operating.system (OS) of the host computer 1, from and to desired addresses of the buffer memory 2, by way of transferring data between the buffer memory 2 and the host computer 1.
The memory management unit 17 is composed of a start address register 30 for previously storing data indicating I the access start address when an access is had to the buffer memory 2 from the host computer 1 to effect data transfer to write or read data, that is, the transfer start address data, a data number reqister 31 for previously storing the number of the transferred data, a memory address counter 32 for presetting the transfer start address data stored in the start address register 30, a data number counter 33 for presetting data concerning the number of the data stored in the data number register 31, and A control circuit..34 for preset and count control of the memory address counter 32 and the data number counter 33. The unit 17 performs the memory : ,~
.:, . . : ~ - . .~ ' ~32~l83~
control of the buffer memory 2 in the~Eollowinq manner.
When accessing the buffer memory 2 ~Erom the host computer 1 to effect data transfer to write or read data, the memory management unit 17 is previously supplied with data indicating the transfer start address data and the number of the tran~ferred data from the host: computer 1. The unit 17 also has transfer start address data and data number data stored in the start address register 30 and the data number register 31, respecively. Before starting data transfer, the control circuit 34 causes the tr~nsfer start address data and the data indicating the transferred data to be preset in the memory address counter 32 and in the data number counter 33 and accesses to the buffer memory from the address indicated in the transfer start address data preset in the memory address counter. The data transfer is then started. Each time one-byte data transfer is completed, the control circuit 34 causes count pulses to be supplied to the memory address counter 32 and the data number counter 33 to increment the memory address counter 32 while simultaneously decrementing the data number counter 33. Thus the data is transferred until the value of the data number counter 33 is reduced to zero, that is, a number of data equal to the value preset in the data number reqister 31 is transferred, before the data transfer is term~nated.
Thus the buf;Eer memory 2 may be accessed from the host 132~37 computer 1 from a given address to another given address to write or read a desired number of data, so that, when transferring a number of data other than the number equal to a number raised to the powers of 2 or an integral number of time thereof, any wasteful access time to the buffer memory may be eliminated to improve the dalta transfer efficiency.
Buffer MemorY Map Referring to Fig. 11, each sector of the buffer memory 2 has a capacity of 8 k(8192) bytes, ~f which 6 k(6144) bytes represent a usable area. The area ~hown by hatched lines is not pertinent directly to the present invention and therefore the related description is omitted for simplicity. The 128-frame or one-sector coding data is written in the left half 32x128 byte portion in the figure. The C2 and C1 parity codes are written in the 4xl28 byte area adjacent to the area where the coding data are written. The Cl correction flags dependent on the results of the error correction decoding by the Cl parity codes and the read flag indicating the data write time ar-e written in the 1x128 byte area at the right-hand side of the figure. The read flags and the Cl c~rrection flags are set for each frame, with the read and C1 correction flags ~or each frame being written in the same 8-bit byte. The frame address is written in the 1x128 byte area adjacent to this area. The sub-codes ScO to Sc3 havin~
the same contents as described above are written in the lx128 ,. . :.. - .. .... . - .
132183~
byte area adjacent to the area where the frame address is written. In the figure, the upper 4-byte area of the 1x128 byte area adjacent to this area is reserved for the correction flags by the parity codes of the sub-codes, while the lower 7-byte area is used as the internal register for the ECC processor 13.
The read flags and the C1 correction flags will be described in detail. As shown to an enlarged scale in Fig.
12A, the reading flags and the C1 correction ~lags for each frame are written in the 1-~yte or 8- bit area in the buffer memory 11. The upper five bits D3 to D7 and the three bits Do to D2 represent the area for the read flags and the area for the C1 correction flags, respectively. As shown in Fig.
12B, when the data are written into the bu~er memory 2, all the bits are "1". When the error correction and decoding is performed by the C1 parity codes, the upper 5-bits for reading flags are all "O", while the lower 3 bits for C1 correction flags are "1" or "O" depending upon the results of correction and decoding. ~hus they are "ODO" when there is no error, "O01"-when one error is to be corrected, "011" when errors are to be corrected and "111" when thf~ correction is impossible. In other words, a flag is set at Fo bit in case of one error correction, flags are set at Fo and F1 bits in case of two error correction, and flags are set at the three bits Fol F1 and F2 in case the correction is not possible.
.t321837 It is noted that the above C1 correction flag is intended for error correction by the C2 parity codes as later described.
In this manner, the memory area fore the reading flags and that for the C1 correction flags are provided in one and the same byte so that only one byte suffices for the flag area for each frame. Since the upper five bits for the reading flags are all "0", that is, reset automatically, at the time of error correction by the C1 parity c~des, it ~ecomes unnecessary to reset the reading flag again for reproducing the next sector.
These flag states are transferred as the occasion may require to the aforementioned status register 22.
OPeration of the Disk Data Recordinq/Reproducinq Apparatus The operation of the above described disk data recording/reproducing apparatus will now be explained by referring to the flow chart of ~igs. 13A and ~3B.
It is first determined at step 101 whether "1" has been set at the D4 (Mon) bit, D2(ER) bit, D1(WR) bit or Do(RD) bit of the-command register by command data supplied from the host computer1 to the command register 23. If the result is affirmative, it is determined at step 102 whether the floppy disk 5 has been attached in position by the contents of the status register 22. If the result at step 102 is affirmative, that is, when the floppy disk 5 is attached in position, it is determined at step 103 whether the control . , : .: ~ . ., . .: .. .. . .
:~32~837 microcomputer (~ COM) 6 for the mechanical deck system controller is performing the processing operation. When the control microcomputer (~ COM) 6 is released from the processing operation, it is checked at step 104 whether "1"
has ~een set at any of the D2 (ER); D1(WR) or Do~RD) bit of the command register 23. If the result at step 104 is affirmative, that is, when any of the erasure (ER), writing (WR) and readin~ (RD) operations has been issued from the host computer 1, it is checked at step 105 whether the drive command by bits D7, D6 of the command register 23 has already been issued. If a new drive command is not issued, the disk surface number (SURF #), drive number ~DR #) and the motor-on signal (Mon) are supplied at step 107 to the mechanical deck system controller (MD) 6. It is then checked at step 107 whether control micro-computer (~ COM) 6 for the mechanical deck system controller is performing a processing operation.
After the control microcomputer (r COM) 6 is released from the processing operation, the track number (TR #) set in the parameter register 24 is afforded ~t step 1D8 to the mechanical deck system controller MD 6. If the result at step 105 is affirmative, that is, when the drive is commanded, the program proceeds immediately to step 108 to afford the track n~mber (TR #) of the parameter register 24 to the mechanical deck system controller (MD) 6. It is then determined at the next step 109 whether "1" has been set at 132~837 the Do (RD) bit of th~ command register 23. If the result at step 109 is negative, that is, then the readinig command is not made, the data a~forded to the data register ~5 is transferred at step 110 to the buffer memory 2. It ls then checked at step 111 whether "1" is set at the D1 (WR? ~it of the command register 23. If th~e result at step 111 is affirmative, that is, when the write command is made by the host computer 1, it is checked at the next step 112 whether the index write command is made on the basis of the first byte of the parameter register 24, that is, the D7 and D6 bits of the sector register 24a. If the index write command is not made, the program proceeds to step 113 to perform the parity encoding operation (ENC) on the data written in the buffer memory 2. It is then checked at step 114 whether "1"
is set at the D2 (ER) bit of the command register 23. If the result at step 112 is affirmative, that it, when the index write command has been issued, the program proceeds immediately to step 114 to make a check of the erasure operation has been commanded at -the host computer 1. If the result at step 114 is affirmative, that is, when the erasure operation is commanded, the erasure operation (ER) and the write operation (WR) are performed at step 115. When the erasure operation (ER) is not commanded, only the write operation i s performed at step 116 . Then the result at step 111 is negative, that is, when the recording operation is not :; - , . ~ . , -,. ; .
. .. .. . ~ , .:: ... :
132~837 commanded, only the erasure operation ~ER) is made at step117. After the operations at the steps 115, 116 or 117 are made, the status of a sequence is checked from by the flags Do (Command ~usy) at the status register 22 at step 118 to check to see that the operation at the steps 115, 116 or 117 is terminated. The program then proceeds to step ~19 to make a check if "1" has been set at the bit D4 (Mon) of the ! command register 23. If the result at step 11a is negative, it is then checked at step 120 whether the control i microcomputer (~ COM) 6 is performing the processing ¦ operation. When the control microcomputer (~COM) 6 is ¦ .. released from the processing operation, the disk surface number (SURF #), drive number (DR #) and the motor-off number (M off) are afforded to the mechanical deck system controller (MD~ 6 at step 121. The program then proceeds to the stand-by state at step 122.
It is noted that, when the result at step 101 is negative, that is, when the host computer 1 has not commanded the operation of the floppy disk apparatus, the program proceeds to step 123 to make a check if the control microcomputer (~ COM) 6) for the mechanical deck system controller is performing the processing operation. When the control microcomputer ~COM) 6 is released from the processing operation, the disk surface number (SURF ~), drive number (DR #) and the motor off signal (M off) are supplied .
- , . . - .- ~ : .
to the control mlcrocomputer 6 of the mechanical deck system controller at step 124 and data is transferred at ~tep 125.
The program then proceeds to a standby state at step 122. If the result at step 104 is negative, that is, when only the command for spindle motor 7 being l:urned on (M on~ is issued at the host computer 1 but the erasure (ER), writing (WR) or reading (RD) are not commanded, the program proceeds to step 126 to afford the disk surface number (SURF ~), drive number (DR #) and the motor-off (M off) signals to the microcomputer i 6 for the mechanical deck system controller at step 124 to effect data transfer at step 125. When the result at step 102 is negative, that is, when the floppy disk ~ is not attached in position, the program proceeds to step 127 to makP a check if the drive is specified. If the same drive is specified, the program proceeds immediately to step 122. If a new drive is specified, the program proceeds to step 120.
If the result at step 109 is affirmative, that is, when the read operation tRD) is commanded by the host computer 1, the program proceeds to step 128 to reset the various flags.
The data are then read from the floppy disk 5 to the buffer memory 2 at step 129. After reading out the data at step 129, the Do (command busy) flag of the status register 22 is checked at the next step 130 to check the status of the sequencer to ascertain that the operation at the above step 127 is terminatecl. The program then proceeds to the next - .; . .: - :: : , . ....................... .
I '. . . ! '~ ' 13~837 step 131 to check the D1 bit of the status register 22 to check at step 129 if the magnetic head 4 has been correctly moved to the target track and the data read-out operation has been correctly made. If there is no drive error, an error correction processing ~DEC) is performed at step 132 at the error correction processor 13 by a Imethod as later described.
At the next step 132, it is checked if there is any error that cannot be corrected ~y the error correcting processing at step 132. If there is no error, the track number (TR #), sector number (SC #) and the copy inhibit code ~CPC) included in the sub-code data ~SUB-CODE) of the read-out data are transferred to the parameter register 24 at step 134 to check for the presence or absence of the error of the sub-code data (SUB-CODE) at step 135 ~y the method as later described. If there is no error in the sub-code data (SUB-CODE), the data read-out at the buffer memory 13 are transferred to the host computer 1 through the aforementioned data register at step 136. The program then proceeds to step 119.
If the results at the -steps 131, 133 and ~35 are affirmative, that is, when there is caused an error, the program proceeds immediately to step 119.
In the floppy disk apparatus of the present embodiment, microprogram control section 12 interprets or construes the command data D7, D6, D~, D4, D3, D2, D1 and Do supplied from the host computer 1 to the command register 23 of the -: ~ . ~ . , , , ' .
interface circuit 11 to perform the following various control operations.
Example of Control OPeration 1 Command data ID7~ D6~ Ds~ D4~ D3~ D2~ D1~ Do) =(O O ~ O O 1 1 0 ) (1) spindle motor on t2) magnetic head feed (seek) (3) erasure operation ~ (4) writing operation ¦ (5) spindle motor off I (6) maynetic head feed (cali~rate) ¦ Example of Control OPeration 2 I Command data (D7, D6, Ds~ D4~ D3~ D2~ D1~ Do) =(0 0 1 1 1 1 1 0 ) .' ! ( 1, spindle motor on (2) magnetic head feed Iseek) (3) data transfer 14) erasure operation (5) writing operation Example of Control OPeration 3 command data (D7, D6~ Dsr D4~ D3~ D2~ 1~ O) =(0 0 1 1 0 1 1 0 ) t1) spindle motor on (2) magnetic head feed (seek) (3) erasure operation . .
~: - .:: . ..... - .: . . , , . ,, .: :
- : . . : -.: :. , .. . ~ : . :
' '. ' . .'~ ' 1, ' ~ , ~ . . ...
132~8~17 (4) writing operation Example of Control OPeration 4 Command data (D7, D6, D5, D4, D3, D2, D1, Do) =(O O 1 0 0 ~ O 1 ) (1) spindle m~tor on (2) magnetic head feed (seek) ~3) reading operation (4) spindle motor off (5) magnetic head feed (calibra.te) Exam~le of Control OPeration S
(Command Data (D7, D6, D5, D4, D3, D2, Dl, Do =(0 0 1 1 1 0 0 1 ) (1) spindle motor on (2) magnetic head feed (seek) ! (3) reading operation (4) data transfer A series of control operations in which command data such as ~O 0 1 0 l 1 O) is afforded as the command data (D7, ¦ D6, D~, D4, D3, D2, D1, Do) by the host computer 1 to the command register of the interface circuit 11, will be explained in detail.
The microprogram control section or controller 12a interprets or construes the above command data (O 0 1 0 1 1 O) to afford the command signal for on-state of the spindle motor 7 (M on) and the track number (TR #) from the instruction execute section 12b by serial transfer to the microcomputer 6 of the mechanical deck system c~ntroller upon reception of the command siqnal ~M on) and the track number (TR #), the microcomputer 6 of the mechanical deck system controller causes the spindle motor 7 to be started to cause the revolution of the floppy disk 5, while shifting the magnetic head 4 by the feed motor 8 to the position of the specified track number (TR #). Durinq this time, the host ' computer l is advised by the microprogram controller 12a that i the readying state for exceiving the transferred data is completed. The host computer 1 then cau~es the data to be transferred to the buffer memory 13 by way of the data register 25 of the interface circuit 11 The instruction execute section 12b is also advised by the microcomputer 6 for the mechanical deck system controller that the revolutions of the spindle motor 7 are stable and the shiftinq of the magnetic head 4 is completed, with the recording/reproducing apparatus being in the readied state for recordinq. The error correcting processor 13 generates the error correcting parity codes on the data transferred from the host computer 1 to the buffer memory 11. As the instruction execute section 12b is advised by the microprogram controller 12a about the completion of the readying state for recording, and the parity codes are completely generated by the error correction pr~cessor 13, . ;. :. : ~ ~
132~l~37 the microprogram controller 12a actuates the recording circuit and the erasure circuit after the floppy disk 5 has t been revolved to the start position of the target sector, in such a manner the data are erased by the preceding erase head while data are recorded by a recorcting/reproducing head; The microprogram controller 12a affords the motor off signal (M
off) for the spindle motor 7 to the microcomputer 6 for the mechanical deck system controller by serial transfer to stop the revolutions of the spindle motor 7. The controller 12a also advises the host computer 1 that the data r,ecording operation is now terminated.
In the ~bove described embodiment of the data processing . .
apparatus, stored microprogram control means interprets or construes the simple instructions supplied from the host computer to effect a series of write/read operations so that external ~ontrol can be achieved by a simple program and the data recording/reproducing operation can be performed efficiently without lowering the processing efficiency of the host computer.
In the above example, data readinq and writing are performed by sector units, that is, on a sector basis.
However, when the capacity of the buffer memory 2 is increased, plural sectors can be read consecutively on a track basis or across plural tracks. In such case, the buffer memory 2 has five memory areas 2A to 2E, for example, ~ 32~3~
as shown in Fig. 14. The memory capacity of each of the memory areas 2A to 2E is selected to be sufficient to write the data reproduced from each sector of the floppy disk and to perform an error correction processing on the data. Thus the memory capacity is selected to be not less than 6 k byte, herein equal to 6 k byte. Thus the!buffer memory 13 has the total capacity of 30 k bytes. However, the memory employed herein has the total capacity of 32 k bytes.
On the other hand, parameter data for commanding the writing of the index signals, erasure of the track units, memory area numbers of the buffer memory 2, data for discriminating the sector and track modes from each other and the tracklsector number when the reading/writing/erasure is performed by physical sector units or track units, are supplied to a parameter register 24, each track consisting of four sectors, as mentioned above. In such case, the parameter register 84 is formed by five bytes and demarcated in some respects from that of the preceding example. Thus the register 24c at the third byte of the parameter register 24 is composed of a D7 bit as the data "0" and "1" for discrimination of the sector and track modes from each other, three bits D6, D5 and D4 indicating the number "0 0 0", "0 0 ~ - "1 0 0" of each of the memory areas 2A to 2E of the buffer memory 2, and lower four spare bits D3, D2, D1 and Do~
The 2-byte copy protection codes or CPC are afforded to ~321837 the registers 24d and 24e at the fourth and fifth bytes of the parameter register 24.
Similarly to the preceding example, the 3-bit data indicating the memory area numbers, that is, "O O 0", "O O
1", "O 1 O", "O 1 1" and "1 0 O" corresponding to the memory areas 2A to 2E, respectively, and the 1-bit data for discriminating the sector mode and the track mode from each other, are introduced into the parameter register 24 of the interface circuit ll, along with the ~-bit track number data and the 2-bit sector number data. The buffer memory 2 is controlled on the basis of these data by the microprogram controller 12a.
The track mode, indicated by the "1" state of the associated 1-bit data, will now be explained. The magnetic head 4 is moved to the track from which the data is to be reproduced. After the index siynals of the track are reproduced by the magnetic head 4, and after the floppy disk 5 has made one more complete revolution, the four-sector data are reproduced from the track. These reproduced data are data demodulated and written in the memory areas 2B to 2E of the buffer memory 2. These 4-sector data are corrected for errors by the error correcting processor 13 sector by sector and are transferred through the interface circuit 11 to the host computer 1. Similar operations are performed for the other tracks of the floppy disk 5 such that the contents of 3~
132~837 the memory areas 2B to 2E are rewritten by the 4-sector data of the tracks and corrected for errors before ths data are transmitted to the host computer. In the track mode, the 4-sector data of the track are written at all times in the memory areas of the memory areas 2B to2E. The host computer 1 controlsthe track numbers of thedata stored in the memory areas 2B to 2E.
When thedata such as the programs are recorded by track units or on the track basis on the floppy disk 5, these data are reproduced by the track units and written into t~e buffer memory 2, the data being then corrected ~or errors and transferred via interface circuit 11 to the host computer 1 for shortening the data processing time.
The usual mode for the sector mode, indicated by the "O"
state of the associated 1-bit data, will be explained. The magnetic head 4 is moved to the track from which the data is to be reproduced. After the index signals of the desired track are reproduced by the magnetic head 4, and after the floppy disk has made one more complete revolution, the desired one-sector data are reproduced from the track. These reproduced data are data demodulated and written in the memory area 2A of the buffer memory. The 1-sector data are corrected for errors by the error correcting processor 13 sector by sector and are transferred through the interface circuit 11 to the host computer 1. Similar operations are - . : : - .:.:: ::. . . .
performed for the other sectors of the floppy disk 5 such that the contents of the memory arlea 2 are rewritten by the data of the sector and corrected si.milary for errors ~efore the data are transmitted to the host computer 1. In the present usual mode of the sector mode, thedata of the sector are written at all times in the memory area 2A. The host computer 1 controls the track and sector numbers of the data stored in the memory area 2A.
The special mode for the sector.mode, indicatad by the "O" state of the associated 1-bit data, will now be explained. The magnetic head 4 is moved to a track from which the data are to be reproduced. After the index signals of the desired track are reproduced and after the floppy disk 5 has made one more complete revolutions, the data for the desired one sector of the track are reproduced. These reproduced data are data modulated and written in, for example, the memory area 2A of the buffer memory 2. The one-sector data are corrected for errors by the error correcting processor 13 and transferred through the interface circuit 11 to the host computer 1. The reproduced data from the other sectors are written in the next memory area 2B of the buffer memory 2. Similarly, the reproduced data from the separate sectors are sequentially cyclically written in th~ memory areas 2C, 2D, 2E, 2A ... and corrected separately for errors.
In the host computer 1, a pointer shown at X in Fig. 14 is 1~2~837 provided and, when the data are written for example in the memory area 2C, the pointer associated with the number of the memory area 2C is moved so that it will be associated with the number of the next memory area 2D. This pointeris moved sequentially cyclically to the numbers associated with the memory areas 2A, 2B, ... , 2E, 2A, ... . The numbers of the memory areas 2A to 2E of the buffer memory 2 and the track and sector numbers of the data stored in these memory areas are placed under control of the host computer 1 as the headers and, as the memory area number data are supp~ied from the host computer 1 via interface circult 11 to the microprogram control unit 12a, the data of a desired sector of a desired track stored in the buffers memory 2 may be transferred to the host computer 1 any number of times.
These data may be transferred directly without the necessity of re-correcting the data for errors. Tn this manner, when it is desired for the host computer 1 to use the data of a given sector of a given track of the floppy disk 5 a number of times, the latency time to elapse since the data are reproduced by the magnetic head 4 until they are introduced into the host computer 1 may be considerably reduced.
When the pointer is also in the usual sector mode at the host computer 1, the pointer may be fixed to the number of the memory area 2A.
In this manner, memory areas 2A to 2E are provided in , , : . . : .., .. . -: ., .- :, .... ..
:~321837 the buffer memory 2, the record data are reproduced and demodulated from the floppy disk 5 on the track or seçtor basis and corrected for errors in the buffer memory 2, so that the continuous long data may be procesed on the track basis in a shorter time while the short data on the sector basis can be processed in the same manner as before. In addition, the data transferred a large number oftimes to the host computer 1 can be stored in the buffer memory 2 until the use thereof is terminated so that the data can be processed within a shorter time.
The memory area in the buffer memory 2 may be composed of plural sectors or tracks or of any other extent as desired.
The numbers of the memory area 2A to 2E of the buffer memory 2 and the numbers of the tracks and sectors to which belong the data stored in the memory areas 2A to 2E are controlled at the host computer, so that the control and the control of the buffer memory 2 is facilitated. When the disk control unit and especially the instruction execute section 12b are responsible for these controls, the load of the control unit 10 is increased. In this case, the number of the memory areas 2A to 2E of the buffer memory 2 and the track and sector numbers to which belong the data stored in these memory areas are stored in a portion of the buffer memory 2 or other memories.
132183~
In the data processing apparatus of the present embodiment, the latency time may be shortened when it is desired that the reproducing data over plural sectors on the recording medium such as the disk be repeatedly utilized by the microcomputer. Also the data may be reproduced from the recording medium, such as the disk, on the sector or track basis, while the latency time may be reduced when the data are reproduced on the track basis.
The ~ther operation of the floppy disk drive device will be explained. The host computer (microcomputer) 1 writes thP
track number TR(k) of the data of the floppy disk 5 to be reproduced first in the parameter register 24 of the interface circuit 11, while also writing in the parament register 24 the flags indicating that the truck number has been written in the parameter register 24. Therefore, when the host ~omputer 1 reads the portion of the parameter re~ister 24 where the flag is written, it is seen that the truck number is written in the parameter register 24 and, on detection of the flag, writing the track number in the parameter register 24 is inhibited.
The host computer 1 generates the commands for data reproduction from the floppy disk 5 and transfer of the reproduced data to the disk control unit 10 of the floppy disk drive device. This causes the program sequence of the step 201 et seq of Fig. 15 to be initiated.
:: : : : , . :
.: , - " ::, :: . :: :. , ~ :: ~
1~21~37 On reception of the command, the instruction execute section 12b of the floppy disk clrive device causes the information concerning the track ~umber TR(k) written into the parameter register 24 of the interface circuit 11 to be transferred to the mechanical deck system controller 6 at step 201, while clearing the flag written in the parameter register 24 at step 202. This caus~es the host computer 1 to sense that the ~lag has ~een cleared and to write the number TR(k~l) of the next track to be reproduced in the parameter register 24 of the interface circuit 11 as well as writing or setting in the parament register 24 the flag indicating that the track number is written in the parameter register 24.
On reception of the information of the track number TR(k), the mechanical deck system controller 6 controls the ! motor 8 to move the magnetic head 4 to the track of the number TR(k) at step 203. When the movement of the magnetic head 4 is terminated and thin is transmitted from the mechanical deck system controller 6 to the instruction I execute section 12b, the floppy disk is turned. When the predetermined sector of the disk reaches the magnetic head 4, the execute section 12b controls the recording/reproducing/
erasure circuit 3 to cause the magnetic head 4 to reproduce the data of the track sector at step 204.
When the reproduction of the sector data is terminated, the instruction execute section 12b makes a check if the fla~
.. . . . .
- .: .. . , . : . ..
~21837 is set in the register 24 at step 205. If the result is negative, the program proceeds to step 208 as later described. If the result is aff,rmative, the execute section transmits the infsrmation concerninS~ the track number TR(kl1) written in the parameter register 24 of the interface circuit 11 to the mechanical deck system controller 6 at step 206, while clearing the flag written into the parameter register 24 at step 207.
~ n reception of the information concerning the track number TR(k~1), the mechanical deck system controller 6 controls the motor 8 in such manner that the magnetic head 4 is moved to the track of the track number TR(kl1) andt simultaneously, the data having the number repr~duced from the sector of the track bearing the number ~R(k) and stored in ~uffer memory 2 are subjected to error detection and c~rrection on the sector basis by the error correction processor 13 at step 208, and that the data thus corrected for errors are read from the buffer memory 2 so as to be transferred through the interface circuit 11 to the host computer 1 at step 209. It is noted that error detection may be included within the meaning of the error correction processing in the broad sense of the term. It is possible to perform only the error correction processing in the broad sense of the term during movement of the magnetic head 4.
The above seguence of operations is repeated if the .. ; .. , , , : . .
~32~3~
tracks of the ~loppy disk 5 bearing the numbers TR(k~2), TR(k+3), ... are to be reproduced.
This results in shortening the time involved since the demand for reproducing the data over several tracks in raised from the computer 1 until the data is transferred to the computer 1.
In the foregoing, description has been made of the case of setting or olearing the flag in the parameter register of the interface circuit 11 in which are written the track numbers. However, the present invention is not limited to such embodiment. For example, it is also possible that an interruption be caused by the instruction execute section 12b to the host computer lat the time point the flag is cleared although the flag itself cannot be read from the host computer 1.
Error Correction A typical method for correcting the error in the data frame and sub-code will be explained.
Error Correction for Data Frame An algorithm of error correction of the data frame will be explained first by referring to Fig. 16. At step 301, the data contained in the C1 code of each frame are sequentially read from the buffer memory 2 and transmitted to the error correction processor 13. At step 302, the error correction processor calculates the syndrome using the Cl parity codes, ~32~837 and finds the number of the errors based on the syndrome status. It is then checked at step 303 whPther the error is the 2 symbol error. If the result is negative, it is checked at step 304 whether the error is the 1 symbol error. If the result is negative, it is checked at step 305 whether there is no error or the error is the error of 3 or more symbols.
If the error is determined to be the 1-symbol error at step 304, ~he error location is found at step 306 using the syndrome, and the error symbol is corrected. If the error is ~etermined to be the 2 symbol error at step 303, the error location is found at step 307 using the syndrome and the error symbol is corrected. At the next step 308, the flags F1 of the correction flag area of the buffer memory 2 shown in Figs. 11 and 12A are set as indicated in Fig. 12B. In case of no error or of effecting 1-sym~ol or 2~symbol error correction, it is checked at step 309 whether continuing exists between the frame address of the frame and the frame address of the frame immediately before it. In case of discontinuity or in case the error of three or more symbols is found is found at step 3DS so that correction is not possible, the flags Fo~ F1 and F2 are set at the next step 310 as indicated in Fig.12B.
The above steps are repeatedly executed for each frame.
If it is found at step 311 that the processing of all of the ~rames is terminated, decoding of the next C2 series is 132~8~7 performed. The error correction for the sub-frames is performed in the similar manner and in advance of the above described processing of the data frames.
In the error correction for the C2 series, the data of the C2 series interleaved from the buffer memory 2 are read out at step 312 and the syndrome ils calculated at step 313.
The number of errors is then determined from the syndrome status. It is then checked at step 314 whether the error is the 2-symbol error. If the result is negative, it is checked I at step 315 whether the error is the 1-symbol error. If the result is negative, it is checked at step 316 whether there is no error or whether the error is the error of three or more symbols. I~ the error is found to be the1-symbol error at step 315, ~he error location is found at step 317 and the ¦ error symbol is corrected. In more detail, referring to Table 1, when the error location is not coincident with the location of the symbol to which the F2 flag has been afforded in the C1 correction processing, it is checked by the number of the F2 flags whether the correction is to be performed. If the correction is not made, the current state is mainained. In the Table 1, N1 and N2 denote the numbers of the symbols to which the flags F1 and F2 are afforded and that are coincident in locations to the error locations. kl and k2 denote the numbers of the F1 and F2 flags and X means "don't care".
. .. . . . . . . . ..
:. - . - . : :: .: . : "~
~2~.837 Table 2 _ error flag condi~ion ,op~ra~e . __ O _ no correct . __ N2=1 I error correct 1 N2= 0 K25 3 I error correc~
N2= 0 K22~ uncorrcc~
N1= ~ N2= 2 K2= 2 2 ~rror correct Nl = 2 N2=1 K2S 2 2 error correc~
Nl =2 N2= 0 N2= 0 2 error correc~
Nl= 2 N2= 0 KI S4 K2= 1.2 2 error correc~
N1= 2 N2= 0 Kl 25 K2=1.2 uncorrec~
-Nl =1 - Kl 3 K2s2 ~ error correct N1 =1 - Kl ~4 K2~ 2 uncorrect Nl= O K2~ 2 uncorrect Kl = 3 K2= 3 3 erasure corrcct K12 5 K2= 3 (N2=1) 2 erasure &
1 error correc~
Kl 2 5 K2=3 (N2= O) uncorrect Kl=4 K2= 3.4 4 erasure correct K12 5 K224 uncorrect _ 'I ~1 =3 3 era~ure correc~Kl 2 5 K2 =3 (N2= 1) 2 erasure R
i more I error correc~than 3 K] 2 5 K2= 3 (N2=0) uncorrec~
Kl =4 ~ erasure correcL
K12 5 K2 ~3 uncorrecL
Kl S 2 uncorrec~
Nl: number of fla~s corresPonding with ~he error loca~ion - N2: number of flaes corresponding wi~h ~he error loca~ion Kl: number of Pl flag K2: number of ~2 flag x: don't care -When the error is determined to be the 2-symbol error at step 314, the number of the F2 flags is determined at step 318. When the error is the error of 2 or less symbols, the 2-symbol error correction processing is performed at step 132183~
319. When the error is the error of more than two symbols, an erasure correction processinc; as later described is performed. It is determined at step 319 whether the 2-symbol error correction should be performed under the condition shown in Table 2, ~r the data should be left as are without error correction.
~ hen it is determined that thPre exist errc~rs of three or more symbols at stDp 316 or the number of F2 ~lags exceeds two at step 318, it is determined at steps 320 and 321 whether the number of F1 flags is 3 or 4. When it is three, a 3-erasure correction is performed at step 322 and, when it is four, a 4-erasure correction is performed at step 3~3.
When it is determined at steps 320, 321 that the number of F1 flags is neither 3 nor 4, the numbers of F1 and F2 flags are determined at step 324. A 2-erasure correction an~
a t-error correction are performed at step 322 only when the number of F1 flags is not less than 5 and the number of F2 flags is 3.
When the correction is not made in the above procedure, the data are treated as error.
The above steps are repeated for each series and, when it is determined at step 325 that the processing of these series is terminated, the correction is terminated.
At the time of the correction by the C2 parity codes, when it is determined above all that there exist errors of two or more symbol~, an erasure correction routine is performed when the number of F2 flags set for symbols contained in the C2 series exceeds 2, that is, 3 or m~re, and a 2-error correction routine or double error correction is performed when the above number dc>es not exceed two~ It is when the errors of 3 or more sym]bols or burst errors are caused that the F2 flags are set in the course of correction i by the C1 parity codes. However, in a majority of cases, it is the burst errors that are caused, if the symbol error rate . is not higher than 10~3. In this manner, wasteful 2-error I correction routines are not executed on accurrence of the burst errors and the uncorrectable errors otherwise caused during the correction routines may ~e avoided with a significantly improved correction capability for burst errors. The result would be most favorable when the burst error length is 8 to 14 frames.
It will be appreciated from the foregoing description that, in the present embodiment, when it is determined that there are caused errors of a number of symbols larger than the number that may be corrected for errors, such as two - simbols, an erasure correction is or is not executed according as the number of flags indicating that the correction is not possible by the C1 parity codes and that are set for symbols contained in the C2 series exceeds or does not exceed a predetermined number, such that the correction capability for burst errors may be improved significantly.
It is noted that up to double errors can be corrected by the Cl parity codes, while up to quadruple errors can be corrected by the C2 parity codes. In more detail, error correction of _ symbols and/or erasure correction of n symbols are possible with the C2 parity codes, wherein m and n are given by the formula . 2m ~ n ~ d - 1 where the minimum distance between the codes ~-5. In case of 4-symbol errors, the following formulas hold for the syndromes SO, S1, S2 and S3.
SO=e,+eJ+e~+el ... (l) S~ e, + Q ~e~ ~ ~"ek ~ ~'el -- (2) S2= ~y2'el + 1~2~e,~ + a2ltek+ Q.21 e(3) S3= a3~e~ ~ ~s~ a3"ek-~ aSI e I (4) where ei, ek, ek and e~ represent error patterns, represents the root satisfying the irreducible polynominal ~Ix)= on the galois field C~(~M), where, for example, M=8, and i, i~ k and L represent error locations. In case of a 3-symbol error, e =O.~The error locations 1. i and k only are known in the triple erasure correction, while the error locations i and i only are known in the double error , :
- : , : ~ . ,~ . : . . . . . .
- -, ., . - .. ..
., : - .
~32~837 correction plus single error correction.
Solving the simultaneous equations (1) to (4) with respect to the error patterns ei, ej, ek and el, the following equations for the quadruple erasure correction are obtained.
S t (~r~J + a~-k + a~~l)S,t (ty~~ k + ~ k ~ + ~}, J)S~t ~Y S3 el = -( I t K l - J) (~ ) (] t CY I 1 ) (5) Sot (cy k + Q~ + K ~S,t (cr -t cr ~ ~Y )S2t K IS3 J = --' ' (l+ ~ J ~) (lt K ~ t ~ J 1 ) ~- (6) Sot(a ~+~ 1~ )S~(K I I~CY' I J+~Y J l)S~tK I ~ JS3 C 1~
(ltCYk-l) (ltCYk-J) (lt~"-') '" (7) ;
Sot(K~I+K J+a ~)SIt(K I J+K J ~+K )S2t~ S3 e, =
(lt Kl 1) (lt K J) (lt CY
' ''' (O t In case of the triple ~rasure correction or the double erasure correction plus single error correction, the simultaneous equations ~1) to (4) (el=O) are solved with respect to the error patterns ei, ej and ek to give the following equations (9) to (12) wherein, in the double.error correction plus single error correction, ak, that is, the error location, is also found.
~ 32~ 8~7 SIQ'I~+S2(C~I ~ R'J) ~S3 J~ ' (9) ~;OtYI'~ SI(~ S2 So ~ + S I ( Ct' J ~ t S2 e ~ (10) (~ J) (~ ~a~') So cY I tl~ ~t S~ S2 eJ = ---- -- (11) (~ J ~- tr l ) ( CY J ~
SD~ tS~ (1r + R ) ~S2 e~ = -- (12) '. ( Ct' ~ + I y t ) ( cy k ~
_ . .
In this manner, in the cases of qadruple erasure correction, triple error correction and double error correction plus single error correction, the arithmetic operations by separate equations are usually carried out, with an increased program volume and time involved in the arithmetic operations.
Thus the quadruple erasure correction and triple erasure correction (or double erasure correction plus single error correction) are carried out using the common terms for the two sets of equations, that is, the set of equations ~5) to ~) for finding the quadruple error patterns and the set of equations ~9) to ~12) for finding the triple error patterns, instead of carrying out separate arithmetic operations using ... . . . . ... . .
~l32~837 these sets of equations. In the present embodiment, thPse common terms are expressed by the following equations.
A = ~ -- t13) B= ~l~ ~J (14) C=S,A ~ S2B t S3 -- (15) D=SoA~ Sl~ ~S2 (16) Using these equations (13) to (16) for the above common terms, the equations (15) to (18) for finding the quadruple error patterns may be expressed ~y the following formulas j~17) to (19):
I) ~y k 1, C
! (A+B ~~ + ~x) (17) D ~I+C
e k = ~ ''' t]8) tA1'BCY~-~2h) tc~'~+ ~
SO~SI~(~I+ ~)ek+(~+ ~')e I e~ = B -- (19) _ e, -- SD ~ Cl ~- Ck '~ eJ -- (20) Using the same ecluations (13) to (16~, the equations ~9) to (12) for fincling the triple error patterns may be expressed by the following formulas (21) to (24):
D ~ (21) e k = -- ''' (22) (~r~ + tY~) (~J ~ CYI() S O ~Y t S, 1 ( ~ -I cr ) ~ k e~ (22) B
el = S0 ~ e~ ~-eJ (2~) ' The above common terms are found in advance and substituted into the equations ~17) to ~20) to find the error patterns ei, e~, ek and el in ths case of the quadruple error correction and into the equations ~2~) to (24) to find the error patterns ei, ej and ek in the case of the triple erasure correction and double error correction plus single error correction. It is noted that ~ k is to be found only in the case of the duoble erasure correction plus single error correction.
In this manner, when carrying out the arithmetic operations for error correction and/or erasure correction of different numbers of symbols, those portions common to these operations are computed in advance for reducing the program ~L32~837 volume for the arithmetic operations and shorte~ing the computing time.
The methods of deriving the equations (17) to ~20) for finding the ~uadruple error patterns and the equations (21) to (24) for finding the triple ~rror patterns will be hereafter explained. First, the equations for finding the quadruple error patterns are derivecl in the followins manner.
By multiplying denominators and the numerators of the equations (8~ and (?) by ~ i+;+k and ~ i+j+l, respectively, the following equations, we obtain ' kS 1 ( ~ Jt ~ k~ ) s l t ( Q~ l + h~ t cr ) SZt S3 ~ I =
(~1 + ~ + aJ) (~1 ~ ~k) 'SO~ ( ~ t ~ J) S I t S2~ ~ t ~ ~ JS, t ~ ~ t ~ J) S2t S3) ¦~x"Jt (~ J) R~ + ~21) (cr~ + k k) (~5) ~ "SCt(~'-~t~J"t~'-l)S,t(~'t~Jt~')S2tS~
e~
(~+~1) (~k+~-) (a~+~) JsOt(~taJ)c`~ts2) R'lt l~-JS~t(tY~tct~J)s2ts3) _ _ J ) ~ )1 + ~ 2 k ) ( Q~ k ~ cy t ) -- (20 By introducinq the above equations (13) to (16) for the : : : . . , . :
.. . ,., ~
above common terms, the equation (17) and (18) are obtained from the above equations (25) and 1;'6). Also, by finding the equation (1)x ~ plus equation (2), the following e~uations.
~'SOtS,=(a't~')e~t(~lt~)e~t(~'t~l)eL (27) cr ~Sol S I t ( ~ ) ek~ ) el ..e, = (28) ~ ' + ~ ' - are obtained. ~u introducing the equation (14), the equation (19) may be obtained from the equation (28). Also the equation (20) may be obtained from the equation (1).
IThe equation for finding the triple error patterns are ¦derived in the ~ollowing manner. The equation (21) and (22) may be obtained by introducing the abova equations (13) to (16) for the common terms into the equations t9) and (12).
Also, by setting ei=0 in the equation ~28), we obtain ~ JSDtS,t (~'~ ~")eK
e 3 = ~ 9) ~ ' + c~ ' so that, by introducing the eguation (14), the equation ~23) may be obtained from the equation (29). The equation (24) may be obtained by setting el=0 in the equation (t).
It will be appreciated from above that, according to the error correcti~on and decoding method of the present invention, those portions common to the arithmetic operations for the error correction and/or erasure correction with 132:1837 different numbers of symbols are computed in advance, such that the program volume and the computing time necessary for those arithmetic operations may be reduced.
Error Correction for Sub-Codes The error correction for the sub-codes is performed separately from the err~r correction for the coding data, and before or after the correction for the coding data or after the C1 correction of the coding data. In the error correction for the sub-codes, decoding is performed at ~tep 401 from the last sub-code Sc3 in the reproducing sequence.
It is then checked at step 402 whether the decoding is possible. If the decoding i5 possible, the decoding data of the sub-code Sc3 is transmitted to the host computer 1 at step 403 to terminate the decoding. If the decoding is not possible, decoding for the sub-code Ss2 is carried out at step 404. The error correction for the sub-codes by the parity codes is carried out in the same manner as in the C1 correction described above. Thus, up to double errors can be corrected and decoding is possible if the number of errors is two or less symbols.
When the step 404 is executed, it is then checked at step 405 whetherdecoding of the sub-code Sc2 at step 904 was possible. If the decoding was possible, the decoding data for the sub-code Sc2 are transmitted to the host computer 1 at step 406 to terminate the decoding. When the decoding was .. : . , . . :
-~
- : : . ;~ : . :
~321837 not possible, decoding of the sub-code sc1 is carried out at st2p 407.
When the step 407 was executed, it is then checked at step 408 whether decoding for the sub-code sc1 at step 407 was possible. When the decoding was possible, the decoding data for the sub-code SC1 are transmitted to the host computer 1 at step 409 to terminate the decoding. When the decoding was not possible, decoding for the sub-code ScO is carried out at step 410.
~ hen the step 410 was executed, it is then c~ecked at ~tep 411 whether the decoding for the sub-code ScO ~t step 410 was possible. If the decoding was possible, the decoding data for the sub-code ScO are transmitted to the host computer 1 at step 412 to terminate the decoding. If the decoding was not possible, the information that none of the su~-codes ScO to Sc3 could be decode is transmitted to the host computer 1 at step 413 to terminate the decoding.
In the present embodiment, decoding is performed by the reverse of the reproducing procedure and thus starting àt the sub-code Sc3~ This sub-code Sc3 is less prone to burst errors than the first sub-code ScO that is to be decoded on starting the reproducing operation, the possibility is low that the decoding become impossible to perform at the outset of the decoding olpèration, so that the decoding data for the sub-codes may be obtained in a shorter time. In addition, ~32~837 the sub-code Sc3 less prone to burst errors is less subject to mistaken correction so that the operating reliability is also improved.
Alternatively, the decoding may be started at the sub-code Sc, or the sub-code Sc2.
Accordinq to the present embodiment, on reception of a data block containing a plurality of the same repeatedly transmitted encoded data, a decoding operation including the error correction is carried out starting at the data other than the data received first, and hence less prone to burst errors. Thereofre, the possibility is low that the decoding ----becomes impossible to perform at the outset of the decoding operation, such that the decoding data may be obtained in a shorter time. In addition there is less likelihood that the mistaken cDrrection may take plae at the time of decoding so that t he operational reliability is similarly improved.
CoPY Protect Code The method of utilizing the copy protect codes will be explained. The host computer 1 reads the copy protect code CPl previously read from the disk 5 and written into the buffer memory 2, and compares the code with the copy protect code CP1 which the host computer 1 itself ~tores in the internal ROM. If the read data are of the original disk, the two copy protect codes CP1 coincide and the ~egular operational sequence may be executed with the aid of the .
. . : ..
1321~37 softwàre that is transferred to the host computer 1.
Meanwhile, when copying the software o~ the host computer 1 on another disk, the controller 12 operates in such a manner that the dummy copy protect code in the host computer 1, such as the CP2, is written in place of the authenic copy protect code CP1. In the software of the thus copied disk, only the copy protect code is exchanged to CP2.
When reading and operating the thus copied disk, the copy protect code of the buffer memory 2 is CP2 but not the copy protect code CP1 of the host c~mputer 1. Thus the host computer 1 senses that the copy disk has been illicitly copied and accordingly may inhibit its usual operation.
In the above arrangment, the copy disk cannot be r~produced or operated in the usual manner. However, when it .
is assumed that the copy protect code CP1 written in the buffer memory 2 when reading the original disk is noted, and that the copy protect code CP2 on the buffer memory 2 is changed by an operation from outside to CP1 when reading the data from the copy disk next time, it would become possible to execute the so~tware of the buffer memory 2 when accessing the copy protect code from the host computer 1, despite the fact that the disk is the copy disk, since CP1 exists at this time. It is possible to rewrite or change the data on inserting a jig for rewriting the memory contents into a bus disposed between the buffer memory 2 and the disk control ~321837 unit 10 which is mounted outside the buffer memory 2.
Thus a register is provided in the disk control unit 10 designed as one-chip IC. This reclister may be of a ~maller capacity only sufficient to store the copy protect data transiently. The controller 12 is aware of the data strings or addresses such that, when control is at the copy protect code, the controller inhibits data output to the buffer memory 2 and causes data writing in the register. The data transfer from the buffer 2 into the host computer 1 may take place in the usual manner. In execùtion, when the host compu~er intends to have the copy protect code, the controller 12 returns the copy protect code of the register.
Thus the operation of the disk is the ~ame as before, if the disk is the original one.
Upon reading the copy disk, data are written into the buffer memory 2, while the copy protect code CP2 is written in the register. This copy protect code CP2 is stored in the one-chip disk control unit 10 and hence cannot be rewritten or changed from cutside. Although the copy protect data may be stolen by way of the bus disposed between the host computer 1 and the disk control unit 10, the copy disk cannot be executed or reproduced, since it is impossible to rewrite or change the copy protect code written in the register.
This invention relates to a data processing apparatus and a method used therein for correcting data errors.
In a variety of data processing apparatus, such as personal computers or word proc:essors, the disk-shaped recording medium, such as the floppy disk, is widely used as the external storage medium.
The data writing and reading in the disk apparatus is I usually so performed that the host computer issues a series of control instructions to the disk for sequentially actuating a variety of functional blocks such as rotary drive means or data processing means and the computer operation is performed sequentially in such a manner that, after the end of a predetermined control operation is ascertained, the computer proceeds to the next control operation.
In the conventional floppy disk apparatus, it is therefore up to the host computer to control the operation of the disk apparatus since the start until the end of data recording and reproduction. Thus a major portion of the j processing capacity of the host computer is dedicated to controlling the disk operation such that the processing - efficiency of the host computer is lowered considerably.
On the other hand, when correcting the errors of the data recorded with error correction codes, flags are employed in the error correction or parity codes in the conventional triple erasure correcting routine in such a manner that, although the state of error correction is generally satisfactorily for random errors, the risk is high that a double error correction routine is executed on occurrence of burst errors, such that, when the 3-symbol error, for example, is taken for a 2-symbol error, the possibility is high that the correction is not feasible and the errors remain uncorrected.
OBJECT AND SUMMARY OF THE INVENTION
It is a general object of the present invention to provide a data processing apparatus free of the above problems and a method employed therein for correcting data err~rs.
It is a principal specific object of the present invention to provide a novel data processing apparatus wherein control dependency on the host computer may be l~wered through an external control with the aid of a simpler program and wherein the data recording/reproduction may be performed efficient without lowering the pr~cessing efficiency of the host computer.
It is another specific object of the present invention to provide an error correction method wherein the error correction capability for the burst errors may be improved.
Figs. 1 to 4 are diagrammatic views showing data formats 132~837 employed in the disk data recording/reproducing to which the present invention is applied.
Figs. 5A and ~B are diagrammatic views showing sub-code data formats composed of the sub-data having the formats shown in Figs. 3 and 4.
Pig. 6 is a diayrammatic view showing the arrangement of the error correction codes having the format shown in Fig. 4.
Fig. 7 is a block diagram showing the disk data recording/reproducing apparatus to which the present invention is applied.
Fig. 8 is a block diagram showing the connection between the host computer and the interface circuit.
Fig. 9 is a block diagram showing the reset register and the circuit in its vicinity.
Fig. 10 is a block diagram showing the memory control unit shown in Fig. 7.
Fig. 11 is a diagrammatic view showin~ a memory map of the buffer memory shown in Fig. 7.
Figs. 12A and 12B are diagrammatic views for understanding the read correction flag area on the memory map shown in Fig. 11.
Fig. 13A and 13B are flow charts showing the operation of the disk data recording/reproducing apparatus.
Fig. 14 is a diagrammatic view showing the buffer memory having on increas~ed capacity.
1321~37 Figure 15 is a flow chart showing a modification of the operation of the disk data recording/reproducing apparatus.
Figure 16 is a flow chart showiDg an example of application of the error correction algorithm of the present invention to the correction of the coding data.
Figure 17 is a flow chart sho~ving an example of application of the error correction algorithm of the present invention to the correction of the sub-codes.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
Before proceeding to description of the disk data recording/reproducing apparatus to which the data processing apparatus and the error correcting method according to the present invention are applied, the data formats employed therein with be explained by referring to Figures 1 to 6. However, those formats not pertinent directly to the present invention are not explained for simplicity.
First, the data format for the floppy disk will be explained.
!
~rack Format :
Figure 1 shows a track format. Each track is formed by an index and four sectors #0 to #3. Thus, from the start position on, each track is constituted by a gap 0 (pre-index gap), index, gap 1 (post-index gap), section #0, gap 2 (sector gap), sector #1, gap 2 (sector gap), sector #2, gap 2 (sector gap), sector #3, and a gap 3 (the last gap). The index - isa ~3~1837 continuous Tmax signal. It is noted that one frame (F) is c~mposed of 44 bytes ~B), in this ordr, with each byte including 10 channel bits.
PG denotes a rotational phase detection signal that is produced upon rotation of a spindle motor adapted for rotationally driving the floppy disk. The signal is correlated with the index.
Sector Format Fig. 2 shows a sector format. Each sector is formed by a preamble data "2BH", a sync frame, sub- rame, coding data (data frames O to 127 through n, and a post-amble data "2BH", in this order, and has a length of 5765 bytes.
Sub-frame Format Fig. 3 shows a sub-frame format. Each sub-frame is formed by sync data, sub-data, frame address, parity codes for the sub-data and address, mode data, track number, sector number (#0, ~1, #2 or ~3), head number, copy protection code, reserve area and parity codes (4 symbols~ for data following the frame address and mode data, in this order, and has a length of 44 bytes.
Data Frame Format Fig. 4 shows a data frame format. Each data frame is formed by sync data, sub-data, frame address, parity codes for sub-data and address, coding data (32 symbols), C2 and C1 parity codes (each 4 symbols) as later described, in this .: : ~ . , , ... : .
order, and has a length of 44 bytes.
Sub-Code Format The sub-code is formed as a sub-code assembly formed by 128 bytes each being the 1-byte sub-data of the data frame shown in Fig. 4A and each being cc~llected from each of the 128 data frames for one sector, as shown in Fig. 5A. It is constituted by the sub-codes #0, ~1, #2 and #3. As shown in Fig. 5B, each sub-code is formed by a mode data, track number, sector number, head number, copy protection code, reserve area and parity codes (4 symbols) for the a~ove data, in this order, and has a length of 32 bytes.
Data Frame Error Correction Code Format The C2 and C1 parity codies of the above described data frame will be explained by referring to Fig. 6, wherein, among the data constituting one sector, the data frames taking part in the formation of the C2 and C1 parity codes and the sub-frame ta~ing part in the formation of ~he C1 parity code, are shown. The C2 parity codes are constituted by plural symbols of the C2 series or the coding data o~tained on interleaving from a large number of symbols arranged in a matrix in a direction extending from the upper left towards the lower right in the figure. The C1 parity rodes are constituted by plural symbols of the ~1 series extending vertically from the upper side towards the lower side in the figure, that i5, the frame address, coding data -: : -i . ~ , . .:, .
:~ -: ,, - . . . . .. ..
132~837 and the C2 parity codes. ~or these Cl and C2 parity codes, the Reed-Solomon codes, for example, are employed.
DisX Data Recordinq/Reproducinq AP~)aratus The apparatus for recording and/or reproducing the data having the above described data formats on or from the disk will be explained by referring to ~ig. 7.
The data to be recorded are supplied from a host computer 1 to a buffer memory 2 by way of an interface '1 circuit 11 and a disk controller 12 within a disk control ~ection 10. An S-RAM having the storage capacity of the order of 8 k bytes for each sector, for example, is employed as the buffer memory 2. The data written into the buffer I memory 2 are subjected to an encoding processing shown in Fig. 6, that is, the formation and annexation of the C2 and C1 parity codes, by an error correction processor 13 having the encoding and decoding functions. The encoded output from thP buffer memory 2 is supplied to a modulating circuit 14, where it is subjected to a processing such as 8/10 conversion, before it is supplied to a magnetic head 4 via i recording/reproducing circuit 3 so as to be recorded on a floppy disk ~. The floppy disk is driven rotationally at ~ 3600 rpm, for example, by a spindle motor 7 controlled by a microcomputer 6 adapted to control the mechanical system.
The movement of the magnetic head 4 is also controlled by the microcomputer 6. A serial/parallel interface 15 is provided - . ~ ~ ., ; :-... .
~321837 between the microcomputer 6 and the disk controller 12 toeffect serial communication. It will be noted that the recording/reproducing circuit 3 also has the function as an erasure circuit.
The data read-out by the magnetic head 4 from the floppy disk 5 is supplied via recording/reproducing circuit 3 to a demodulating circuit 16. These data are subjected to a processing including 10/B conversion in the demodulating circuit 16 after which they are sent to and written in the buffer memory 2. The one-sector data written in the buffer ¦ memory 2 are subjected to a predetermined decoding, such as error correction by the C1 and C2 parity codes and removal of redundancy bits, before they are supplied via disk controller 12 and interface circuit 11 to the host computer 1.
The disk controller 12 is constituted by a microprogram control section 12a and an instruction command section 12b.
The microprogram control section 12a interpres or construes simple instructions supplied from the host computer 1 via interface circuit 11 to supply the micro-codes to the instruction execute section 12b for controlling a series of write/read control operations.
-- The control data formed in the disk controller 12 is supplied via internal bus to a memory management unit 17.
The disk control section 10, including the interface circuit 11, disk controller 12, an error correction processor . .: , . . ~ . , .......... .. . . .... :: .,, ,: :
::: :: . : - : . : . . . : :
- . :.
132183~
13, demodulating circuit 16, memory management unit 17 and the serial/parallel interface 15, may be constituted by, for example, a one-chip LSI(large-scale integrated circuit).
Interface Circuit In the present embudiment, the interface circuit 11 is provided with five kinds ~f registers for interfacing between the control decoder 20 and the host computer 1, namely a 1-; byte reset register 21, 1-byte status register 22, 1-byte , command register 23, 4-byte parameter register 24 and a 1-¦ byte data register 25.
¦ These five kinds of registers are selected at a control ¦ decoder 20 by 6-bit data, that is, address bits Ao~ A
supplied from the host computer 1, read command bit RD, write command bit WR, chip select bit CS obtained upon dec~ding the I adress at the decoder 1a and a DMA acknowledge bit DACK,as shown in Table 1.
Table 1: Operating State of Interface Circuit _ ._ l DACX CS A1 Ao RD WR Operating State . .
1 0 1 1 1 0 rest system 1 0 0 0 0 1 read status register 1 0 0 0 1 0 write command register 1 0 0 1 0 1 read parameter register 1 0 0 1 1 0 write parameter register 1 0 1 0 0 1 program reading of data 1 0 1 0 . 1 0 program writing of data 0 1 - - 0 1 DMA reading of data 0 1 - - 1 0 DMA writing of data Reset Re~ister .. : , .. . -- , -.: - ~ : --. : -. : . : . . .
:L32~837 Reset command data for initializing the floppy disk apparatus and calibratin~ the drive are supplied to the reset register 21. When the reset command is supplied to the reset register 21, the operation of thle spindle motor 27 ceases immediately in the floppy disk and the magnetic head 4 is returned to its home position.
As shown diagrammatically in Fig. 9, the interface circuit 11 is designed and constructed in such a manner that the 8-bit reset dat~ D7, D6, D5, D4, D3, D2, D1 and Do supplied from the host computer 1 via data bus are written in the reset register 21 by write pulses from the host computer 1. It is composed of a reset pulse generator 26 adapted to form reset pulses on the basis of the write pulses and gates 27, 28 for selectively outputting the reset pulses generated in the reset pulse generator 25 responsive to the reset data D7 to Do spplied to the reset register 21. In the present embodiment, the least significant bit Do and the second lower ~it D1 of the aforementioned 8-~it reset data D7 to DO are used as the reset flag for the m~croprogram control section 12a shown in Fig. 7 and as the reset flag for the microcomputer 6 of the mechanical deck system controller, also shown in Fig. 7, respectively, for separately resetting the microprogram control section 12 and the micro computer 6 of the mechanical deck system controller.
During the time the microprogram ccntrol section 12a is .,.- .-. , :
:. . : .~: . , :. , .. , : .. -~ , . :,.. .. .
1~2~837 performing a series of the above described control cperations for the floppy disk 10, the host computer 1 monitors the contents of the status register 22 or the parameter register 24 r in such a manner that, upon detection of an erroneous or mistaken operation, reset data are supplied to the reset register 21 of the interface circuit 11 for individually resettiny the microprogram control section 12 or the microcomputer 6 of the mechanical deck system controller.
By this resettinq operation, the floppy disk apparatus 10 may take proper measures in connection the mistaken operation or initialize the microcomputer 6 of the mechanical deck system controller for efficient data recording and reproduction to and from the disk 5 during the time the micropr~gram control section 12 alone is performing the processing operation.
! Although the microprogram control section 12 and the microcomputer 6 of the mechanical deck system controller are reset separately in the above embodiment, the number or the function of the devices to be reset may be correcpondingly increased by a number of bits of the reset register 21. ;~-Thus, in accordance with the present invention, recording and/or reproducing means for recording and/or reproducing data to and from the recording medium such as the disk can be externally controlled by microprogram control means by a simple program. In addition, the recording and/or reproducing means and the microprogram control means can be . -132~837 separately reset based on reset data supplied from the host computer to the register, so that the reset operation can be performed promptly and efficiently and the control dependency rate on the host computer is lowered for efficient data recording and reproduction without lowering the processing efficiency of the host computer.
Status Reqister The status register 22 indicates the statuses of the floppy disk by 8 bits. The status infDrmation is transmitted to the host computer 1.
In the status register 22, the most significant D7 bit or D7 (non-DMA data request) flag is used for hand-shaking in case of data transfer between the register and the external system, that is, the host computer 1, as shown in Fig. 8.
This D7 or non-DMA data request flag becomes "1" each time i data transfer is enabled, becomes "O" during data transfer and again becomes "1" on completion of a 1-byte data, such that it is repeàtedly inverted between the states "1" and "O"
until a predetermined number of times of transfer is reached.
The next bit D6 or D6 (no media) flag indicates the state of attachment of the floppy disk 5, thus becoming "1" when the floppy disk 5 is not attached or when the floppy disk S is pulled out during the attachment operation by actuation of an eject button. The next bit D5 or media change flag indicates the possibility of the floppy disk 5 having been changed, - . . ,: ~
132~837 thus becoming "1" when the resetting is made, when the floppy disk 5 once ejected is not as yet attached or when the disk 5 is pulled out during the disX attachment operation by actuation of the eject button. The D5 bit or the media change flag reverts to "O" when the data is read correctly from the floppy disk 5. The next D4 bit or write protect flag indicates the write inhibit state to the floppy disk 5.
Thus, when no floppy disk 5 is inserted or a floppy disk 5 to which writing is inhibited is inserted, the flag becomes "1"
and, when the floppy disk 5 on which writing can be made is inserted, it becomes "O". The next D3 bit or D3 (ECC error ~MSB)) flag and the D2 bit or D2 (Ecc error (LSB)) flag indicate in two bits in four status values what error has taken place in the course of the error detection and correction carried out automatically at the error correcting section 13 with the progress in the reading operation.
~ hus, in the course of decoding (correcting) with the two series C1 and C2, the bits become "00" when neither the correction routine by the~ C1 parity nor the correction routine by the C2 parity has been executed, that is, when no error has been caused. The bits become "01", "10" and "11"
when only the correction routine by the C1 parity code is executed, when the correction routine by the C2 parity code is also executed and when the correction is not possible, respectively.
~321~37 Thus, in the case of the cross interleave Reed Solomon code (CIRC) with a distance of 5, for example, the bits become "00" when no error has been caused, while they become "01" when the number of symbol errors is not more than two per frame, since the correction can then be made only by the C1 parity code. When the number oE symbol errors is not less than three per frame, the bits become "10" since the correction routine by the C2 parity is executed. When the number of symbol errors per frame is not less than three and not less than three symbol errors exist in ~he C2 series, or the erasure correction is not possible, the bits become "11".
The values of the D3 and D2 flags are effective at the time when the one-sector processing is completed and represent the error status of the sector.
The next D1 bit or the D1 ~drive error) flag indicates the mistaken drive operation. Thus, when the drive function is not executed correctly, it becomes "1" and is maintained in the "1" state until the read/write/erase operation is executed correctly next time or until the above reset command is received. The least significant Do bit or the Do (command busy) flag indicates the state of execution of the commands other than the above reset command. Thus it becomes "1"
during execution and practicity of the commands other than the above reset command and reverts to "O" with the end of processing.
~32~37 It this manner, the drive state and the state of deterioration of the floppy disk 5 as the recording medium can be grasped at the host computer 1 in dependence upon the contents of the status rPgister 22. Also, when the symbol error rate of the floppy disk 5 of the order of 10-3 is guaranteed, the kind of the error can be roughly identified from the bits, i.e. the error can be assumed to be a random error when the bits are "01" and a burst error (correctable) when the bits are "10", respectively, since it is presumably when the burst error exists that the correction routine by the C2 parity is performed.
Command Reqister All the command data for controlling the floppy disk apparatus are afforded to the command register 23 such that the respective basic functions are enabled when the corresponding bits are set to "1". The microprogram controller 12 interpres or construes the contents of the 1-byte command data afforded to the command register 23 at the host computer-l to c~use the instruction execute ~section 12b to carry out the data erasure, recording or reproduction automatically and at a prescribed order.
Referring to Fig. 8, drive designate commands tunit select 1, unit select 2~ are afforded to the upper D7 and D6 bits of the command register 23. Up to four at the maximum of the drive designations can be made by the above 2-bit . . ; . ~ . : . ;
132:1 83~
drive designation commands (unit select 1, unit select 2).
An execution inhibit command is afforded to the next D5 bit.
Setting the D5 bit to "0" invalidates the function specified or commanded at the lower D4 to Do bits. Whenthe processing accompanied by execution is carried out, the D5 bit is set to "1". The comand (Mon: Motor On) for commanding the on-state of the spindle motor 7 is affo:rded to the D4 bit. The spindle motor 7 is driven into rotation when the D4 bit is set to "1". The spindle motor 7 is halted after a predetermined time when the D4 bit is set to "0". 'When the spindle motor ~ starts its rotation, the magnetic head 4 is moved from its home position towards the outer periphery and, when the spindle motor 7 is halted, the magnetic head reverts to the home position from its current position. It is noted that the D4 bit need not be set to "t" for each ordinary read/write/erase operation, and the microproyram control section 12 is so designed and arranged that the rotation of the spindle motor 7 is automatically started with the read/write/erase operation even if the D~`bit is "0" and that the motor 7 is halted after the lapse of a certain predetermined time since the end of processing. The data ~ransfer command is supplied at the next D3 bit. With the D3 bit set to "1", data transmission and reception may occur between the floppy disk apparatus and the host computer 1.
The above dat~ transmission and reception occurs by 132~37 sequential transfer to the buffer memory 2 via data register.
In this case, one of 4 k bytes, 512 bytes or 256 bytes may be selected as the number of the triansferred data, while the address in each 4 k-byte address can be specified or designated. It is noted that the buffer memory 12 may be used as a transient bank memory for the host computer 1 without dependency on the operation of the floppy disk device. It may be accessed not only by the physical sector units of 4 k ~yt~s but by the logical sector units of 512 and i 256 bytes. The erasure command IER: erase) is afforded to i the next D2 ~it. With the D2 bit set to "1", erasure can be effected with the physical sector unit selected at the parameter register 24. The write command (WR: write) is afforded to the next D1 bit. With the D1 bit set to "1", ` writinq can be effected at the physical sector unit specified ! at the parameter register 24. Index signals are recorded when the index is specified at the parameter register 24.
Under the write command WR, the microprogram control section 12a performs a processiny in accoraance with a predetermined sequence for writing the data in the floppy disk ~. Thus the parity data/sub-code datatheader information for error correction is generated automatically in the error correction processor 13 and outputted sequentially in accordance with a predetermined format. Under the write command WR, a series of data transfer/erase/write operations can be executed, and " . , ,. ~ . ~ ,, , !,, .
:L321837 the microprogram control section 12 performs an automatic processing in accordance with a predetermined sequence. The read command (RD: read) is afforded to the next Do bit. With the Do bit set to "1", reading is performed with the physical sector unit designated at the parameter register 24. Index designation at the parameter register 24 is ineffective and re ults in a drive error in a ~tatus register 22. Vnder the read command (RD), the program control secton 12a performs a processing in accordance with a predetermined sequence for reading data from the floppy disk 5 and, at the s~ame time that the signals are read from the floppy disk 5, causes the error correction processor 13 to perform mistaken data detection/correction on the data read into the buffer memory 2 is accordance with the predetermined format. The transfer of data reproduced from the floppy disk S to the buffer memory 12 and the transfer of data from the buffer memory 12 to the host computer 1 are feasible under the above read command (RD), and are automatically effected by the microprogram control section `12 in accordance with a predetermined sequence. When the reading is completed in a regular manner, the reproduced track/sector number is written -into the parameter register 24.
Parameter Reqister The parameter data for designating the writing of the index signals, erasure of the track units and the . ............... : - ~
.. ... , . :.,, - : :
. :: , .: : , .. - .: .
., , ~ , . : . .: . .:
~32~
track/sector number when the reading/writing/erasure is performed by the physical sector units or on the physical sector basis are afforded to the parameter register 24. This parameter register 24 is composed ~Eor example of 4 bytes. A
register pointer, not shown, is advanced each time one byte is read or written, and reverts t~D the first byte when the accessing is continued further after completion of the reading of the last byte, herein the fourth byte, or after completion of the writing of the second byte. It is noted that the pointer reverts to the first byte at the time when accessiny to the register other than the parameter register 24 is performed to initialize the reception sequence of the parameter register 24.
The first byte of the parameter register 24 is used as the physical sector address accompanied by the reading/writing~erasure operation and as a sector register 24a for track erasure designation, index writing designation, logical sector size select designation and virtual logical sector address designation to- effect-the ~ata transfer between the buffer memory 2 and the host computer 1. The sector register 24a designates selectively the three kinds of the logical sector size at the upper side bits D7 and D6 while designating the index writing and erasure of one track in its entirety (1, 1.). When the write/erase combinational command is afforcled to the command register 23, with the upper two bits D7 and D6 f the sector register 24a being set to (l, 1~, the microprogram control section 12a causes the index signals to be written after erasure of the track in its entirety. With the index signa]s thus written into the floppy disk 5, the floppy disk 5 may then be accessed by physical sector units. The next two bits D5 and D4 designate the 4 k-byte physical sector address and assume ef~ective values when the reading operation is carried out as normally.
These bits can be colla~ed as the occasion may require with the physical sector address designated at the host~computer 1. The lower side four bits D3, D2, D1 and Do designate the logical sector address of the 512 byte units.
The second byte of the parameter register 24 is sued as the track register 24 b for designatiny the track number.
When the reading is performed in a regular manner, the lower seven bi~s of the track register 24 b become effective as the track number, and can be collated as the occasion may require with the track -address designated at the host computer l. The 2-~yte copy p~otection code ~PC is afforded to two registers 24c, 24d at the third and fourth bytes of the parameter register 24.
Data_Reqister The data register 25 is used for data transfer between the floppy disk and the host computer 1. Both the program and the DMA are transferred through thin register 25.
:~3~:3 8~7 Memorv Manaqement Unit The memory management unit 17 responsible for address management of the buffer memory 2 and h~ving the configuration as shown in Fig. 10 is able not only to read or write data on the sector basis in the aforementioned recordinq or reproducing mode, but also to read or write any desired number of data other than the number of one-sector unit data of 4096 bytes or the number of unit data prescribed by the operating.system (OS) of the host computer 1, from and to desired addresses of the buffer memory 2, by way of transferring data between the buffer memory 2 and the host computer 1.
The memory management unit 17 is composed of a start address register 30 for previously storing data indicating I the access start address when an access is had to the buffer memory 2 from the host computer 1 to effect data transfer to write or read data, that is, the transfer start address data, a data number reqister 31 for previously storing the number of the transferred data, a memory address counter 32 for presetting the transfer start address data stored in the start address register 30, a data number counter 33 for presetting data concerning the number of the data stored in the data number register 31, and A control circuit..34 for preset and count control of the memory address counter 32 and the data number counter 33. The unit 17 performs the memory : ,~
.:, . . : ~ - . .~ ' ~32~l83~
control of the buffer memory 2 in the~Eollowinq manner.
When accessing the buffer memory 2 ~Erom the host computer 1 to effect data transfer to write or read data, the memory management unit 17 is previously supplied with data indicating the transfer start address data and the number of the tran~ferred data from the host: computer 1. The unit 17 also has transfer start address data and data number data stored in the start address register 30 and the data number register 31, respecively. Before starting data transfer, the control circuit 34 causes the tr~nsfer start address data and the data indicating the transferred data to be preset in the memory address counter 32 and in the data number counter 33 and accesses to the buffer memory from the address indicated in the transfer start address data preset in the memory address counter. The data transfer is then started. Each time one-byte data transfer is completed, the control circuit 34 causes count pulses to be supplied to the memory address counter 32 and the data number counter 33 to increment the memory address counter 32 while simultaneously decrementing the data number counter 33. Thus the data is transferred until the value of the data number counter 33 is reduced to zero, that is, a number of data equal to the value preset in the data number reqister 31 is transferred, before the data transfer is term~nated.
Thus the buf;Eer memory 2 may be accessed from the host 132~37 computer 1 from a given address to another given address to write or read a desired number of data, so that, when transferring a number of data other than the number equal to a number raised to the powers of 2 or an integral number of time thereof, any wasteful access time to the buffer memory may be eliminated to improve the dalta transfer efficiency.
Buffer MemorY Map Referring to Fig. 11, each sector of the buffer memory 2 has a capacity of 8 k(8192) bytes, ~f which 6 k(6144) bytes represent a usable area. The area ~hown by hatched lines is not pertinent directly to the present invention and therefore the related description is omitted for simplicity. The 128-frame or one-sector coding data is written in the left half 32x128 byte portion in the figure. The C2 and C1 parity codes are written in the 4xl28 byte area adjacent to the area where the coding data are written. The Cl correction flags dependent on the results of the error correction decoding by the Cl parity codes and the read flag indicating the data write time ar-e written in the 1x128 byte area at the right-hand side of the figure. The read flags and the Cl c~rrection flags are set for each frame, with the read and C1 correction flags ~or each frame being written in the same 8-bit byte. The frame address is written in the 1x128 byte area adjacent to this area. The sub-codes ScO to Sc3 havin~
the same contents as described above are written in the lx128 ,. . :.. - .. .... . - .
132183~
byte area adjacent to the area where the frame address is written. In the figure, the upper 4-byte area of the 1x128 byte area adjacent to this area is reserved for the correction flags by the parity codes of the sub-codes, while the lower 7-byte area is used as the internal register for the ECC processor 13.
The read flags and the C1 correction flags will be described in detail. As shown to an enlarged scale in Fig.
12A, the reading flags and the C1 correction ~lags for each frame are written in the 1-~yte or 8- bit area in the buffer memory 11. The upper five bits D3 to D7 and the three bits Do to D2 represent the area for the read flags and the area for the C1 correction flags, respectively. As shown in Fig.
12B, when the data are written into the bu~er memory 2, all the bits are "1". When the error correction and decoding is performed by the C1 parity codes, the upper 5-bits for reading flags are all "O", while the lower 3 bits for C1 correction flags are "1" or "O" depending upon the results of correction and decoding. ~hus they are "ODO" when there is no error, "O01"-when one error is to be corrected, "011" when errors are to be corrected and "111" when thf~ correction is impossible. In other words, a flag is set at Fo bit in case of one error correction, flags are set at Fo and F1 bits in case of two error correction, and flags are set at the three bits Fol F1 and F2 in case the correction is not possible.
.t321837 It is noted that the above C1 correction flag is intended for error correction by the C2 parity codes as later described.
In this manner, the memory area fore the reading flags and that for the C1 correction flags are provided in one and the same byte so that only one byte suffices for the flag area for each frame. Since the upper five bits for the reading flags are all "0", that is, reset automatically, at the time of error correction by the C1 parity c~des, it ~ecomes unnecessary to reset the reading flag again for reproducing the next sector.
These flag states are transferred as the occasion may require to the aforementioned status register 22.
OPeration of the Disk Data Recordinq/Reproducinq Apparatus The operation of the above described disk data recording/reproducing apparatus will now be explained by referring to the flow chart of ~igs. 13A and ~3B.
It is first determined at step 101 whether "1" has been set at the D4 (Mon) bit, D2(ER) bit, D1(WR) bit or Do(RD) bit of the-command register by command data supplied from the host computer1 to the command register 23. If the result is affirmative, it is determined at step 102 whether the floppy disk 5 has been attached in position by the contents of the status register 22. If the result at step 102 is affirmative, that is, when the floppy disk 5 is attached in position, it is determined at step 103 whether the control . , : .: ~ . ., . .: .. .. . .
:~32~837 microcomputer (~ COM) 6 for the mechanical deck system controller is performing the processing operation. When the control microcomputer (~ COM) 6 is released from the processing operation, it is checked at step 104 whether "1"
has ~een set at any of the D2 (ER); D1(WR) or Do~RD) bit of the command register 23. If the result at step 104 is affirmative, that is, when any of the erasure (ER), writing (WR) and readin~ (RD) operations has been issued from the host computer 1, it is checked at step 105 whether the drive command by bits D7, D6 of the command register 23 has already been issued. If a new drive command is not issued, the disk surface number (SURF #), drive number ~DR #) and the motor-on signal (Mon) are supplied at step 107 to the mechanical deck system controller (MD) 6. It is then checked at step 107 whether control micro-computer (~ COM) 6 for the mechanical deck system controller is performing a processing operation.
After the control microcomputer (r COM) 6 is released from the processing operation, the track number (TR #) set in the parameter register 24 is afforded ~t step 1D8 to the mechanical deck system controller MD 6. If the result at step 105 is affirmative, that is, when the drive is commanded, the program proceeds immediately to step 108 to afford the track n~mber (TR #) of the parameter register 24 to the mechanical deck system controller (MD) 6. It is then determined at the next step 109 whether "1" has been set at 132~837 the Do (RD) bit of th~ command register 23. If the result at step 109 is negative, that is, then the readinig command is not made, the data a~forded to the data register ~5 is transferred at step 110 to the buffer memory 2. It ls then checked at step 111 whether "1" is set at the D1 (WR? ~it of the command register 23. If th~e result at step 111 is affirmative, that is, when the write command is made by the host computer 1, it is checked at the next step 112 whether the index write command is made on the basis of the first byte of the parameter register 24, that is, the D7 and D6 bits of the sector register 24a. If the index write command is not made, the program proceeds to step 113 to perform the parity encoding operation (ENC) on the data written in the buffer memory 2. It is then checked at step 114 whether "1"
is set at the D2 (ER) bit of the command register 23. If the result at step 112 is affirmative, that it, when the index write command has been issued, the program proceeds immediately to step 114 to make a check of the erasure operation has been commanded at -the host computer 1. If the result at step 114 is affirmative, that is, when the erasure operation is commanded, the erasure operation (ER) and the write operation (WR) are performed at step 115. When the erasure operation (ER) is not commanded, only the write operation i s performed at step 116 . Then the result at step 111 is negative, that is, when the recording operation is not :; - , . ~ . , -,. ; .
. .. .. . ~ , .:: ... :
132~837 commanded, only the erasure operation ~ER) is made at step117. After the operations at the steps 115, 116 or 117 are made, the status of a sequence is checked from by the flags Do (Command ~usy) at the status register 22 at step 118 to check to see that the operation at the steps 115, 116 or 117 is terminated. The program then proceeds to step ~19 to make a check if "1" has been set at the bit D4 (Mon) of the ! command register 23. If the result at step 11a is negative, it is then checked at step 120 whether the control i microcomputer (~ COM) 6 is performing the processing ¦ operation. When the control microcomputer (~COM) 6 is ¦ .. released from the processing operation, the disk surface number (SURF #), drive number (DR #) and the motor-off number (M off) are afforded to the mechanical deck system controller (MD~ 6 at step 121. The program then proceeds to the stand-by state at step 122.
It is noted that, when the result at step 101 is negative, that is, when the host computer 1 has not commanded the operation of the floppy disk apparatus, the program proceeds to step 123 to make a check if the control microcomputer (~ COM) 6) for the mechanical deck system controller is performing the processing operation. When the control microcomputer ~COM) 6 is released from the processing operation, the disk surface number (SURF ~), drive number (DR #) and the motor off signal (M off) are supplied .
- , . . - .- ~ : .
to the control mlcrocomputer 6 of the mechanical deck system controller at step 124 and data is transferred at ~tep 125.
The program then proceeds to a standby state at step 122. If the result at step 104 is negative, that is, when only the command for spindle motor 7 being l:urned on (M on~ is issued at the host computer 1 but the erasure (ER), writing (WR) or reading (RD) are not commanded, the program proceeds to step 126 to afford the disk surface number (SURF ~), drive number (DR #) and the motor-off (M off) signals to the microcomputer i 6 for the mechanical deck system controller at step 124 to effect data transfer at step 125. When the result at step 102 is negative, that is, when the floppy disk ~ is not attached in position, the program proceeds to step 127 to makP a check if the drive is specified. If the same drive is specified, the program proceeds immediately to step 122. If a new drive is specified, the program proceeds to step 120.
If the result at step 109 is affirmative, that is, when the read operation tRD) is commanded by the host computer 1, the program proceeds to step 128 to reset the various flags.
The data are then read from the floppy disk 5 to the buffer memory 2 at step 129. After reading out the data at step 129, the Do (command busy) flag of the status register 22 is checked at the next step 130 to check the status of the sequencer to ascertain that the operation at the above step 127 is terminatecl. The program then proceeds to the next - .; . .: - :: : , . ....................... .
I '. . . ! '~ ' 13~837 step 131 to check the D1 bit of the status register 22 to check at step 129 if the magnetic head 4 has been correctly moved to the target track and the data read-out operation has been correctly made. If there is no drive error, an error correction processing ~DEC) is performed at step 132 at the error correction processor 13 by a Imethod as later described.
At the next step 132, it is checked if there is any error that cannot be corrected ~y the error correcting processing at step 132. If there is no error, the track number (TR #), sector number (SC #) and the copy inhibit code ~CPC) included in the sub-code data ~SUB-CODE) of the read-out data are transferred to the parameter register 24 at step 134 to check for the presence or absence of the error of the sub-code data (SUB-CODE) at step 135 ~y the method as later described. If there is no error in the sub-code data (SUB-CODE), the data read-out at the buffer memory 13 are transferred to the host computer 1 through the aforementioned data register at step 136. The program then proceeds to step 119.
If the results at the -steps 131, 133 and ~35 are affirmative, that is, when there is caused an error, the program proceeds immediately to step 119.
In the floppy disk apparatus of the present embodiment, microprogram control section 12 interprets or construes the command data D7, D6, D~, D4, D3, D2, D1 and Do supplied from the host computer 1 to the command register 23 of the -: ~ . ~ . , , , ' .
interface circuit 11 to perform the following various control operations.
Example of Control OPeration 1 Command data ID7~ D6~ Ds~ D4~ D3~ D2~ D1~ Do) =(O O ~ O O 1 1 0 ) (1) spindle motor on t2) magnetic head feed (seek) (3) erasure operation ~ (4) writing operation ¦ (5) spindle motor off I (6) maynetic head feed (cali~rate) ¦ Example of Control OPeration 2 I Command data (D7, D6, Ds~ D4~ D3~ D2~ D1~ Do) =(0 0 1 1 1 1 1 0 ) .' ! ( 1, spindle motor on (2) magnetic head feed Iseek) (3) data transfer 14) erasure operation (5) writing operation Example of Control OPeration 3 command data (D7, D6~ Dsr D4~ D3~ D2~ 1~ O) =(0 0 1 1 0 1 1 0 ) t1) spindle motor on (2) magnetic head feed (seek) (3) erasure operation . .
~: - .:: . ..... - .: . . , , . ,, .: :
- : . . : -.: :. , .. . ~ : . :
' '. ' . .'~ ' 1, ' ~ , ~ . . ...
132~8~17 (4) writing operation Example of Control OPeration 4 Command data (D7, D6, D5, D4, D3, D2, D1, Do) =(O O 1 0 0 ~ O 1 ) (1) spindle m~tor on (2) magnetic head feed (seek) ~3) reading operation (4) spindle motor off (5) magnetic head feed (calibra.te) Exam~le of Control OPeration S
(Command Data (D7, D6, D5, D4, D3, D2, Dl, Do =(0 0 1 1 1 0 0 1 ) (1) spindle motor on (2) magnetic head feed (seek) ! (3) reading operation (4) data transfer A series of control operations in which command data such as ~O 0 1 0 l 1 O) is afforded as the command data (D7, ¦ D6, D~, D4, D3, D2, D1, Do) by the host computer 1 to the command register of the interface circuit 11, will be explained in detail.
The microprogram control section or controller 12a interprets or construes the above command data (O 0 1 0 1 1 O) to afford the command signal for on-state of the spindle motor 7 (M on) and the track number (TR #) from the instruction execute section 12b by serial transfer to the microcomputer 6 of the mechanical deck system c~ntroller upon reception of the command siqnal ~M on) and the track number (TR #), the microcomputer 6 of the mechanical deck system controller causes the spindle motor 7 to be started to cause the revolution of the floppy disk 5, while shifting the magnetic head 4 by the feed motor 8 to the position of the specified track number (TR #). Durinq this time, the host ' computer l is advised by the microprogram controller 12a that i the readying state for exceiving the transferred data is completed. The host computer 1 then cau~es the data to be transferred to the buffer memory 13 by way of the data register 25 of the interface circuit 11 The instruction execute section 12b is also advised by the microcomputer 6 for the mechanical deck system controller that the revolutions of the spindle motor 7 are stable and the shiftinq of the magnetic head 4 is completed, with the recording/reproducing apparatus being in the readied state for recordinq. The error correcting processor 13 generates the error correcting parity codes on the data transferred from the host computer 1 to the buffer memory 11. As the instruction execute section 12b is advised by the microprogram controller 12a about the completion of the readying state for recording, and the parity codes are completely generated by the error correction pr~cessor 13, . ;. :. : ~ ~
132~l~37 the microprogram controller 12a actuates the recording circuit and the erasure circuit after the floppy disk 5 has t been revolved to the start position of the target sector, in such a manner the data are erased by the preceding erase head while data are recorded by a recorcting/reproducing head; The microprogram controller 12a affords the motor off signal (M
off) for the spindle motor 7 to the microcomputer 6 for the mechanical deck system controller by serial transfer to stop the revolutions of the spindle motor 7. The controller 12a also advises the host computer 1 that the data r,ecording operation is now terminated.
In the ~bove described embodiment of the data processing . .
apparatus, stored microprogram control means interprets or construes the simple instructions supplied from the host computer to effect a series of write/read operations so that external ~ontrol can be achieved by a simple program and the data recording/reproducing operation can be performed efficiently without lowering the processing efficiency of the host computer.
In the above example, data readinq and writing are performed by sector units, that is, on a sector basis.
However, when the capacity of the buffer memory 2 is increased, plural sectors can be read consecutively on a track basis or across plural tracks. In such case, the buffer memory 2 has five memory areas 2A to 2E, for example, ~ 32~3~
as shown in Fig. 14. The memory capacity of each of the memory areas 2A to 2E is selected to be sufficient to write the data reproduced from each sector of the floppy disk and to perform an error correction processing on the data. Thus the memory capacity is selected to be not less than 6 k byte, herein equal to 6 k byte. Thus the!buffer memory 13 has the total capacity of 30 k bytes. However, the memory employed herein has the total capacity of 32 k bytes.
On the other hand, parameter data for commanding the writing of the index signals, erasure of the track units, memory area numbers of the buffer memory 2, data for discriminating the sector and track modes from each other and the tracklsector number when the reading/writing/erasure is performed by physical sector units or track units, are supplied to a parameter register 24, each track consisting of four sectors, as mentioned above. In such case, the parameter register 84 is formed by five bytes and demarcated in some respects from that of the preceding example. Thus the register 24c at the third byte of the parameter register 24 is composed of a D7 bit as the data "0" and "1" for discrimination of the sector and track modes from each other, three bits D6, D5 and D4 indicating the number "0 0 0", "0 0 ~ - "1 0 0" of each of the memory areas 2A to 2E of the buffer memory 2, and lower four spare bits D3, D2, D1 and Do~
The 2-byte copy protection codes or CPC are afforded to ~321837 the registers 24d and 24e at the fourth and fifth bytes of the parameter register 24.
Similarly to the preceding example, the 3-bit data indicating the memory area numbers, that is, "O O 0", "O O
1", "O 1 O", "O 1 1" and "1 0 O" corresponding to the memory areas 2A to 2E, respectively, and the 1-bit data for discriminating the sector mode and the track mode from each other, are introduced into the parameter register 24 of the interface circuit ll, along with the ~-bit track number data and the 2-bit sector number data. The buffer memory 2 is controlled on the basis of these data by the microprogram controller 12a.
The track mode, indicated by the "1" state of the associated 1-bit data, will now be explained. The magnetic head 4 is moved to the track from which the data is to be reproduced. After the index siynals of the track are reproduced by the magnetic head 4, and after the floppy disk 5 has made one more complete revolution, the four-sector data are reproduced from the track. These reproduced data are data demodulated and written in the memory areas 2B to 2E of the buffer memory 2. These 4-sector data are corrected for errors by the error correcting processor 13 sector by sector and are transferred through the interface circuit 11 to the host computer 1. Similar operations are performed for the other tracks of the floppy disk 5 such that the contents of 3~
132~837 the memory areas 2B to 2E are rewritten by the 4-sector data of the tracks and corrected for errors before ths data are transmitted to the host computer. In the track mode, the 4-sector data of the track are written at all times in the memory areas of the memory areas 2B to2E. The host computer 1 controlsthe track numbers of thedata stored in the memory areas 2B to 2E.
When thedata such as the programs are recorded by track units or on the track basis on the floppy disk 5, these data are reproduced by the track units and written into t~e buffer memory 2, the data being then corrected ~or errors and transferred via interface circuit 11 to the host computer 1 for shortening the data processing time.
The usual mode for the sector mode, indicated by the "O"
state of the associated 1-bit data, will be explained. The magnetic head 4 is moved to the track from which the data is to be reproduced. After the index signals of the desired track are reproduced by the magnetic head 4, and after the floppy disk has made one more complete revolution, the desired one-sector data are reproduced from the track. These reproduced data are data demodulated and written in the memory area 2A of the buffer memory. The 1-sector data are corrected for errors by the error correcting processor 13 sector by sector and are transferred through the interface circuit 11 to the host computer 1. Similar operations are - . : : - .:.:: ::. . . .
performed for the other sectors of the floppy disk 5 such that the contents of the memory arlea 2 are rewritten by the data of the sector and corrected si.milary for errors ~efore the data are transmitted to the host computer 1. In the present usual mode of the sector mode, thedata of the sector are written at all times in the memory area 2A. The host computer 1 controls the track and sector numbers of the data stored in the memory area 2A.
The special mode for the sector.mode, indicatad by the "O" state of the associated 1-bit data, will now be explained. The magnetic head 4 is moved to a track from which the data are to be reproduced. After the index signals of the desired track are reproduced and after the floppy disk 5 has made one more complete revolutions, the data for the desired one sector of the track are reproduced. These reproduced data are data modulated and written in, for example, the memory area 2A of the buffer memory 2. The one-sector data are corrected for errors by the error correcting processor 13 and transferred through the interface circuit 11 to the host computer 1. The reproduced data from the other sectors are written in the next memory area 2B of the buffer memory 2. Similarly, the reproduced data from the separate sectors are sequentially cyclically written in th~ memory areas 2C, 2D, 2E, 2A ... and corrected separately for errors.
In the host computer 1, a pointer shown at X in Fig. 14 is 1~2~837 provided and, when the data are written for example in the memory area 2C, the pointer associated with the number of the memory area 2C is moved so that it will be associated with the number of the next memory area 2D. This pointeris moved sequentially cyclically to the numbers associated with the memory areas 2A, 2B, ... , 2E, 2A, ... . The numbers of the memory areas 2A to 2E of the buffer memory 2 and the track and sector numbers of the data stored in these memory areas are placed under control of the host computer 1 as the headers and, as the memory area number data are supp~ied from the host computer 1 via interface circult 11 to the microprogram control unit 12a, the data of a desired sector of a desired track stored in the buffers memory 2 may be transferred to the host computer 1 any number of times.
These data may be transferred directly without the necessity of re-correcting the data for errors. Tn this manner, when it is desired for the host computer 1 to use the data of a given sector of a given track of the floppy disk 5 a number of times, the latency time to elapse since the data are reproduced by the magnetic head 4 until they are introduced into the host computer 1 may be considerably reduced.
When the pointer is also in the usual sector mode at the host computer 1, the pointer may be fixed to the number of the memory area 2A.
In this manner, memory areas 2A to 2E are provided in , , : . . : .., .. . -: ., .- :, .... ..
:~321837 the buffer memory 2, the record data are reproduced and demodulated from the floppy disk 5 on the track or seçtor basis and corrected for errors in the buffer memory 2, so that the continuous long data may be procesed on the track basis in a shorter time while the short data on the sector basis can be processed in the same manner as before. In addition, the data transferred a large number oftimes to the host computer 1 can be stored in the buffer memory 2 until the use thereof is terminated so that the data can be processed within a shorter time.
The memory area in the buffer memory 2 may be composed of plural sectors or tracks or of any other extent as desired.
The numbers of the memory area 2A to 2E of the buffer memory 2 and the numbers of the tracks and sectors to which belong the data stored in the memory areas 2A to 2E are controlled at the host computer, so that the control and the control of the buffer memory 2 is facilitated. When the disk control unit and especially the instruction execute section 12b are responsible for these controls, the load of the control unit 10 is increased. In this case, the number of the memory areas 2A to 2E of the buffer memory 2 and the track and sector numbers to which belong the data stored in these memory areas are stored in a portion of the buffer memory 2 or other memories.
132183~
In the data processing apparatus of the present embodiment, the latency time may be shortened when it is desired that the reproducing data over plural sectors on the recording medium such as the disk be repeatedly utilized by the microcomputer. Also the data may be reproduced from the recording medium, such as the disk, on the sector or track basis, while the latency time may be reduced when the data are reproduced on the track basis.
The ~ther operation of the floppy disk drive device will be explained. The host computer (microcomputer) 1 writes thP
track number TR(k) of the data of the floppy disk 5 to be reproduced first in the parameter register 24 of the interface circuit 11, while also writing in the parament register 24 the flags indicating that the truck number has been written in the parameter register 24. Therefore, when the host ~omputer 1 reads the portion of the parameter re~ister 24 where the flag is written, it is seen that the truck number is written in the parameter register 24 and, on detection of the flag, writing the track number in the parameter register 24 is inhibited.
The host computer 1 generates the commands for data reproduction from the floppy disk 5 and transfer of the reproduced data to the disk control unit 10 of the floppy disk drive device. This causes the program sequence of the step 201 et seq of Fig. 15 to be initiated.
:: : : : , . :
.: , - " ::, :: . :: :. , ~ :: ~
1~21~37 On reception of the command, the instruction execute section 12b of the floppy disk clrive device causes the information concerning the track ~umber TR(k) written into the parameter register 24 of the interface circuit 11 to be transferred to the mechanical deck system controller 6 at step 201, while clearing the flag written in the parameter register 24 at step 202. This caus~es the host computer 1 to sense that the ~lag has ~een cleared and to write the number TR(k~l) of the next track to be reproduced in the parameter register 24 of the interface circuit 11 as well as writing or setting in the parament register 24 the flag indicating that the track number is written in the parameter register 24.
On reception of the information of the track number TR(k), the mechanical deck system controller 6 controls the ! motor 8 to move the magnetic head 4 to the track of the number TR(k) at step 203. When the movement of the magnetic head 4 is terminated and thin is transmitted from the mechanical deck system controller 6 to the instruction I execute section 12b, the floppy disk is turned. When the predetermined sector of the disk reaches the magnetic head 4, the execute section 12b controls the recording/reproducing/
erasure circuit 3 to cause the magnetic head 4 to reproduce the data of the track sector at step 204.
When the reproduction of the sector data is terminated, the instruction execute section 12b makes a check if the fla~
.. . . . .
- .: .. . , . : . ..
~21837 is set in the register 24 at step 205. If the result is negative, the program proceeds to step 208 as later described. If the result is aff,rmative, the execute section transmits the infsrmation concerninS~ the track number TR(kl1) written in the parameter register 24 of the interface circuit 11 to the mechanical deck system controller 6 at step 206, while clearing the flag written into the parameter register 24 at step 207.
~ n reception of the information concerning the track number TR(k~1), the mechanical deck system controller 6 controls the motor 8 in such manner that the magnetic head 4 is moved to the track of the track number TR(kl1) andt simultaneously, the data having the number repr~duced from the sector of the track bearing the number ~R(k) and stored in ~uffer memory 2 are subjected to error detection and c~rrection on the sector basis by the error correction processor 13 at step 208, and that the data thus corrected for errors are read from the buffer memory 2 so as to be transferred through the interface circuit 11 to the host computer 1 at step 209. It is noted that error detection may be included within the meaning of the error correction processing in the broad sense of the term. It is possible to perform only the error correction processing in the broad sense of the term during movement of the magnetic head 4.
The above seguence of operations is repeated if the .. ; .. , , , : . .
~32~3~
tracks of the ~loppy disk 5 bearing the numbers TR(k~2), TR(k+3), ... are to be reproduced.
This results in shortening the time involved since the demand for reproducing the data over several tracks in raised from the computer 1 until the data is transferred to the computer 1.
In the foregoing, description has been made of the case of setting or olearing the flag in the parameter register of the interface circuit 11 in which are written the track numbers. However, the present invention is not limited to such embodiment. For example, it is also possible that an interruption be caused by the instruction execute section 12b to the host computer lat the time point the flag is cleared although the flag itself cannot be read from the host computer 1.
Error Correction A typical method for correcting the error in the data frame and sub-code will be explained.
Error Correction for Data Frame An algorithm of error correction of the data frame will be explained first by referring to Fig. 16. At step 301, the data contained in the C1 code of each frame are sequentially read from the buffer memory 2 and transmitted to the error correction processor 13. At step 302, the error correction processor calculates the syndrome using the Cl parity codes, ~32~837 and finds the number of the errors based on the syndrome status. It is then checked at step 303 whPther the error is the 2 symbol error. If the result is negative, it is checked at step 304 whether the error is the 1 symbol error. If the result is negative, it is checked at step 305 whether there is no error or the error is the error of 3 or more symbols.
If the error is determined to be the 1-symbol error at step 304, ~he error location is found at step 306 using the syndrome, and the error symbol is corrected. If the error is ~etermined to be the 2 symbol error at step 303, the error location is found at step 307 using the syndrome and the error symbol is corrected. At the next step 308, the flags F1 of the correction flag area of the buffer memory 2 shown in Figs. 11 and 12A are set as indicated in Fig. 12B. In case of no error or of effecting 1-sym~ol or 2~symbol error correction, it is checked at step 309 whether continuing exists between the frame address of the frame and the frame address of the frame immediately before it. In case of discontinuity or in case the error of three or more symbols is found is found at step 3DS so that correction is not possible, the flags Fo~ F1 and F2 are set at the next step 310 as indicated in Fig.12B.
The above steps are repeatedly executed for each frame.
If it is found at step 311 that the processing of all of the ~rames is terminated, decoding of the next C2 series is 132~8~7 performed. The error correction for the sub-frames is performed in the similar manner and in advance of the above described processing of the data frames.
In the error correction for the C2 series, the data of the C2 series interleaved from the buffer memory 2 are read out at step 312 and the syndrome ils calculated at step 313.
The number of errors is then determined from the syndrome status. It is then checked at step 314 whether the error is the 2-symbol error. If the result is negative, it is checked I at step 315 whether the error is the 1-symbol error. If the result is negative, it is checked at step 316 whether there is no error or whether the error is the error of three or more symbols. I~ the error is found to be the1-symbol error at step 315, ~he error location is found at step 317 and the ¦ error symbol is corrected. In more detail, referring to Table 1, when the error location is not coincident with the location of the symbol to which the F2 flag has been afforded in the C1 correction processing, it is checked by the number of the F2 flags whether the correction is to be performed. If the correction is not made, the current state is mainained. In the Table 1, N1 and N2 denote the numbers of the symbols to which the flags F1 and F2 are afforded and that are coincident in locations to the error locations. kl and k2 denote the numbers of the F1 and F2 flags and X means "don't care".
. .. . . . . . . . ..
:. - . - . : :: .: . : "~
~2~.837 Table 2 _ error flag condi~ion ,op~ra~e . __ O _ no correct . __ N2=1 I error correct 1 N2= 0 K25 3 I error correc~
N2= 0 K22~ uncorrcc~
N1= ~ N2= 2 K2= 2 2 ~rror correct Nl = 2 N2=1 K2S 2 2 error correc~
Nl =2 N2= 0 N2= 0 2 error correc~
Nl= 2 N2= 0 KI S4 K2= 1.2 2 error correc~
N1= 2 N2= 0 Kl 25 K2=1.2 uncorrec~
-Nl =1 - Kl 3 K2s2 ~ error correct N1 =1 - Kl ~4 K2~ 2 uncorrect Nl= O K2~ 2 uncorrect Kl = 3 K2= 3 3 erasure corrcct K12 5 K2= 3 (N2=1) 2 erasure &
1 error correc~
Kl 2 5 K2=3 (N2= O) uncorrect Kl=4 K2= 3.4 4 erasure correct K12 5 K224 uncorrect _ 'I ~1 =3 3 era~ure correc~Kl 2 5 K2 =3 (N2= 1) 2 erasure R
i more I error correc~than 3 K] 2 5 K2= 3 (N2=0) uncorrec~
Kl =4 ~ erasure correcL
K12 5 K2 ~3 uncorrecL
Kl S 2 uncorrec~
Nl: number of fla~s corresPonding with ~he error loca~ion - N2: number of flaes corresponding wi~h ~he error loca~ion Kl: number of Pl flag K2: number of ~2 flag x: don't care -When the error is determined to be the 2-symbol error at step 314, the number of the F2 flags is determined at step 318. When the error is the error of 2 or less symbols, the 2-symbol error correction processing is performed at step 132183~
319. When the error is the error of more than two symbols, an erasure correction processinc; as later described is performed. It is determined at step 319 whether the 2-symbol error correction should be performed under the condition shown in Table 2, ~r the data should be left as are without error correction.
~ hen it is determined that thPre exist errc~rs of three or more symbols at stDp 316 or the number of F2 ~lags exceeds two at step 318, it is determined at steps 320 and 321 whether the number of F1 flags is 3 or 4. When it is three, a 3-erasure correction is performed at step 322 and, when it is four, a 4-erasure correction is performed at step 3~3.
When it is determined at steps 320, 321 that the number of F1 flags is neither 3 nor 4, the numbers of F1 and F2 flags are determined at step 324. A 2-erasure correction an~
a t-error correction are performed at step 322 only when the number of F1 flags is not less than 5 and the number of F2 flags is 3.
When the correction is not made in the above procedure, the data are treated as error.
The above steps are repeated for each series and, when it is determined at step 325 that the processing of these series is terminated, the correction is terminated.
At the time of the correction by the C2 parity codes, when it is determined above all that there exist errors of two or more symbol~, an erasure correction routine is performed when the number of F2 flags set for symbols contained in the C2 series exceeds 2, that is, 3 or m~re, and a 2-error correction routine or double error correction is performed when the above number dc>es not exceed two~ It is when the errors of 3 or more sym]bols or burst errors are caused that the F2 flags are set in the course of correction i by the C1 parity codes. However, in a majority of cases, it is the burst errors that are caused, if the symbol error rate . is not higher than 10~3. In this manner, wasteful 2-error I correction routines are not executed on accurrence of the burst errors and the uncorrectable errors otherwise caused during the correction routines may ~e avoided with a significantly improved correction capability for burst errors. The result would be most favorable when the burst error length is 8 to 14 frames.
It will be appreciated from the foregoing description that, in the present embodiment, when it is determined that there are caused errors of a number of symbols larger than the number that may be corrected for errors, such as two - simbols, an erasure correction is or is not executed according as the number of flags indicating that the correction is not possible by the C1 parity codes and that are set for symbols contained in the C2 series exceeds or does not exceed a predetermined number, such that the correction capability for burst errors may be improved significantly.
It is noted that up to double errors can be corrected by the Cl parity codes, while up to quadruple errors can be corrected by the C2 parity codes. In more detail, error correction of _ symbols and/or erasure correction of n symbols are possible with the C2 parity codes, wherein m and n are given by the formula . 2m ~ n ~ d - 1 where the minimum distance between the codes ~-5. In case of 4-symbol errors, the following formulas hold for the syndromes SO, S1, S2 and S3.
SO=e,+eJ+e~+el ... (l) S~ e, + Q ~e~ ~ ~"ek ~ ~'el -- (2) S2= ~y2'el + 1~2~e,~ + a2ltek+ Q.21 e(3) S3= a3~e~ ~ ~s~ a3"ek-~ aSI e I (4) where ei, ek, ek and e~ represent error patterns, represents the root satisfying the irreducible polynominal ~Ix)= on the galois field C~(~M), where, for example, M=8, and i, i~ k and L represent error locations. In case of a 3-symbol error, e =O.~The error locations 1. i and k only are known in the triple erasure correction, while the error locations i and i only are known in the double error , :
- : , : ~ . ,~ . : . . . . . .
- -, ., . - .. ..
., : - .
~32~837 correction plus single error correction.
Solving the simultaneous equations (1) to (4) with respect to the error patterns ei, ej, ek and el, the following equations for the quadruple erasure correction are obtained.
S t (~r~J + a~-k + a~~l)S,t (ty~~ k + ~ k ~ + ~}, J)S~t ~Y S3 el = -( I t K l - J) (~ ) (] t CY I 1 ) (5) Sot (cy k + Q~ + K ~S,t (cr -t cr ~ ~Y )S2t K IS3 J = --' ' (l+ ~ J ~) (lt K ~ t ~ J 1 ) ~- (6) Sot(a ~+~ 1~ )S~(K I I~CY' I J+~Y J l)S~tK I ~ JS3 C 1~
(ltCYk-l) (ltCYk-J) (lt~"-') '" (7) ;
Sot(K~I+K J+a ~)SIt(K I J+K J ~+K )S2t~ S3 e, =
(lt Kl 1) (lt K J) (lt CY
' ''' (O t In case of the triple ~rasure correction or the double erasure correction plus single error correction, the simultaneous equations ~1) to (4) (el=O) are solved with respect to the error patterns ei, ej and ek to give the following equations (9) to (12) wherein, in the double.error correction plus single error correction, ak, that is, the error location, is also found.
~ 32~ 8~7 SIQ'I~+S2(C~I ~ R'J) ~S3 J~ ' (9) ~;OtYI'~ SI(~ S2 So ~ + S I ( Ct' J ~ t S2 e ~ (10) (~ J) (~ ~a~') So cY I tl~ ~t S~ S2 eJ = ---- -- (11) (~ J ~- tr l ) ( CY J ~
SD~ tS~ (1r + R ) ~S2 e~ = -- (12) '. ( Ct' ~ + I y t ) ( cy k ~
_ . .
In this manner, in the cases of qadruple erasure correction, triple error correction and double error correction plus single error correction, the arithmetic operations by separate equations are usually carried out, with an increased program volume and time involved in the arithmetic operations.
Thus the quadruple erasure correction and triple erasure correction (or double erasure correction plus single error correction) are carried out using the common terms for the two sets of equations, that is, the set of equations ~5) to ~) for finding the quadruple error patterns and the set of equations ~9) to ~12) for finding the triple error patterns, instead of carrying out separate arithmetic operations using ... . . . . ... . .
~l32~837 these sets of equations. In the present embodiment, thPse common terms are expressed by the following equations.
A = ~ -- t13) B= ~l~ ~J (14) C=S,A ~ S2B t S3 -- (15) D=SoA~ Sl~ ~S2 (16) Using these equations (13) to (16) for the above common terms, the equations (15) to (18) for finding the quadruple error patterns may be expressed ~y the following formulas j~17) to (19):
I) ~y k 1, C
! (A+B ~~ + ~x) (17) D ~I+C
e k = ~ ''' t]8) tA1'BCY~-~2h) tc~'~+ ~
SO~SI~(~I+ ~)ek+(~+ ~')e I e~ = B -- (19) _ e, -- SD ~ Cl ~- Ck '~ eJ -- (20) Using the same ecluations (13) to (16~, the equations ~9) to (12) for fincling the triple error patterns may be expressed by the following formulas (21) to (24):
D ~ (21) e k = -- ''' (22) (~r~ + tY~) (~J ~ CYI() S O ~Y t S, 1 ( ~ -I cr ) ~ k e~ (22) B
el = S0 ~ e~ ~-eJ (2~) ' The above common terms are found in advance and substituted into the equations ~17) to ~20) to find the error patterns ei, e~, ek and el in ths case of the quadruple error correction and into the equations ~2~) to (24) to find the error patterns ei, ej and ek in the case of the triple erasure correction and double error correction plus single error correction. It is noted that ~ k is to be found only in the case of the duoble erasure correction plus single error correction.
In this manner, when carrying out the arithmetic operations for error correction and/or erasure correction of different numbers of symbols, those portions common to these operations are computed in advance for reducing the program ~L32~837 volume for the arithmetic operations and shorte~ing the computing time.
The methods of deriving the equations (17) to ~20) for finding the ~uadruple error patterns and the equations (21) to (24) for finding the triple ~rror patterns will be hereafter explained. First, the equations for finding the quadruple error patterns are derivecl in the followins manner.
By multiplying denominators and the numerators of the equations (8~ and (?) by ~ i+;+k and ~ i+j+l, respectively, the following equations, we obtain ' kS 1 ( ~ Jt ~ k~ ) s l t ( Q~ l + h~ t cr ) SZt S3 ~ I =
(~1 + ~ + aJ) (~1 ~ ~k) 'SO~ ( ~ t ~ J) S I t S2~ ~ t ~ ~ JS, t ~ ~ t ~ J) S2t S3) ¦~x"Jt (~ J) R~ + ~21) (cr~ + k k) (~5) ~ "SCt(~'-~t~J"t~'-l)S,t(~'t~Jt~')S2tS~
e~
(~+~1) (~k+~-) (a~+~) JsOt(~taJ)c`~ts2) R'lt l~-JS~t(tY~tct~J)s2ts3) _ _ J ) ~ )1 + ~ 2 k ) ( Q~ k ~ cy t ) -- (20 By introducinq the above equations (13) to (16) for the : : : . . , . :
.. . ,., ~
above common terms, the equation (17) and (18) are obtained from the above equations (25) and 1;'6). Also, by finding the equation (1)x ~ plus equation (2), the following e~uations.
~'SOtS,=(a't~')e~t(~lt~)e~t(~'t~l)eL (27) cr ~Sol S I t ( ~ ) ek~ ) el ..e, = (28) ~ ' + ~ ' - are obtained. ~u introducing the equation (14), the equation (19) may be obtained from the equation (28). Also the equation (20) may be obtained from the equation (1).
IThe equation for finding the triple error patterns are ¦derived in the ~ollowing manner. The equation (21) and (22) may be obtained by introducing the abova equations (13) to (16) for the common terms into the equations t9) and (12).
Also, by setting ei=0 in the equation ~28), we obtain ~ JSDtS,t (~'~ ~")eK
e 3 = ~ 9) ~ ' + c~ ' so that, by introducing the eguation (14), the equation ~23) may be obtained from the equation (29). The equation (24) may be obtained by setting el=0 in the equation (t).
It will be appreciated from above that, according to the error correcti~on and decoding method of the present invention, those portions common to the arithmetic operations for the error correction and/or erasure correction with 132:1837 different numbers of symbols are computed in advance, such that the program volume and the computing time necessary for those arithmetic operations may be reduced.
Error Correction for Sub-Codes The error correction for the sub-codes is performed separately from the err~r correction for the coding data, and before or after the correction for the coding data or after the C1 correction of the coding data. In the error correction for the sub-codes, decoding is performed at ~tep 401 from the last sub-code Sc3 in the reproducing sequence.
It is then checked at step 402 whether the decoding is possible. If the decoding i5 possible, the decoding data of the sub-code Sc3 is transmitted to the host computer 1 at step 403 to terminate the decoding. If the decoding is not possible, decoding for the sub-code Ss2 is carried out at step 404. The error correction for the sub-codes by the parity codes is carried out in the same manner as in the C1 correction described above. Thus, up to double errors can be corrected and decoding is possible if the number of errors is two or less symbols.
When the step 404 is executed, it is then checked at step 405 whetherdecoding of the sub-code Sc2 at step 904 was possible. If the decoding was possible, the decoding data for the sub-code Sc2 are transmitted to the host computer 1 at step 406 to terminate the decoding. When the decoding was .. : . , . . :
-~
- : : . ;~ : . :
~321837 not possible, decoding of the sub-code sc1 is carried out at st2p 407.
When the step 407 was executed, it is then checked at step 408 whether decoding for the sub-code sc1 at step 407 was possible. When the decoding was possible, the decoding data for the sub-code SC1 are transmitted to the host computer 1 at step 409 to terminate the decoding. When the decoding was not possible, decoding for the sub-code ScO is carried out at step 410.
~ hen the step 410 was executed, it is then c~ecked at ~tep 411 whether the decoding for the sub-code ScO ~t step 410 was possible. If the decoding was possible, the decoding data for the sub-code ScO are transmitted to the host computer 1 at step 412 to terminate the decoding. If the decoding was not possible, the information that none of the su~-codes ScO to Sc3 could be decode is transmitted to the host computer 1 at step 413 to terminate the decoding.
In the present embodiment, decoding is performed by the reverse of the reproducing procedure and thus starting àt the sub-code Sc3~ This sub-code Sc3 is less prone to burst errors than the first sub-code ScO that is to be decoded on starting the reproducing operation, the possibility is low that the decoding become impossible to perform at the outset of the decoding olpèration, so that the decoding data for the sub-codes may be obtained in a shorter time. In addition, ~32~837 the sub-code Sc3 less prone to burst errors is less subject to mistaken correction so that the operating reliability is also improved.
Alternatively, the decoding may be started at the sub-code Sc, or the sub-code Sc2.
Accordinq to the present embodiment, on reception of a data block containing a plurality of the same repeatedly transmitted encoded data, a decoding operation including the error correction is carried out starting at the data other than the data received first, and hence less prone to burst errors. Thereofre, the possibility is low that the decoding ----becomes impossible to perform at the outset of the decoding operation, such that the decoding data may be obtained in a shorter time. In addition there is less likelihood that the mistaken cDrrection may take plae at the time of decoding so that t he operational reliability is similarly improved.
CoPY Protect Code The method of utilizing the copy protect codes will be explained. The host computer 1 reads the copy protect code CPl previously read from the disk 5 and written into the buffer memory 2, and compares the code with the copy protect code CP1 which the host computer 1 itself ~tores in the internal ROM. If the read data are of the original disk, the two copy protect codes CP1 coincide and the ~egular operational sequence may be executed with the aid of the .
. . : ..
1321~37 softwàre that is transferred to the host computer 1.
Meanwhile, when copying the software o~ the host computer 1 on another disk, the controller 12 operates in such a manner that the dummy copy protect code in the host computer 1, such as the CP2, is written in place of the authenic copy protect code CP1. In the software of the thus copied disk, only the copy protect code is exchanged to CP2.
When reading and operating the thus copied disk, the copy protect code of the buffer memory 2 is CP2 but not the copy protect code CP1 of the host c~mputer 1. Thus the host computer 1 senses that the copy disk has been illicitly copied and accordingly may inhibit its usual operation.
In the above arrangment, the copy disk cannot be r~produced or operated in the usual manner. However, when it .
is assumed that the copy protect code CP1 written in the buffer memory 2 when reading the original disk is noted, and that the copy protect code CP2 on the buffer memory 2 is changed by an operation from outside to CP1 when reading the data from the copy disk next time, it would become possible to execute the so~tware of the buffer memory 2 when accessing the copy protect code from the host computer 1, despite the fact that the disk is the copy disk, since CP1 exists at this time. It is possible to rewrite or change the data on inserting a jig for rewriting the memory contents into a bus disposed between the buffer memory 2 and the disk control ~321837 unit 10 which is mounted outside the buffer memory 2.
Thus a register is provided in the disk control unit 10 designed as one-chip IC. This reclister may be of a ~maller capacity only sufficient to store the copy protect data transiently. The controller 12 is aware of the data strings or addresses such that, when control is at the copy protect code, the controller inhibits data output to the buffer memory 2 and causes data writing in the register. The data transfer from the buffer 2 into the host computer 1 may take place in the usual manner. In execùtion, when the host compu~er intends to have the copy protect code, the controller 12 returns the copy protect code of the register.
Thus the operation of the disk is the ~ame as before, if the disk is the original one.
Upon reading the copy disk, data are written into the buffer memory 2, while the copy protect code CP2 is written in the register. This copy protect code CP2 is stored in the one-chip disk control unit 10 and hence cannot be rewritten or changed from cutside. Although the copy protect data may be stolen by way of the bus disposed between the host computer 1 and the disk control unit 10, the copy disk cannot be executed or reproduced, since it is impossible to rewrite or change the copy protect code written in the register.
Claims
THE EMBODIMENTS OF THE INVENTION IN WHICH AN EXCLUSIVE
PROPERTY OF PRIVILEGE IS CLAIMED ARE DEFINED AS FOLLOWS:
1. A method for processing data comprising the steps of:
receiving or transmitting information data from or to a host computer;
storing the information data;
encoding or decoding the information data in error detection or correction codes;
modulating or demodulating the encoded information data into a recording signal or from a reproduced signal onto or from at least one of a plurality of tracks of a recording medium;
generating a control signal so as to move a recording or reproducing pickup means so as to record on or reproduce from a selected one of said plurality of tracks of the recording medium;
controlling the encoding or decoding of the information data so that it is performed during the movement of the recording or reproducing pickup means between tracks of the record medium.
2. An apparatus for processing data comprising:
means for receiving or transmitting the information data from or to a host computer;
means for storing the information data;
processing means for encoding or decoding the information data onto or from error detection or correction codes;
means for modulating or demodulating the encoded information data into a recording signal or from a reproduced signal onto or from at least one of a plurality of tracks of a recording medium;
means for generating a control signal so as to move a recording or reproducing pickup means so as to record on or reproduce from a selected one of the plurality of tracks of the recording medium;
means for controlling said processing means so as to encode or decode the information data during movement of the recording or reproducing pickup means between tracks of the recording medium.
PROPERTY OF PRIVILEGE IS CLAIMED ARE DEFINED AS FOLLOWS:
1. A method for processing data comprising the steps of:
receiving or transmitting information data from or to a host computer;
storing the information data;
encoding or decoding the information data in error detection or correction codes;
modulating or demodulating the encoded information data into a recording signal or from a reproduced signal onto or from at least one of a plurality of tracks of a recording medium;
generating a control signal so as to move a recording or reproducing pickup means so as to record on or reproduce from a selected one of said plurality of tracks of the recording medium;
controlling the encoding or decoding of the information data so that it is performed during the movement of the recording or reproducing pickup means between tracks of the record medium.
2. An apparatus for processing data comprising:
means for receiving or transmitting the information data from or to a host computer;
means for storing the information data;
processing means for encoding or decoding the information data onto or from error detection or correction codes;
means for modulating or demodulating the encoded information data into a recording signal or from a reproduced signal onto or from at least one of a plurality of tracks of a recording medium;
means for generating a control signal so as to move a recording or reproducing pickup means so as to record on or reproduce from a selected one of the plurality of tracks of the recording medium;
means for controlling said processing means so as to encode or decode the information data during movement of the recording or reproducing pickup means between tracks of the recording medium.
Applications Claiming Priority (7)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP139122/87 | 1987-06-03 | ||
JP62139122A JPS63302628A (en) | 1987-06-03 | 1987-06-03 | Error correction method |
JP139124/87 | 1987-06-03 | ||
JP62139124A JPS63303421A (en) | 1987-06-03 | 1987-06-03 | Floppy disk device |
JP201031/87 | 1987-08-13 | ||
JP62201031A JP2576523B2 (en) | 1987-08-13 | 1987-08-13 | External storage device |
CA000568383A CA1317029C (en) | 1987-06-03 | 1988-06-02 | Method and apparatus for processing information data |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CA000568383A Division CA1317029C (en) | 1987-06-03 | 1988-06-02 | Method and apparatus for processing information data |
Publications (1)
Publication Number | Publication Date |
---|---|
CA1321837C true CA1321837C (en) | 1993-08-31 |
Family
ID=27426547
Family Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CA000616298A Expired - Fee Related CA1321837C (en) | 1987-06-03 | 1988-01-24 | Method and apparatus for processing information data |
CA000616297A Expired - Fee Related CA1325282C (en) | 1987-06-03 | 1992-01-24 | Method and apparatus for processing information data |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CA000616297A Expired - Fee Related CA1325282C (en) | 1987-06-03 | 1992-01-24 | Method and apparatus for processing information data |
Country Status (1)
Country | Link |
---|---|
CA (2) | CA1321837C (en) |
-
1988
- 1988-01-24 CA CA000616298A patent/CA1321837C/en not_active Expired - Fee Related
-
1992
- 1992-01-24 CA CA000616297A patent/CA1325282C/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CA1325282C (en) | 1993-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5548599A (en) | Method and apparatus for processing information data | |
US5287468A (en) | Method and apparatus for processing information data | |
JP3232945B2 (en) | Preprocessing method and input / output device | |
US5528571A (en) | Optical disc apparatus | |
US4942486A (en) | Recording disk having read-only recording area and writable recording area and a driving apparatus therefor | |
JPH10500793A (en) | Packing variable length records in fixed blocks | |
JP2000182332A (en) | Reproducing device of multi-track disk and reproducing method thereof | |
EP0264602B1 (en) | Fixed time gap format variable field length data transfer | |
CA1321837C (en) | Method and apparatus for processing information data | |
KR0120823B1 (en) | Method and apparatus for processing information data | |
JP2539417B2 (en) | Information recording method | |
JP2508740B2 (en) | Disk drive | |
JP2650259B2 (en) | Disk drive | |
JP2576523B2 (en) | External storage device | |
JP2650260B2 (en) | Disk drive | |
JP2600678B2 (en) | Digital data playback device | |
JPH10334620A (en) | Recording medium reproduction apparatus, storage medium recording / reproduction apparatus, recording medium writing apparatus, error correction circuit, error correction code generation method, data transfer error correction method, storage medium, and recording medium | |
JPS63302628A (en) | Error correction method | |
KR0126891Y1 (en) | Digital data signal recording and reproducing device | |
JP2633924B2 (en) | Magnetic recording / reproducing device | |
JP2625734B2 (en) | Data recorder | |
JPS63303421A (en) | Floppy disk device | |
JPS60182063A (en) | Magnetic disc device and its error detecting system | |
JPS63304465A (en) | Information recording and reproducing device | |
JPH0834043B2 (en) | Magnetic recording method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
MKLA | Lapsed |