Magnetic disk unit

The magnetic disk device addresses parity irregularity detection through exclusive OR code calculation and comparison, enhancing data integrity by ensuring accurate parity generation and enabling effective control strategies.

JP2024123857AActive Publication Date: 2024-09-12KK TOSHIBA +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023031626
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-02
Publication Date
2024-09-12
Estimated Expiration
2043-03-02

AI Technical Summary

Technical Problem

Existing magnetic disk devices lack the ability to effectively detect irregularities in parity generated from track-by-track data, which can lead to errors and inefficiencies in data protection and retrieval.

Method used

The magnetic disk device incorporates a hardware circuit that calculates and compares exclusive OR codes to verify the correctness of parity data, ensuring accurate parity generation and detection of errors in the parity generation process.

Benefits of technology

This solution enables the detection of incorrect parity, preventing data corruption and improving data integrity by ensuring correct parity generation and enabling appropriate control strategies based on parity validity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024123857000001
    Figure 2024123857000001
Patent Text Reader

Abstract

To detect fraud of a parity generated from truck-wise data.SOLUTION: A magnetic disc device includes an HDC and an RWC. The HDC receives a plurality of data pieces from a host, performs, for each of the data pieces, generation and addition of first codes and output of the data pieces added with the first codes. The HDC calculates an exclusive logic sum for a group of first codes and outputs obtained first information. The RWC performs data conversion and exclusive logic sum calculation for the plurality of data pieces added with the first codes, and outputs the plurality of data pieces already subjected to the data conversion and a truck parity obtained by the exclusive logic sum calculation. The RWC obtains the first codes from the plurality of data pieces. The RWC calculates an exclusive logic sum for a group of second codes as the obtained first codes to obtain second information. The RWC compares first information with the second information and outputs a result of the comparison.SELECTED DRAWING: Figure 6
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present embodiment relates to a magnetic disk device. [Background technology]

[0002] There are magnetic disk drives that have the function of protecting data written to each track on a track-by-track basis. Sectors for recording parity are provided on the track. A sector for recording parity is referred to as a parity sector. A sector for recording host data is referred to as a data sector. Parity generated from host data written to all data sectors in a track is written to the parity sector. With this mechanism, the host data stored in all data sectors in a track is protected by the parity stored in the parity sector until the host data in any of the data sectors is updated. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] U.S. Patent No. 7,020,811 Summary of the Invention [Problem to be solved by the invention]

[0004] An object of one embodiment is to provide a magnetic disk device capable of detecting invalid parity generated from data in units of tracks. [Means for solving the problem]

[0005] A magnetic disk device of one embodiment is connectable to a host. The magnetic disk device includes a magnetic disk, a first circuit block, a second circuit block, and a magnetic head. The magnetic disk is provided with a track including a plurality of first sectors and a second sector. The first circuit block receives a plurality of first data pieces written to the plurality of first sectors from the host, and executes the generation of a first code, the addition of the first code, and the output of the first data piece to which the first code has been added, for each of the plurality of first data pieces. The first circuit block also calculates an exclusive OR for a group of first codes generated from each of the plurality of first data pieces, and outputs first information that is information obtained by the calculation of the exclusive OR for the group of first codes. The second circuit block receives a plurality of second data pieces that are a plurality of first data pieces to which the first code has been added, output from the first circuit block, and the first information output from the first circuit block. The second circuit block performs data conversion and outputs a third data piece, which is the second data piece after the data conversion, for each of the multiple second data pieces. The second circuit block calculates an exclusive OR for the multiple third data pieces generated by the data conversion for each of the multiple second data pieces, and outputs parity, which is information obtained by the calculation of the exclusive OR for the multiple third data pieces, following the output of the multiple third data pieces. The second circuit block obtains a first code from each of the multiple second data pieces, and calculates an exclusive OR for a group of second codes, which are the first codes obtained from each of the multiple second data pieces. The second circuit block compares second information, which is information obtained by the calculation of the exclusive OR for the group of second codes, with the first information, and outputs a result of the comparison between the second information and the first information. The magnetic head writes the multiple third data pieces output from the second circuit block to multiple first sectors, and writes the parity output from the second circuit block to the second sector. [Brief description of the drawings]

[0006] [Figure 1] FIG. 1 is a schematic diagram showing an example of the configuration of a magnetic disk device according to an embodiment. [Diagram 2] FIG. 2 is a diagram illustrating an example of a configuration of a magnetic disk according to the embodiment. [Diagram 3] FIG. 3 is a diagram for explaining an example of data processing executed by the controller of the embodiment. [Figure 4] FIG. 4 is a schematic diagram showing an example of the configuration of one track according to the embodiment. [Diagram 5] FIG. 5 is a schematic diagram illustrating an example of a hardware configuration of the HDC according to the embodiment. [Figure 6] FIG. 6 is a diagram illustrating an example of a hardware configuration of the RWC according to the embodiment. [Figure 7] FIG. 7 is a flowchart showing an example of an exclusive OR calculation operation (first XOR operation) by the XOR circuit of the embodiment. [Figure 8] FIG. 8 is a flowchart illustrating an example of an exclusive OR calculation operation (second XOR operation) performed by the CRC XOR circuit according to the embodiment. [Figure 9] FIG. 9 is a flowchart illustrating an example of the operation of the selector according to the embodiment. [Figure 10] FIG. 10 is a flowchart showing an example of the operation of the RWC when a track-by-track write operation is interrupted and resumed according to the embodiment. [Figure 11] FIG. 11 is a flowchart illustrating an example of the operation of the processor according to the embodiment. [Figure 12] FIG. 12 is a flowchart illustrating an example of the operation of the processor according to the modified example of the embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0007] Hereinafter, a magnetic disk device according to an embodiment will be described in detail with reference to the accompanying drawings. Note that the present invention is not limited to these embodiments.

[0008] (Embodiment) FIG. 1 is a schematic diagram showing an example of the configuration of a magnetic disk device 1 according to an embodiment.

[0009] The magnetic disk device 1 is connectable to a host 2. When the magnetic disk device 1 is connected to the host 2, it is able to receive access commands from the host 2. The access commands include write commands and read commands.

[0010] The magnetic disk device 1 includes a magnetic disk 11 having a magnetic layer formed on its surface. The magnetic disk device 1 writes data to the magnetic disk 11 and reads data from the magnetic disk 11 in response to an access command.

[0011] The access command includes a logical address. The magnetic disk device 1 provides a logical address space to the host 2. The logical address indicates a location in the address space. The host 2 uses the logical address to specify a location to write data to or a location to read data from. In other words, the logical address is location information specified by the host 2. The logical address is expressed as LBA (Logical Block Address).

[0012] Data is written and read via a magnetic head 22. In addition to a magnetic disk 11, the magnetic disk device 1 includes a spindle motor 12, a ramp 13, an actuator arm 15, a voice coil motor (VCM) 16, a motor driver IC (Integrated Circuit) 21, a magnetic head 22, a hard disk controller (HDC) 23, a head IC 24, a read / write channel (RWC) 25, a processor 26, a RAM 27, and a Flash Read Only Memory (FROM) 28.

[0013] The HDC 23 is an example of a first circuit block, and the RWC 25 is an example of a second circuit block.

[0014] The magnetic disk 11 is rotated at a predetermined rotation speed by a spindle motor 12 attached coaxially thereto. The spindle motor 12 is driven by a motor driver IC 21.

[0015] The processor 26 controls the rotation of the spindle motor 12 and the rotation of the VCM 16 via the motor driver IC 21 .

[0016] The magnetic head 22 writes and reads information to and from the magnetic disk 11 using a write core 22w and a read core 22r provided therein. The magnetic head 22 is attached to the tip of an actuator arm 15. The magnetic head 22 is moved in the radial direction of the magnetic disk 11 by a VCM 16. Note that a single magnetic head 22 may be provided with a plurality of write cores 22w and / or a plurality of read cores 22r.

[0017] When the magnetic disk 11 is not rotating, the magnetic head 22 is moved onto the ramp 13. The ramp 13 is configured to hold the magnetic head 22 at a position separated from the magnetic disk 11.

[0018] During a read operation, the head IC 24 amplifies and outputs a signal read by the magnetic head 22 from the magnetic disk 11, and supplies the signal to the RWC 25. During a write operation, the head IC 24 amplifies a signal corresponding to the data to be written, which is supplied from the RWC 25, and supplies the signal to the magnetic head 22.

[0019] The HDC 23 controls the transmission and reception of data to and from the host 2 via the I / F bus.

[0020] The RAM 27 is used as a buffer for data to be written to the magnetic disk 11 and data read from the magnetic disk 11 .

[0021] The RAM 27 is also used as an operating memory by the processor 26. The RAM 27 is used as an area into which firmware is loaded and an area in which various types of management data are temporarily stored.

[0022] The RAM 27 is composed of a volatile memory capable of high-speed operation. The type of memory constituting the RAM 27 is not limited to a specific type. The RAM 27 may be composed of, for example, a dynamic random access memory (DRAM), a static random access memory (SRAM), or a combination of these.

[0023] The RWC 25 performs data conversion such as error correction coding and modulation coding on the data to be written supplied from the HDC 23 on a sector-by-sector basis, and supplies the converted data to the head IC 24. The RWC 25 also performs processing such as error correction and demodulation on a sector-by-sector basis on the signal read from the magnetic disk 11 and supplied from the head IC 24, and outputs the processed signal to the HDC 23 as digital data.

[0024] The processor 26 is, for example, a CPU (Central Processing Unit). A RAM 27 and a ROM (Flash Read Only Memory) 28 are connected to the processor 26.

[0025] The FROM 28 is a non-volatile memory in which firmware (program data) and various operating parameters are stored.

[0026] The processor 26 performs overall control of the magnetic disk device 1 in accordance with firmware stored in the FROM 28. For example, the processor 26 loads firmware from the FROM 28 to the RAM 27, and controls the motor driver IC 21, the head IC 24, the RWC 25, the HDC 23, and the like in accordance with the loaded firmware.

[0027] The firmware program may be stored on the magnetic disk 11. In addition, some or all of the functions of the processor 26 may be realized by a hardware circuit such as a field-programmable gate array (FPGA) or an application specific integrated circuit (ASIC).

[0028] The configuration including the HDC 23, the RWC 25, and the processor 26 can be regarded as a controller 30 that controls the operation of the magnetic disk device 1. The controller 30 may include other elements (such as a RAM 27 or a ROM 28) in addition to these.

[0029] The firmware program may be stored on the magnetic disk 11. Some or all of the functions of the processor 26 may be realized by a hardware circuit such as a field-programmable gate array (FPGA) or an application specific integrated circuit (ASIC).

[0030] The number of magnetic disks 11 provided in the magnetic disk device 1 is not limited to one. The magnetic disk device 1 may have actuator arms 15 and magnetic heads 22 in a number corresponding to the number of magnetic disks 11. When the magnetic disk device 1 has a plurality of magnetic heads 22, the plurality of magnetic heads 22 may be moved as a unit, or the plurality of magnetic heads 22 may be configured as a plurality of groups that can move independently.

[0031] 2 is a diagram showing an example of the configuration of the magnetic disk 11 according to the embodiment. Servo data used for positioning the magnetic head 22 is written in a magnetic layer formed on the surface of the magnetic disk 11 by, for example, a servo writer or by self-servo writing (SSW).

[0032] 2 shows servo areas 41 arranged radially as an example of the arrangement of servo areas in which servo data is written. In the circumferential direction, a data area 42 in which data can be written is provided between two servo areas 41. A plurality of concentric tracks 50 are provided in the radial direction of the magnetic disk 11. A plurality of sectors are provided on the track 50 in the data area 42, in which data of a predetermined size is written. The predetermined size is the sector size.

[0033] The servo data includes a servo mark, a gray code, a burst pattern, and a post code. The servo mark indicates the start of the servo data. The gray code includes an ID for identifying each track 50 provided on the magnetic disk 11, i.e., a track number, and an ID for identifying each servo sector (i.e., servo area 41) on the track 50, i.e., a servo sector number. The burst pattern is data used to detect the amount of positional deviation from the center of the track indicated by the track number included in the gray code. The track number included in the gray code is given as an integer value, for example, and it is possible to obtain a decimal offset amount based on the position indicated by the track number by demodulating the burst pattern. In other words, the current position of the magnetic head 22 in the radial direction is obtained by demodulating the burst pattern. The post code is data for correcting the positional deviation of the shape of the track 50 defined by the gray code and the burst pattern from the ideal shape of the track 50.

[0034] When writing data to the magnetic disk 11 or reading data from the magnetic disk 11, the controller 30 performs positioning of the magnetic head 22, i.e., seek control and tracking control, based on the servo data read by the magnetic head 22 from the servo area 41.

[0035] The controller 30 performs data processing on the data received from the host 2 (referred to as host data) for each data segment of a size corresponding to the sector size, and writes each data segment after data processing to a sector.

[0036] 3 is a diagram for explaining an example of data processing executed by the controller 30 of the embodiment. Note that a data fragment of host data before data processing is represented as a data fragment DSa.

[0037] The HDC 23 generates a CRC (Cyclic Redundancy Check) code from the data fragment DSa, and adds the CRC code to the data fragment DSa (S101).

[0038] Hereinafter, the CRC code generated by the process of S101 will be referred to as the first code CRC1, and the data piece DSa to which the first code CRC1 has been added will be referred to as the data piece DSb.

[0039] The RWC 25 performs scrambling (S102) on the data fragment DSb. Furthermore, as an example of modulation coding, the RWC 25 performs run-length constrained coding (S103) on the data fragment DSb under conditions where the MTR (Maximum Transition Run) is constrained. Furthermore, as an example of error correction coding, the RWC 25 performs LDPC (Low Density Parity Check) coding (S104) on the data fragment DSb. Note that the order of steps S102 to S103 does not have to be as stated above.

[0040] It should be noted that scrambling, run-length constrained coding, and LDPC coding are examples of data conversion performed in the RWC 25.

[0041] The data fragment DSb after scrambling is referred to as a data fragment DSc. The size of the data fragment does not change during scrambling. Therefore, the size of the data fragment DSc is equal to the size of the data fragment DSb.

[0042] The data fragment DSc after run-length constrained coding is denoted as a data fragment DSd. In run-length constrained coding, the size of the data fragment may increase. Therefore, the size of the data fragment DSd is equal to or larger than the size of the data fragment DSc.

[0043] The data fragment DSd after LDPC coding is referred to as data fragment DSe. According to LDPC coding, the size of the data fragment increases by the amount of the generated LDPC code. Therefore, the size of the data fragment DSe is larger than the size of the data fragment DSd.

[0044] The data fragment DSe generated by the RWC 25 is written to one sector, so the size of the data fragment DSe is equal to or less than the sector size.

[0045] Hereinafter, data fragment DSa, data fragment DSb, data fragment DSc, data fragment DSd, and data fragment DSe may be collectively referred to as data fragment DS.

[0046] 4 is a schematic diagram showing an example of the configuration of one track 50 in the embodiment. In this diagram, the servo area 41 is omitted. Also shown in this diagram are write / read directions. The write / read direction is a direction in which the magnetic head 22 moves relative to the track 50 as the magnetic disk 11 rotates. The magnetic head 22 writes data to or reads data from each track 50 in the write / read direction.

[0047] Each sector in the track 50 is identified by a sector number. A sector with a sector number of x is denoted as sector #x. In the example shown in Fig. 4, the track 50 has 11 sectors from sector #0 to sector #10. A data fragment DSe written to sector #x is denoted as data fragment DSe#x.

[0048] Hereinafter, when not only the data fragment DSe but also the data fragment DSa, data fragment DSb, data fragment DSc, or data fragment DSd is expressed, the sector number of the sector finally written may be added to the end.

[0049] The data fragment DSe written to each sector includes the LDPC code generated by the process of S104 in Fig. 3. Therefore, for the data fragment DSe read from one sector, error correction can be performed on a sector-by-sector basis using the LDPC code.

[0050] When sector #0 is the head in the write / read direction, sector #10 can be considered the end sector. The end sector #10 is the sector for storing parity. That is, track-by-track writing is performed, for example, as follows. First, data pieces DSe#0-#9 are written to sectors #0-#9 in the order of sector numbers. Parity calculated based on the group of data pieces DSe written to sectors #0-#9 is written to sector #10. This parity is denoted as track parity TP.

[0051] The track parity TP is generated by calculating the exclusive OR (in other words, XOR) of the data pieces DSe#0-#9 for each bit position. The controller 30 can protect the data DSe#0-#9 written in the sectors #0-#9 from errors using the track parity TP. In other words, the track parity TP protects data on a track-by-track basis.

[0052] For example, even if a data fragment DS stored in a certain sector (referred to as the target sector) among sectors #0-#9 contains an error that cannot be corrected even by sector-by-sector error correction, it is possible to obtain the error-free data fragment DS that was stored in the target sector by performing calculations using the data fragments DS stored in all other sectors other than the target sector among sectors #0-#9 and the track parity TP.

[0053] Hereinafter, error correction using track parity TP will be referred to as track-based error correction. Calculation of exclusive OR means calculation of exclusive OR for each bit position. Sectors to which data pieces DSe are written (e.g., sectors #0-#9 in FIG. 4) will be referred to as data sectors. Sectors to which track parity TP is written (e.g., sector #10 in FIG. 4) will be referred to as parity sectors. A data sector is an example of a first sector. A parity sector is an example of a second sector.

[0054] A state in which the data piece DSe written to the track 50 is protected by the track parity TP is expressed as the track protection function being valid. Also, a state in which the data piece written to the track 50 is not protected by the track parity TP is expressed as the track protection function being invalid.

[0055] For example, when data pieces DSe are written to all data sectors of a certain track 50, and track parity TP calculated based on the group of data pieces DSe written to all data sectors is written to the parity sector of the track 50, the group of data pieces DSe written to the track 50 corresponds to the track parity TP. Therefore, the group of data pieces DSe written to the track 50 is protected by the track parity TP. In other words, the track protection function is valid for the track 50.

[0056] When a random write, i.e., overwriting of data fragments DSe for some data sectors, is performed on a track 50 for which the track protection function is enabled, the group of data fragments DSe in the track 50 no longer corresponds to the track parity TP that has already been written, and is no longer protected by the track parity TP. In other words, the track protection function is disabled on the track 50.

[0057] When a new track parity TP is recalculated and the new track parity TP is overwritten in the parity sector of a track 50 in which the track protection function is disabled, the group of data pieces DSe in the track 50 becomes protected by the new track parity TP. In other words, the track protection function becomes enabled for the track 50.

[0058] Whether the track protection function is enabled or disabled affects various controls. One example of controls that are affected by whether the track protection function is enabled or disabled is control related to adjacent track interference (ATI).

[0059] ATI is the effect on adjacent tracks when data is written to a magnetic disk. For example, when data is written to one track 50 (referred to as the first track 50), the track 50 adjacent to the first track 50 (the second track 50) is affected by the ATI. The effect of the ATI on the second track 50 accumulates according to the number of writes to the first track 50. If the effect of the ATI on the second track 50 becomes too large, it becomes difficult to read the data stored in the second track 50.

[0060] The controller 30 executes a rewrite operation to rewrite all data pieces DSe on a track-by-track basis before each track 50 becomes difficult to read data due to the influence of ATI. Specifically, the controller 30 estimates the degree of the ATI influence on each track 50 from the number of writes to neighboring tracks 50, and when the estimated degree exceeds a predetermined threshold, executes a rewrite operation on the track 50 whose estimated value of the degree of the ATI influence exceeds the threshold. The threshold value to be compared with the estimated value of the degree of the ATI influence to determine whether or not to execute a rewrite operation is referred to as an ATI threshold value.

[0061] A track 50 with an invalid track protection function is more vulnerable to the effects of ATI than a track 50 with an valid track protection function. Therefore, when the track protection function is invalid, the controller 30 uses, as the ATI threshold, a value smaller than the ATI threshold used when the track protection function is valid. This prevents the data piece DSe from becoming difficult to read from a track 50 with an invalid track protection function.

[0062] Another example of control that is affected by whether the track protection function is enabled or disabled is control to perform track-based error correction during a read operation. If sector-based error correction of a data piece to be read during a read operation is unsuccessful, the controller 30 performs track-based error correction if the track protection function is enabled. If the track protection function is disabled, it is clear that the error cannot be corrected by track-based error correction, so in order to save response time, the controller 30 refrains from performing track-based error correction.

[0063] In order to achieve the expected effect of the control based on whether the track protection function is enabled or disabled as described above, it is assumed that a correct track parity TP is generated when writing or rewriting a track-unit data piece DSe. If an incorrect track parity TP is generated due to a malfunction in the circuit that generates the track parity TP or due to a processing error that causes the generation of the track parity TP to fail, the group of data pieces DSe written to the track 50 and the track parity TP do not correspond, and therefore error correction using the track parity TP does not function properly.

[0064] In other words, a mechanism is required to confirm that the correct track parity TP has been generated.

[0065] Therefore, in the embodiment, the controller 30 is configured to include a hardware circuit that can detect the corruption of the track parity TP when the track parity TP is generated. The configuration of the hardware circuit for detecting the corruption of the track parity TP will be described below.

[0066] FIG. 5 is a schematic diagram illustrating an example of a hardware configuration of the HDC 23 according to the embodiment.

[0067] 5 to 7, information generated based on a data fragment DS is represented by the same sector number as the data sector to which the data fragment DS is written. Also, in FIG. 5 to 7, one track 50 is provided with N+1 data sectors #0-#N (where N is an integer equal to or greater than 1) and a parity sector as a plurality of sectors.

[0068] The HDC 23 includes a CRC generation circuit 101, a selector 102 having two input terminals, and a CRC XOR circuit 103.

[0069] When writing the data pieces DSa#0-#N, the HDC 23 executes the process of S101 shown in FIG. 3 for each of the data pieces DSa#0-#N in the order of the sector numbers.

[0070] Specifically, data pieces DSa#0-#N are input to one of the two input terminals of the selector 102 and the CRC generation circuit 101 in the order of sector numbers. The CRC generation circuit 101 calculates a first code CRC1 from each input data piece DSa, and inputs the first code CRC1 generated by the calculation to the other of the two input terminals of the selector. The first code CRC1 generated from the data piece DSa#x is represented as the first code CRC1#x. In other words, the CRC generation circuit 101 inputs the first code CRC1#0-#N to the selector 102 in the order of the data pieces DSa that were the basis of the calculation, that is, in the order of sector numbers.

[0071] When the data fragment DSa#x and the first code CRC1#x are input, the selector 102 outputs the data fragment DSa#x based on the selection signal, and outputs the first code CRC1#x following the output of the data fragment DSa#x. The selector 102 executes the output of the data fragment DSa#x and the output of the first code CRC1#x following the output of the data fragment DSa#x for each of the data fragments DSa#0-#N. As a result, the selector 102 outputs the data fragments DSa#0-#N to which the corresponding first code CRC1 has been added, that is, the data fragments DSb#0-#N.

[0072] The first codes CRC1#0-#N generated by the CRC generation circuit 101 are also input to the CRC XOR circuit 103. Every time the first code CRC1 is input, the CRC XOR circuit 103 calculates the exclusive OR of all the first codes CRC1 among CRC#0-#N that have been input up to that point. Then, the CRC XOR circuit 103 sequentially outputs the values ​​generated by the calculation.

[0073] Specifically, the CRC XOR circuit 103 includes a register (not shown) capable of holding intermediate data. The first codes CRC1#0-#N are input to the CRC XOR circuit 103 in the order of sector numbers. Before the first code CRC1#0 is input to the CRC XOR circuit 103, the register of the CRC XOR circuit 103 is reset and the intermediate data is set to all zeros. Every time one of the first codes CRC1#0-#N is newly input, the CRC XOR circuit 103 calculates an exclusive OR between the intermediate data in the register and the newly input first code CRC1, and stores the value obtained by the calculation in the register in an overwrite format as intermediate data.

[0074] The CRC XOR circuit 103 performs exclusive OR calculation and updates the intermediate data every time the first code CRC1 is input, and outputs the updated intermediate data. Information output from the CRC XOR circuit 103 in response to the input of the first code CRC1#x, that is, a value obtained by exclusive ORing the first codes CRC1#0-#x, is referred to as operated first code CRC1op#x.

[0075] It should be noted that the calculated first code CRC1op#N among the calculated first codes CRC1op#0-#N is an example of first information.

[0076] The HDC 23 inputs the data pieces DSb#0-#N and the calculated first code CRC1op#0-#N to the RWC 25 in synchronization with each other.

[0077] The RWC 25 generates data fragments DSe#0-#N and track parity TP from the data fragments DSb#0-#N, and checks whether or not the correct track parity TP has been generated based on the calculated first code CRC1op#N and the like.

[0078] FIG. 6 is a diagram illustrating an example of a hardware configuration of the RWC 25 according to the embodiment.

[0079] The RWC 25 includes a scramble circuit 111, a modulation coding circuit 112, an LDPC coding circuit 113, an XOR circuit 114, a selector 115, an error detection circuit 116, a plurality of buffers 120, a CRC XOR circuit 124, a plurality of buffers 130, and a comparison circuit 141. The XOR circuit 114 includes a restart processing circuit 117. The CRC XOR circuit 124 includes a restart processing circuit 127.

[0080] The scramble circuit 111 scrambles the data fragment DSb and outputs the scrambled data fragment DSb, that is, the data fragment DSc.

[0081] The modulation coding circuit 112 performs run-length constrained coding on the data fragment DSc output from the scramble circuit 111 under conditions where the MTR is constrained, and outputs the data fragment DSc after run-length constrained coding, that is, the data fragment DSd.

[0082] The LDPC encoding circuit 113 performs LDPC encoding on the data fragment DSd output from the modulation encoding circuit 112, and outputs the data fragment DSd after LDPC encoding, that is, the data fragment DSe.

[0083] The data fragments DSb#0-#N output from the HDC 23 are input to the scramble circuit 111 in sequence. The scramble circuit 111 generates data fragments DSc#0-#N by sequentially scrambling each of the data fragments DSb#0-#N, and sequentially outputs the generated data fragments DSc#0-#N. The modulation and coding circuit 112 generates data fragments DSd#0-#N by sequentially performing run-length constrained coding on each of the data fragments DSc#0-#N, and sequentially outputs the generated data fragments DSd#0-#N. The LDPC coding circuit 113 generates data fragments DSe#0-#N by sequentially performing LDPC coding on each of the data fragments DSd#0-#N, and sequentially outputs the generated data fragments DSe#0-#N.

[0084] The XOR circuit 114 generates the track parity TP by calculating the exclusive OR of the data pieces DSe#0-#N.

[0085] More specifically, the data fragments DSe#0-#N are input to the XOR circuit 114 in the order of sector numbers. The XOR circuit 114 also includes a register (not shown) capable of holding intermediate data. Before the data fragment DSe#0 is input to the XOR circuit 114, the contents of the register of the XOR circuit 114, i.e., the intermediate data, are reset to all zeros. Every time one of the data fragments DSe#0-#N is newly input, the XOR circuit 114 calculates the exclusive OR of the intermediate data and the newly input data fragment DSe, and stores the data fragment obtained by the calculation in the register in an overwrite format as intermediate data.

[0086] In this way, the XOR circuit 114 proceeds with the calculation of the exclusive OR and the update of the intermediate data every time the data fragment DSe is input. Therefore, when a certain data fragment DSe#x of the data fragments DSe#0-#N is input to the XOR circuit 114, the calculation of the exclusive OR according to the input of the data fragment DSe#x and the update of the intermediate data cause the register of the XOR circuit 114 to store the data fragment obtained by the exclusive OR of the data fragments DSe#0-#x. Therefore, when the calculation of the exclusive OR according to the input of the data fragment DSe#N and the update of the intermediate data are completed, the register of the XOR circuit 114 causes the data fragment obtained by the exclusive OR of the data fragments DSe#0-#N, that is, the track parity TP, to be stored as intermediate data.

[0087] Each time one data fragment DSe#x is input, the XOR circuit 114 outputs the updated intermediate data, that is, the data fragment obtained by exclusive ORing the data fragments DSe#0-#x. The data fragment obtained by exclusive ORing the data fragments DSe#0-#x output by the XOR circuit 114 is referred to as the calculated data fragment DSeop#x. The calculated data fragment DSeop#N corresponds to the track parity TP.

[0088] The selector 115 has two input terminals. The data pieces DSe#0-#N are input to one of the two input terminals, and the calculated data pieces DSeop#0-#N are input to the other of the two input terminals.

[0089] When data fragments DSe#0-#N are input, selector 115 outputs data fragments DSe#0-#N to head IC 24 based on a selection signal. After that, when calculated data fragment DSeop#N is input, selector 115 outputs the input calculated data fragment DSeop#N, i.e., track parity TP, to head IC 24 based on a selection signal.

[0090] The data pieces DSe#0-#N and the track parity TP generated from the data pieces DSe#0-#N are input to the head IC 24 from the selector 115. The head IC 24 sequentially supplies the data pieces DSe#0-#N and the track parity TP to the magnetic head 22. Under positioning control, the magnetic head 22 writes the data pieces DSe#0-#N to the data sectors #0-#N and writes the track parity TP to the parity sector.

[0091] Scrambler circuit 111, modulation coding circuit 112, and LDPC coding circuit 113 configure a pipeline. Hereinafter, in this specification, the pipeline configured by scramble circuit 111, modulation coding circuit 112, and LDPC coding circuit 113 will be simply referred to as a pipeline.

[0092] The number of buffers 120 provided in the RWC 25 corresponds to the number of pipeline stages included in the pipeline. In this example, the number of pipeline stages included in the pipeline is three. Therefore, the RWC 25 includes three buffers 121-123 as the multiple buffers 120. The three buffers 121-123 are connected in series.

[0093] When the data fragment DSb#x is input to the scramble circuit 111, the first code CRC1#x included in the data fragment DSb#x is obtained from the data fragment DSb#x, and the obtained data fragment DSb#x is input to the buffer 121. The first code CRC1#x obtained from the data fragment DSb#x is represented as the second code CRC2#x.

[0094] The second code CRC2#x input to the buffer 121 is transferred from the buffer 121 to the buffer 123 in synchronization with the transfer of the data pieces DS between the circuits in the pipeline, and is then input to the CRC XOR circuit 124. Therefore, the second code CRC2#0-#N is input to the CRC XOR circuit 124 in synchronization with the input of the data pieces DSe#0-#N to the XOR circuit 114.

[0095] The CRC XOR circuit 124 has a circuit configuration similar to that of the XOR circuit 114, except that the data subjected to the exclusive OR is the second code CRC2#0-#N, rather than the data pieces DSe#0-#N.

[0096] Specifically, the CRC XOR circuit 124 includes a register (not shown) capable of holding intermediate data. Before the second code CRC2#0 is input to the CRC XOR circuit 124, the contents of the register of the CRC XOR circuit 124, i.e., the intermediate data, are reset to all zeros. Every time one of the second codes CRC2#0-#N is newly input, the CRC XOR circuit 124 calculates the exclusive OR of the intermediate data and the newly input second code CRC2, and stores the data piece obtained by the calculation in the register in an overwrite format as intermediate data.

[0097] In this way, the CRC XOR circuit 124 performs exclusive OR calculation and updates the intermediate data every time the second code CRC2 is input. Therefore, when a second code CRC2#x among the second codes CRC2#0-#N is input to the CRC XOR circuit 124, the register of the CRC XOR circuit 124 stores a value obtained by exclusive ORing the second codes CRC2#0-#x through the calculation of exclusive OR and the update of the intermediate data. The value obtained by exclusive ORing the second codes CRC2#0-#x stored in the register is referred to as the calculated second code CRC2op#x.

[0098] The CRC XOR circuit 124 outputs the intermediate data in the register every time the second code CRC2 is input. That is, the CRC XOR circuit 124 sequentially outputs the calculated second code CRC2op#0-#N.

[0099] It should be noted that the calculated second code CRC2op#N among the calculated second codes CRC2op#0-#N is an example of second information.

[0100] The comparator circuit 141 has two input terminals. The calculated second code CRC2op#0-#N is sequentially input to one of the two input terminals. The calculated first code CRC1op#0-#N is sequentially input to the other of the two input terminals via a plurality of serially connected buffers 130.

[0101] The number of buffers 130 included in the RWC 25 corresponds to the number of pipeline stages included in the pipeline. Thus, in this example, the RWC 25 includes three buffers 131-133 as the multiple buffers 130. The three buffers 131-133 are connected in series.

[0102] In synchronization with the input of data fragment DSb#x to the scramble circuit 111 (and the input of second code CRC2#x to the buffer 121), the calculated first code CRC1op#x is input to the buffer 131. The calculated first code CRC1op#x input to the buffer 131 is transferred from the buffer 131 to the buffer 133 in synchronization with the transfer of data fragment DS between each circuit in the pipeline, and is then input to the comparison circuit 141. Thus, the calculated first code CRC1op#0-#N is input to the comparison circuit 141 in synchronization with the input of the calculated second code CRC2op#0-#N.

[0103] The comparison circuit 141 compares the calculated second code CRC2op#N with the calculated first code CRC1op#N, and transmits the comparison result to the processor 26.

[0104] If the CRC XOR circuit 124 correctly executes the exclusive OR calculation, the calculated second code CRC2op#N output from the CRC XOR circuit 124 should match the calculated first code CRC1op#N. If an error occurs in the processing in the CRC XOR circuit 124, an incorrect value is output as the calculated first code CRC1op#N, and the output calculated second code CRC2op#N does not match the calculated first code CRC1op#N.

[0105] As described above, the CRC XOR circuit 124 has the same circuit configuration as the XOR circuit 114, except that the data that is the target of the exclusive OR is different. The CRC XOR circuit 124 performs the exclusive OR calculation on the second code CRC2#0-#N in synchronization with the exclusive OR calculation on the data pieces DSe#0-#N performed by the XOR circuit 114. Therefore, if the CRC XOR circuit 124 outputs an incorrect value as the calculated second code CRC2op#N, it can be assumed that an error has occurred in the processing by the XOR circuit 114.

[0106] For example, if there is a defect in the design of the XOR circuit 114 (and the CRC XOR circuit 124), an incorrect value may be output as the track parity TP. The manufacturer can detect the defect in the design of the XOR circuit 114 (and the CRC XOR circuit 124) by the above mechanism. Specifically, the manufacturer causes the magnetic disk device 1 to execute a track-by-track write operation during the manufacturing process, and obtains the result of the comparison by the comparison circuit 141. If the comparison result is a mismatch, the manufacturer can infer that there is a defect in the design of the XOR circuit 114 (and the CRC XOR circuit 124).

[0107] Furthermore, a failure in the restart process in the XOR circuit 114 (and the CRC XOR circuit 124) is one example of a case in which an error is likely to occur during operation of the magnetic disk device 1. The restart process will be described below.

[0108] In the magnetic disk device 1, a write operation may be interrupted during the write operation. For example, while a write operation is being performed on a target track 50, the position of the magnetic head 22 may drift radially from the target track 50 beyond an allowable range, resulting in off-track. When the controller 30 detects off-track, it immediately interrupts the write operation. Then, when the controller 30 confirms that the off-track has been resolved, it resumes the write operation from the sector where the write operation was interrupted.

[0109] Furthermore, if the controller 30 detects vibrations exceeding the tolerable level during a write operation, the controller 30 suspends the write operation, and when the vibration level falls below the tolerable level, the controller 30 resumes the write operation.

[0110] When the controller 30 suspends the track-by-track write operation, the XOR circuit 114 (and the CRC XOR circuit 124) suspends the exclusive OR calculation that has been performed on the series of data (data fragment DSe or second code CRC2) input for each sector number. Then, when the controller 30 resumes the track-by-track write operation, the XOR circuit 114 (and the CRC XOR circuit 124) resumes the exclusive OR calculation.

[0111] The XOR circuit 114 (and the CRC XOR circuit 124) resumes the exclusive OR calculation from the data input next to the data for which the exclusive OR calculation was last performed immediately before the interruption, among the series of data (data fragment DSe or second code CRC2). Therefore, the XOR circuit 114 (and the CRC XOR circuit 124) needs to determine which data is input when the exclusive OR calculation is to be resumed, that is, the timing of the exclusive OR calculation.

[0112] In this specification, the restart process is a process for determining the timing of calculation of an exclusive OR. In the XOR circuit 114, the restart process is executed by a restart process circuit 117. In the CRC XOR circuit 124, the restart process is executed by a restart process circuit 127.

[0113] If the timing of the exclusive OR calculation determined by the XOR circuit 114 (more precisely, the restart processing circuit 117) is not appropriate, the track parity TP obtained will be invalid. In that case, the CRC XOR circuit 124 having the same circuit configuration as the XOR circuit 114 also restarts the exclusive OR calculation based on inappropriate timing, and the calculated second code CRC2op#N calculated immediately after the restart processing becomes an invalid value. As a result, the comparison circuit 141 outputs a determination result indicating a mismatch.

[0114] The processor 26 determines, based on the comparison result output by the comparison circuit 141, whether or not an incorrect value of the track parity TP has been output.

[0115] Furthermore, in the embodiment, the RWC 25 includes a mechanism for detecting an error in the track parity TP caused by an error in the LDPC encoding circuit 113.

[0116] Specifically, the computed data pieces DSeop#0-#N output from the XOR circuit 114 are input to the error detection circuit 116. When the computed data piece DSeop#N of the computed data pieces DSeop#0-#N, that is, the trap parity TP, is input, the error detection circuit 116 executes hard decision as error correction corresponding to the LDPC code on the computed data piece DSeop#N and attempts to detect an error. The error detection circuit 116 transmits the detection result to the processor 26.

[0117] Since all of the data pieces DSe#0-#N are LDPC-coded, it is possible to perform error correction corresponding to the LDPC code on the calculated data pieces DSeop#N generated from the data pieces DSe#0-#N. Since the calculated data pieces DSeop#N are generated based on the data pieces DSe#0-#N that have not been LDPC-coded by the LDPC encoding circuit 113 for a long time, as long as the LDPC encoding circuit 113 can correctly execute LDPC encoding, an error should not be detected by the error correction on the calculated data pieces DSeop#N in the error detection circuit 116. In other words, if an error is detected in the error detection circuit 116, it can be inferred that the LDPC encoding circuit 113 cannot correctly execute LDPC encoding. If the LDPC encoding circuit 113 cannot correctly execute LDPC encoding, the correct track parity TP cannot be obtained.

[0118] Therefore, when the result of the error detection by the error detection circuit 116 indicates the occurrence of an error, the processor 26 determines that an incorrect track parity TP is output. With this mechanism, it is possible to detect an incorrect track parity TP caused by an error in the processing by the LDPC encoding circuit 113.

[0119] Next, the operation of each component of the magnetic disk device 1 of the embodiment during a track-by-track write operation will be described.

[0120] First, using Figures 7 to 9, we will explain the operation of RWC25 when data fragments DSb#0-#N are input from HDC23 to RWC25, and the calculated first code CRC1op#0-#N synchronized with the input of data fragments DSb#0-#N is input.

[0121] FIG. 7 is a flowchart showing an example of an exclusive OR calculation operation (referred to as a first XOR operation) by the XOR circuit 114 according to the embodiment.

[0122] First, the XOR circuit 114 resets the contents of the register of the XOR circuit 114, that is, the intermediate data, to all zeros (S201), and initializes the index i of the loop processing to zero (S202).

[0123] Thereafter, the XOR circuit 114 executes the loop process of steps S203-S206 for each of the data pieces DSe#0-#N input from the LDPC encoding circuit 113. The steps in the loop process of steps S203-S206 will be explained in the order of execution.

[0124] In step S203, the XOR circuit 114 calculates the exclusive OR of the data piece DSe#i and the intermediate data in the register, and updates the intermediate data in the register with the calculation result.

[0125] In step S204, the XOR circuit 114 outputs the updated intermediate data, that is, the calculated data piece DSeop#i.

[0126] In step S205, the XOR circuit 114 judges whether i is equal to N. If i is not equal to N (S205: No), control proceeds to step S206. If i is equal to N (S205: Yes), the first XOR operation by the XOR circuit 114 ends. Note that the calculated data piece DSeop#N output by the XOR circuit 114 in step S203 in the last loop process corresponds to the track parity TP calculated from the data pieces DSe#0-#N.

[0127] In step S206, the XOR circuit 114 increments the index i by 1. After step S206, the control proceeds to step S203.

[0128] FIG. 8 is a flowchart showing an example of an exclusive OR calculation operation (referred to as a second XOR operation) by the CRC XOR circuit 124 according to the embodiment.

[0129] First, the CRC XOR circuit 124 resets the contents of the register of the CRC XOR circuit 124, that is, the intermediate data, to all zeros (S301), and initializes the loop processing index j to zero (S302).

[0130] Thereafter, the CRC XOR circuit 124 executes the loop process of steps S303 to S306 for each of the second codes CRC2#0 to #N input from the buffer 121. The steps in the loop process of steps S303 to S306 will be explained in the order of execution.

[0131] In step S303, the CRC XOR circuit 124 calculates the exclusive OR of the second code CRC2#j and the intermediate data in the register, and updates the intermediate data in the register with the calculation result.

[0132] In step S304, the CRC XOR circuit 124 outputs the updated intermediate data, that is, the calculated second code CRC2op#j.

[0133] In step S305, the CRC XOR circuit 124 determines whether j is equal to N. If j is not equal to N (S305: No), control proceeds to step S306. If j is equal to N (S305: Yes), the second XOR operation by the CRC XOR circuit 124 ends.

[0134] In step S306, the CRC XOR circuit 124 increments the index j by 1. After step S306, the control proceeds to step S303.

[0135] FIG. 9 is a flowchart showing an example of the operation of the selector 115 according to the embodiment.

[0136] The selector 115 outputs the data fragments DSe#0-#N input from the LDPC encoding circuit 113 as is to the head IC 24 (S401). After that, the selection signal is switched (S402), and the selector 115 outputs the calculated data fragment DSeop#N input from the XOR circuit 114, i.e., the track pitch TP, to the head IC 24 (S403). Then, the operation of the selector 115 ends.

[0137] FIG. 10 is a flowchart showing an example of the operation of the RWC 25 when a track-by-track write operation is interrupted and then resumed according to the embodiment.

[0138] When the input of data fragments DSb#0-#N and the input of the calculated first code CRC1op#0-#N synchronized with the input of data fragments DSb#0-#N starts from the HDC 23 to the RWC 25 (S501), the input of data fragments DSe#0-#N starts to the XOR circuit 114 and the input of the second code CRC2#0-#N to the CRC XOR circuit 124. Then, the XOR circuit 114 and the CRC XOR circuit 124 start the XOR operation on the data input thereto (S502).

[0139] Next, when an interruption in the write operation occurs and the input of data fragments DSb#0-#N and the input of calculated first code CRC1op#0-#N from HDC23 to RWC25 are interrupted (S503), the XOR circuit 114 and the CRC XOR circuit 124 stop their XOR operations (S504).

[0140] When the cause of the interruption of the write operation is eliminated and the write operation is resumed, the input of the data pieces DSb#0-#N and the input of the calculated first code CRC1op#0-#N from the HDC 23 to the RWC 25 are resumed (S505), and the resume processing circuit 117 of the XOR circuit 114 and the resume processing circuit 127 of the CRC XOR circuit 124 determine the timing to resume the XOR operation (S506). When the resume timing arrives, the XOR circuit 114 and the CRC XOR circuit 124 resume the XOR operation (S507).

[0141] When the input of the data pieces DSb#0-#N and the input of the calculated first code CRC1op#0-#N from the HDC 23 to the RWC 25 are completed (S508), the XOR operations in the XOR circuit 114 and the CRC XOR circuit 124 are completed after a time interval (S509). Then, the operation example ends.

[0142] 11 is a flowchart showing an example of the operation of the processor 26 of the embodiment. In one example, the series of operations shown in this figure is executed at any timing after the track parity TP is calculated during a track-by-track write operation.

[0143] The processor 26 determines, based on the comparison result received from the comparison circuit 141, whether or not the comparison circuit 141 has detected a mismatch between the calculated first code CRC1op#N and the calculated second code CRC2op#N (S601).

[0144] If no mismatch is detected between the calculated first code CRC1op#N and the calculated second code CRC2op#N (S601: No), the processor 26 determines, based on the inspection results received from the error detection circuit 116, whether or not an error has been detected in the calculated data piece DSeop#N (i.e., the track parity TP) by the error detection circuit 116 (S602).

[0145] If the comparison circuit 141 detects a mismatch between the calculated first code CRC1op#N and the calculated second code CRC2op#N (S601: Yes), or if the error detection circuit 116 detects an error in the calculated data piece DSeop#N (S602: Yes), the processor 26 records in the management information stored in a specified location (e.g., RAM 27) that the track parity TP written to the write destination track 50 is invalid (S603), and terminates the operation.

[0146] If the error detection circuit 116 detects no error in the calculated data piece DSeop#N (S602: No), the processor 26 skips the process of step S603 and ends the operation.

[0147] 11, the comparison circuit 141 determines whether a mismatch has been detected, and the error detection circuit 116 determines whether an error has been detected. The order in which these two determinations are performed may be reversed.

[0148] The processor 26 controls the track 50 on which the track-by-track write operation has been executed differently depending on whether the track parity TP of the track 50 is recorded as invalid in the management information.

[0149] For example, even if random writing has never been performed on a certain track 50 after a track-by-track write operation has been performed on that track 50, if the management information records that the track parity TP of that track 50 is invalid, the processor 26 considers the track protection function for that track 50 to be invalid. Specifically, the processor 26 makes the ATI threshold smaller than when the track protection function is valid, and refrains from performing track-by-track error correction when sector-by-sector error correction has failed.

[0150] Furthermore, if random writing has never been performed on a certain track 50 after a track-by-track write operation has been performed on that track 50, and if the management information does not record that the track parity TP of that track 50 is invalid, the processor 26 considers the track protection function for that track 50 to be valid. Specifically, the processor 26 uses the ATI threshold value when the track protection function is valid, or performs track-by-track error correction when sector-by-sector error correction has failed.

[0151] The method of varying the control based on the management information is not limited to this.

[0152] As described above, according to the embodiment, the magnetic disk device 1 includes the HDC23, which is a first circuit block, and the RWC25, which is a second circuit block. The HDC23 receives data pieces DSa#0-#N from the host 2. The data pieces DSa#0-#N are a plurality of data pieces DSa written to the data sectors #0-#N. The HDC23 generates and adds a first code CRC1, and outputs a data piece DSb, which is a data piece DSa to which the first code CRC1 is added, for each of the data pieces DSa#0-#N. The HDC23 also calculates an exclusive OR for the first CRC1#0-#N, which is a group of the first codes CRC1 generated from each of the data pieces DSa#0-#N, and outputs the calculated first code CRC1op#N, which is the first information obtained by calculating the exclusive OR for the first codes CRC1#0-#N. The RWC25 receives data fragments DSb#0-#N, which are a plurality of second data fragments output from the HDC23, and the calculated first code CRC1op#N, which is output from the HDC23. Then, the RWC25 performs data conversion on each of the data fragments DSb#0-#N, and outputs data fragments DSe, which are data fragments DSb after the data conversion. The RWC25 also calculates the exclusive OR of data fragments DSe#0-#N, which are a plurality of third data fragments generated by the data conversion on each of the data fragments DSb#0-#N, and outputs track parity TP, which is information obtained by the calculation of the exclusive OR on the data fragments DSe#0-#N, following the output of the data fragments DSe#0-#N. Furthermore, the RWC25 acquires the first code CRC1 from each of the data fragments DSb#0-#N as the second code CRC2, and calculates the exclusive OR of the second code CRC2#0-#N, which is a group of the second code CRC2 acquired from each of the data fragments DSb#0-#N. The RWC25 then compares the calculated first code CRC1op#N with the calculated second code CRC2op#N, which is second information obtained by calculating the exclusive OR of the second code CRC2#0-#N, and outputs the comparison result between the calculated first code CRC1op#N and the calculated second code CRC2op#N.The magnetic head 22 writes the data pieces DSe#0-#N output from the RWC 25 and supplied from the head IC 24 to the data sectors #0-#N, and writes the track parity TP output from the RWC 25 and supplied from the head IC 24 to the parity sector.

[0153] Therefore, the controller 30 can detect an error in the track parity TP based on the result of the comparison between the calculated first code CRC1op#N and the calculated second code CRC2op#N. More specifically, the controller 30 can detect an error in the track parity TP caused by a defect in the design of the XOR circuit 114, or an error in the process (e.g., restart process) in the XOR circuit 114.

[0154] Moreover, according to the embodiment, the RWC25 includes an XOR circuit 114 and a CRC XOR circuit 124 having a circuit configuration similar to that of the XOR circuit 114. The XOR circuit 114 calculates an exclusive OR for the data pieces DSe#0-#N. The second XOR circuit calculates an exclusive OR for the second code CRC2#0-#N.

[0155] The CRC XOR circuit 124 has a circuit configuration similar to that of the XOR circuit 114, except that the data to be subjected to the exclusive OR calculation is different. Therefore, by comparing the calculated first code CRC1op#N with the calculated second code CRC2op#N output by the CRC XOR circuit 124, it is possible to detect an error in the track parity TP caused by a defect in the design of the XOR circuit 114 or an error in the process (e.g., restart process) in the XOR circuit 114.

[0156] According to the embodiment, when the input of the data pieces DSb#0-#N from the HDC 23 to the RWC 25 is interrupted, the XOR circuit 114 and the CRC XOR circuit 124 interrupt the calculation of the exclusive OR, and when the input of the data pieces DSb#0-#N from the HDC 23 to the RWC 25 is resumed, the XOR circuit 114 and the CRC XOR circuit 124 execute the restart process. In the restart process, the XOR circuit 114 and the CRC XOR circuit 124 determine the timing to restart the calculation of the exclusive OR. The XOR circuit 114 and the CRC XOR circuit 124 restart the calculation of the exclusive OR at the restart timing obtained by the determination.

[0157] If an error occurs during the restart process, an incorrect value is output as the track parity TP. The controller 30 is capable of detecting the incorrectness of the track parity TP that occurs in such a case.

[0158] According to the embodiment, the data conversion in the RWC 25 includes LDPC coding, which is an error correction coding. The RWC 25 executes error detection (hard decision in the above example) corresponding to the LDPC coding on the track parity TP, and outputs the result of the error detection.

[0159] Therefore, it is possible to detect an error in the track parity TP caused by an error in the LDPC encoding circuit 113.

[0160] (Modification) In the magnetic disk device 1 of the embodiment, when an error in the track parity TP is detected, the error is recorded in the management information, and the contents recorded in the management information are used for subsequent control. The operation when an error in the track parity TP is detected is not limited to this.

[0161] A modified example when an error is detected in the track parity TP will be described below. Note that, here, a description of matters similar to those in the embodiment will be omitted.

[0162] FIG. 12 is a flowchart showing an example of the operation of the processor 26 in the modified example of the embodiment.

[0163] The processor 26 executes the process of step S601, and executes the process of step S602 if the process of step S601 returns No, as in the embodiment.

[0164] If the comparison circuit 141 detects a mismatch between the calculated first code CRC1op and the calculated second code CRC2op (S601: Yes), or if the error detection circuit 116 detects an error (S602: Yes), the processor 26 retries the write operation in units of tracks (S701) and ends the operation. When retrying the write operation in units of tracks, the processor 26 re-executes the series of processes in FIG. 12 as appropriate.

[0165] If no error is detected by the error detection circuit 116 (S602: No), the processor 26 skips the process of step S603 and ends the operation.

[0166] In this way, if an error in the track parity TP is detected, the controller 30 may retry the write operation on a track-by-track basis.

[0167] As described above, the operation when an error in the track parity TP is detected can be changed in various ways. The controller 30 can change the control over the track 50 according to the result of the comparison between the calculated first code CRC1op and the calculated second code CRC2op and the result of the error detection in the error detection circuit 116.

[0168] It should be noted that the error detection circuit 116 may be omitted from the controller 30, and the controller 30 may be configured to change the control over the track 50 depending on the result of the comparison between the calculated first code CRC1op and the calculated second code CRC2op.

[0169] In the embodiment and its modified example, the second code CRC2#x is obtained from the data piece DSb#x before data conversion for the data piece DSb#x. The timing for obtaining the second code CRC2#x is not limited to this.

[0170] For example, the RWC25 performs scrambling (S102) and run-length constrained coding (S103) of the data conversion (S102 to S104) on a portion of the data fragment DSb excluding the first code CRC1. The LDPC coding (S104) is performed on the entire data fragment DS including the first code CRC1. The RWC25 may obtain the first code CRC1 LDPC-coded from the data fragment DS after the LDPC coding (S104) as the second code CRC2.

[0171] Although some embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope and spirit of the invention, and are included in the scope of the invention and its equivalents described in the claims. [Explanation of symbols]

[0172] 1 magnetic disk device, 2 host, 11 magnetic disk, 12 spindle motor, 13 lamp, 15 actuator arm, 21 motor driver IC, 22 magnetic head, 22r read core, 22w write core, 23 HDC, 24 head IC, 25 RWC, 26 processor, 27 RAM, 28 FROM, 30 controller, 41 servo area, 42 data area, 50 track, 101 CRC generation circuit, 102 selector, 103, 124 CRC XOR circuit, 111 scramble circuit, 112 modulation coding circuit, 113 LDPC coding circuit, 114 XOR circuit, 115 selector, 116 error detection circuit, 117, 127 resume processing circuit, 120, 121-123, 130, 131-133 buffer, 141 comparison circuit.

Claims

1. A magnetic disk device connectable to a host, a magnetic disk having a track including a plurality of first sectors and a plurality of second sectors; a first circuit block that receives from the host a plurality of first data pieces to be written to the plurality of first sectors, generates a first code, adds the first code, and outputs the first data piece to which the first code has been added for each of the plurality of first data pieces, calculates an exclusive OR for a group of the first codes generated from each of the plurality of first data pieces, and outputs first information that is information obtained by calculating the exclusive OR for the group of the first codes; a second circuit block that receives a plurality of second data pieces, each of which is the plurality of first data pieces to which the first code has been added and the first information output from the first circuit block, performs data conversion on each of the plurality of second data pieces, and outputs a third data piece, which is the second data piece after the data conversion, calculates an exclusive OR for the plurality of third data pieces generated by the data conversion on each of the plurality of second data pieces, outputs parity, which is information obtained by calculating the exclusive OR for the plurality of third data pieces, following the output of the plurality of third data pieces, obtains the first code from each of the plurality of second data pieces, calculates an exclusive OR for a group of second codes, which is the first code obtained from each of the plurality of second data pieces, compares the first information with second information, which is information obtained by calculating the exclusive OR for the group of second codes, and outputs a comparison result between the second information and the first information; a magnetic head that writes the third data pieces output from the second circuit block to the first sectors and writes the parity output from the second circuit block to the second sector; A magnetic disk device comprising:

2. the second circuit block includes a first XOR circuit and a second XOR circuit having a circuit configuration similar to that of the first XOR circuit; the first XOR circuit calculates an exclusive OR for the plurality of third data pieces; The second XOR circuit calculates an exclusive OR for the second group of codes.

2. The magnetic disk drive according to claim 1.

3. The first XOR circuit and the second XOR circuit interrupting the calculation of the exclusive OR when the input of the second data pieces from the first circuit block to the second circuit block is interrupted; when the input of the plurality of second data pieces from the first circuit block to the second circuit block is resumed, determining a timing for restarting the exclusive-OR calculation, and restarting the exclusive-OR calculation at the restart timing obtained by the determination; 3. The magnetic disk drive according to claim 2.

4. the group of second codes is input to the second XOR circuit in synchronization with the input of the plurality of third data pieces to the first XOR circuit; 4. The magnetic disk drive according to claim 3.

5. The data transformation includes error correction coding on the second piece of data; the second circuit block performs error detection corresponding to the error correction coding on the parity, and outputs a result of the error detection.

5. The magnetic disk drive according to claim 1.

6. a controller that varies control over the truck in response to the results of the comparison; 5. The magnetic disk drive according to claim 1.

7. a controller that varies control over the track in response to a result of the comparison and a result of the error detection; 6. The magnetic disk drive according to claim 5.

Citation Information

Patent Citations

  • Error correction coding device, error correction- detection device, data reproducing device and communication device

    JP2000331434A

  • Magnetic disc device

    JP2022137803A

  • Xor processing incorporating error correction code data protection

    US20030066010A1

  • System and method for verifying error detection / correction logic

    US7020811B2