# Patent

## Title
Interleaving parity bits into user bits to guarantee run-length constraint

## Abstract

RLL encoding is performed to generate RLL data, including by: using a first run-length constraint and using a second run-length constraint. G is a maximum number of zeroes between two ones, I is a maximum number of zeroes between two ones in either a first subsequence or a second subsequence where the first subsequence includes odd bits associated with a DC-balanced sequence and the second subsequence includes even bits associated with the DC-balanced sequence, and S is a number of bits per symbol associated with a systematic ECC. The RLL data is encoded using the systematic ECC to obtain ECC data which includes one or more data symbols and one or more parity symbols. The data symbols and the parity symbols are interleaved.

## Background
CROSS REFERENCE TO OTHER APPLICATIONS
This application is a continuation of co-pending U.S. patent application Ser. No. 11/787,111 entitled INTERLEAVING PARITY BITS INTO USER BITS TO GUARANTEE RUN-LENGTH CONSTRAINT filed Apr. 12, 2007 which is incorporated herein by reference for all purposes.


BACKGROUND OF THE INVENTION
Forward error correction and line coding are used together in digital communications and storage technologies. These technologies find wide application, including disc drives, where high rate line codes are used. When high rate line codes are used, there is a risk of forward error correction failure from line coding error propagation. Therefore, there exists a need for a system to reduce or eliminate the risk of forward error correction failure from line coding error propagation.



BRIEF DESCRIPTION OF THE DRAWINGS
Various embodiments of the invention are disclosed in the following detailed description and the accompanying drawings.
FIG. 1 is a block diagram illustrating an embodiment of an encoding process.
FIG. 2A is a block diagram illustrating an example of a technique for error correction coding coupled with line coding in a hard disc drive system.
FIG. 2B is a block diagram illustrating an example of a reverse coding technique for error correction coding coupled with line coding in a hard disc drive system.
FIG. 3 is a block diagram illustrating an embodiment of a technique for error correction coding coupled with line coding in a hard disc drive system.
FIG. 4 is a flowchart illustrating an embodiment of a process to satisfy a specified run length constraint for a system.



DETAILED DESCRIPTION
The invention can be implemented in numerous ways, including as a process, an apparatus, a system, a composition of matter, a computer readable medium such as a computer readable storage medium or a computer network wherein program instructions are sent over optical or communication links. In this specification, these implementations, or any other form that the invention may take, may be referred to as techniques. A component such as a processor or a memory described as being configured to perform a task includes both a general component that is temporarily configured to perform the task at a given time or a specific component that is manufactured to perform the task. In general, the order of the steps of disclosed processes may be altered within the scope of the invention.
A detailed description of one or more embodiments of the invention is provided below along with accompanying figures that illustrate the principles of the invention. The invention is described in connection with such embodiments, but the invention is not limited to any embodiment. The scope of the invention is limited only by the claims and the invention encompasses numerous alternatives, modifications and equivalents. Numerous specific details are set forth in the following description in order to provide a thorough understanding of the invention. These details are provided for the purpose of example and the invention may be practiced according to the claims without some or all of these specific details. For the purpose of clarity, technical material that is known in the technical fields related to the invention has not been described in detail so that the invention is not unnecessarily obscured.
FIG. 1 is a block diagram illustrating an embodiment of an encoding process. The encoding process may be used in a digital communications device or a digital storage device, including a disc drive system.
In the example shown, data to be encoded is first processed using forward error correction with an error correction coding (“ECC”) 102 method. Forward error correction allows the reader of encoded data to detect data errors, correct data errors, or both detect and correct data errors, based on redundant data inserted in ECC 102 called parity.
The encoded data is then processed using a line coding 104 method. Line coding modulates data for a specific digital communications channel or digital storage medium. For a disc drive system, the magnetic fields or optical media must contain frequent transitions to provide sufficient information for timing control.
FIG. 2A is a block diagram illustrating an example of a technique for error correction coding coupled with line coding in a hard disc drive system. In the example shown, user data 202, ECC encoder 204, ECC decoder 212, and decoded data 214 are part of the hard disc controller. In the example shown, run-length limited (“RLL”) encoder 206, RLL decoder 210 and the hard disc 208 are part of the read channel.
In the example shown, user data 202 is first encoded using ECC encoder 204. The ECC code may be, for example, a Reed-Solomon code or a low density parity check (“LDPC”) code. The encoded data is then passed to the RLL encoder 206. RLL encoders are specified both by their rate and their run-length constraints to satisfy an intended line coding modulation shaping. Throughout this specification, an RLL encoder is expressed as a “rate-m/n (d, G/I)” RLL code, where:

    
    
        m/n is the rate of the code, the fraction of input bits m to the RLL encoder over the output bits n.
        d is the minimum number of zeroes between two ones in the encoded run length constrained sequence;
        G is the maximum number of zeroes between two ones in the encoded run length constrained sequence; and
        when looking at two different subsequences, one composed of each odd bit in the encoded DC-balanced sequence, and the other composed of each even bit in the encoded DC-balanced sequence, I is the maximum number of zeroes between two ones in either subsequence.
    
    


An example of an RLL code used in for modern hard disc systems is a rate-200/201 (0, 20/20) RLL code. This code maps a 201 bit DC balanced sequence codeword that satisfies the (0, 20/20) run-length constraints, for every 200 bit input sequence.
The main vulnerability of this technique is a problem referred to as “error propagation”; a single error within the RLL code is propagated throughout the entire RLL codeword in RLL decoder 210. For example, for a rate-200/201 (0, 20/20) RLL code in the hard disc system shown in FIG. 2A, a single bit error at point 216 going to the input of the RLL decoder 210 results in up to 200 bits in error at point 218 at the input to the ECC decoder 212. For a hard disc system with 10 bits per symbol in the ECC code, this may results in up to 20 symbol errors at ECC decoder 212. One approach to cope with this large error propagation has been using a reverse coding technique.
FIG. 2B is a block diagram illustrating an example of a reverse coding technique for error correction coding coupled with line coding in a hard disc drive system. In the example shown, user data 252, high rate RLL encoder 254, ECC encoder 256, ECC decoder 264, high rate RLL decoder 266, and decoded data 268 are part of the hard disc controller. In the example shown, low rate RLL encoder 258, low rate RLL decoder 262 and the hard disc 260 are part of the read channel.
In the example shown, user data 252 is first encoded using high rate RLL encoder 254. An example of a high rate RLL code used in the reverse coding technique for modern hard disc systems is a rate-200/201 (0, 20/20) RLL code. The output of the high rate RLL encoder 254 is the input of ECC encoder 256. The ECC code may be, for example, a Reed-Solomon code or an LDPC code. The encoded data is then passed to a low rate RLL decoder 258. An example of a low rate RLL code used in the reverse coding technique for modern hard disc systems is a rate-60/61 (0, 10/10) RLL code.
By first encoding using the high rate RLL encoder 254 before the ECC encoder 256, the high rate RLL code is protected by the parity of the ECC code. However, the resultant ECC encoded data at the output of ECC encoder 256 is not guaranteed to be run length constrained, and a low rate RLL code encoder 258 must be used.
One disadvantage of the reverse coding technique is the inefficiency of using two RLL coding schemes, since the overall RLL code rate is low due to the low rate RLL code in low rate RLL encoder 258. A second disadvantage of the reverse coding technique is that error propagation is still a vulnerability of the system. For example, for a rate-60/61 (0, 10/10) RLL code in the hard disc system shown in FIG. 2B, a single bit error at point 270 going to the input of the low rate RLL decoder 262 results in up to 60 bits in error at point 272 at the input to the low rate ECC decoder 264. For a hard disc system with 10 bits per symbol in the ECC code, this results in 6 symbol errors at ECC decoder 212.
What is disclosed is a technique for reducing all error propagation, while maintaining RLL code efficiencies. In some embodiments, this technique is a zero overhead interleaver solution. The following figure illustrates one embodiment.
FIG. 3 is a block diagram illustrating an embodiment of a technique for error correction coding coupled with line coding in a hard disc drive system. In the example shown, user data 302, high rate RLL encoder 304, ECC encoder 306, ECC decoder 314, high rate RLL decoder 316, and decoded data 318 are part of the hard disc controller. In the example shown, interleaver 308, deinterleaver 312 and the hard disc 310 are part of the read channel.
In the example shown, user data 302 is first encoded using high rate RLL encoder 304. In various embodiments, various RLL codes may be used with an initial run length constraint of (0, G/I). An example of a high rate RLL code used in this technique for modern hard disc systems is a rate-200/201 (0, 20/20) RLL code. The output of the high rate RLL encoder 304 is the input of ECC encoder 306. In some embodiments, the ECC code must be a systematic code, such that parity symbol locations are fixed and known. In various embodiments, various ECC codes may be used. The ECC code may be, for example, a systematic Reed-Solomon code or a systematic LDPC code. The encoded data is then passed to a interleaver 308. In various embodiments, interleaver 308 is a deterministic and/or uniform interleaver.
The interleaver 308 interleaves parity symbols from the output of ECC encoder 306 uniformly with the data symbols from the output of ECC encoder 306. For example, the output of the ECC encoder 306 at point 320 is defined as a vector of symbols [R^{bar} P^{bar}], where:

    
    
        R^{bar}=[R—{0}, R—{1}, . . . , R_{N}] are the data symbols; and
        P^{bar}=[P—{0}, P—{1}, . . . , P_{M}] are the parity symbols;
    
    


The interleaver 308 would then output at point 322 a vector of symbols {RP}^{bar}, such that:

    
    
        {RP}^{bar}=[R—{0}, R—{1}, . . . , R_{J−1}, P—{0}, R_{J}, R_{J+1}, . . . R—{2J−1}, P—{1}, R—{2J}, R—{2J+1}, . . . P_{M}]; and
        J is the quotient of N divided by M.
    
    


In some embodiments, with the parity symbols interleaved in the data symbols, the run-length constraints are relaxed slightly to reflect a worst-case scenario with the interleaved sequence. If the output of an ECC encoder is grouped into S bits per symbol, and the RLL code is used with an initial run length constraint of (0, G/I), it can be shown algebraically that the output of interleaver 308 at point 322, sequence {RP}^{bar}, satisfies a (0, (G+S)/(I+(S/2))) run-length constraint. In some embodiments, the constraint can be further improved by splitting the parity symbols into subsymbols and interleaving them. The interleaver is not limited to uniformly interleaving symbols. As long as the interleaving pattern is deterministic and the shortest distance between two parity symbols is no shorter than the smaller value of G and 21, the property of run length constraint holds.
By using a systematic ECC code and interleaving the parity symbols with the data symbols evenly, techniques described herein maintain the efficiency of the high rate RLL code while removing or reducing error propagation. In some embodiments, the tradeoff of using this technique is an adjustment of the initial run-length constraint (0,G/I) to the new value (0, (G+S)/(I+(S/2))).
FIG. 4 is a flowchart illustrating an embodiment of a process to satisfy a specified run length constraint for a system. The process may be implemented in interleaver 308.
In a step 402, the received symbols are received from high rate RLL encoder 304 and ECC encoder 306. The data symbols satisfy an initial run length constraint (0,G/I) as specified by the RLL code. The ECC code is a systematic code with S bits per symbol, such that data symbols are distinguishable from parity symbols.
In a step 404, the data symbols are interleaved uniformly with the parity symbols. For example, the received symbols are defined as a vector of symbols [R^{bar}P^{bar}], where:

    
    
        R^{bar}=[R—{0}, R—{1}, . . . , R_{N}] are the data symbols; and
        P^{bar}=[P—{0}, P—{1}, . . . , P_{M}] are the parity symbols;
    
    


The data and parity symbols are interleaved to produce a vector of symbols {RP}^{bar}, such that:

    
    
        {RP}^{bar}=[R—{0}, R—{1}, . . . , R_{J−1}, P—{0}, R_{J}, R_{J+1}, . . . R—{2J−1}, P—{1}, R13 {2J}, R—{2J+1}, . . . P_{M}]; and
        J is the quotient of N divided by M.
    
    


Although the foregoing embodiments have been described in some detail for purposes of clarity of understanding, the invention is not limited to the details provided. There are many alternative ways of implementing the invention. The disclosed embodiments are illustrative and not restrictive.

## Claims

1. A method of processing data, including:
performing run length limiting (RLL) encoding to generate RLL data, including by:
using a first run-length constraint of (0, G/I); and
using a second run-length constraint of (0, (G+S)/(I+(S/2))), wherein:
G is a maximum number of zeroes between two ones;
I is a maximum number of zeroes between two ones in either a first subsequence or a second subsequence where the first subsequence includes odd bits associated with a DC-balanced sequence and the second subsequence includes even bits associated with the DC-balanced sequence; and
S is a number of bits per symbol associated with a systematic error correction code (ECC);


encoding the RLL data using the systematic ECC to obtain ECC data which includes one or more data symbols and one or more parity symbols; and
using a processor to interleave the data symbols with the parity symbols.

2. The method recited in claim 1, wherein the systematic ECC includes one or more of the following: a Reed Solomon code or a low density parity check (LDPC) code.

3. The method recited in claim 1, wherein the method is performed by one or more of the following: a communications device, a storage device, or a disc drive system.

4. The method recited in claim 1, wherein using the processor to interleave includes uniformly interleaving the data symbols with the parity symbols.

5. The method recited in claim 1, wherein using the processor to interleave includes:
dividing the parity symbols into a plurality of subsymbols; and
interleaving the plurality of subsymbols.

6. The method recited in claim 1, wherein using the processor to interleave includes interleaving the data symbols, R^{bar}=[R—{0}, R—{1}, . . . , R_{N}], with the parity symbols, P^{bar}=[P—{0}, P—{1}, . . . , P_{M}], to produce a vector of symbols {RP}^{bar}, such that {RP}^{bar}=[R—{0}, R—{1}, . . . , R_{J−1}, P—{0}, R_{J}, R_{J+1}, . . . , R—{2J−1}, P—{1}, R—{2J}, R—{2J+1}, . . . P_{M}] where J is a quotient of N divided by M.

7. A system for processing data, including:
a run length limiting (RLL) encoder configured to generate RLL data, including by:
using a first run-length constraint of (0, G/I); and
using a second run-length constraint of (0, (G+S)/(I+(S/2))), wherein:
G is a maximum number of zeroes between two ones;
I is a maximum number of zeroes between two ones in either a first subsequence or a second subsequence where the first subsequence includes odd bits associated with a DC-balanced sequence and the second subsequence includes even bits associated with the DC-balanced sequence; and
S is a number of bits per symbol associated with a systematic error correction code (ECC);


an encoder configured to encoding the RLL data using the systematic ECC to obtain ECC data which includes one or more data symbols and one or more parity symbols; and
an interleaver configured to interleave the data symbols with the parity symbols.

8. The system recited in claim 7, wherein the systematic ECC includes one or more of the following: a Reed Solomon code or a low density parity check (LDPC) code.

9. The system recited in claim 7, wherein the system is included in one or more of the following: a communications device, a storage device, or a disc drive system.

10. The system recited in claim 7, wherein the interleaver is configured to interleave including by: uniformly interleaving the data symbols with the parity symbols.

11. The system recited in claim 7, wherein the interleaver is configured to interleave including by:
dividing the parity symbols into a plurality of subsymbols; and
interleaving the plurality of subsymbols.

12. The system recited in claim 7, wherein the interleaver is configured to interleave including by: interleaving the data symbols, R^{bar}=[R—{0}, R—{1}, . . . , R_{N}], with the parity symbols, P^{bar}=[P—{0}, P—{1}, . . . , P_{M}], to produce a vector of symbols {RP}^{bar}, such that {RP}^{bar}=[R—{0}, R—{1}, . . . , R_{J−1}, P—{0}, R_{J}, R_{J+1}, . . . R—{2J−1}, P—{1}, R—{2J}, R—{2J+1}, . . . P_{M}] where J is a quotient of N divided by M.

13. A computer program product for processing data, the computer program product being embodied in a tangible computer readable storage medium and comprising computer instructions for:
performing run length limiting (RLL) encoding to generate RLL data, including by:
using a first run-length constraint of (0, G/I); and
is using a second run-length constraint of (0, (G+S)/(I+(S/2))), wherein:
G is a maximum number of zeroes between two ones;
I is a maximum number of zeroes between two ones in either a first subsequence or a second subsequence where the first subsequence includes odd bits associated with a DC-balanced sequence and the second subsequence includes even bits associated with the DC-balanced sequence; and
S is a number of bits per symbol associated with a systematic error correction code (ECC);


encoding the RLL data using the systematic ECC to obtain ECC data which includes one or more data symbols and one or more parity symbols; and
interleaving the data symbols with the parity symbols.

14. The computer program product recited in claim 13, wherein the systematic ECC includes one or more of the following: a Reed Solomon code or a low density parity check (LDPC) code.

15. The computer program product recited in claim 13, wherein the computer instructions for interleaving include computer instructions for uniformly interleaving the data symbols with the parity symbols.

16. The computer program product recited in claim 13, wherein the computer instructions for interleaving include computer instructions for:
dividing the parity symbols into a plurality of subsymbols; and
interleaving the plurality of subsymbols.

17. The computer program product recited in claim 13, wherein the computer instructions for interleaving include computer instructions for interleaving the data symbols, R^{bar}=[R—{0}, R—{1}, . . . , R_{N}], with the parity symbols, P^{bar}=[P—{0}, P—{1}, . . . , P_{M}], to produce a vector of symbols {RP}^{bar}, such that {RP}^{bar}=[R—{0}, R—{1}, . . . , R_{J−1}, P—{0}, R_{J}, R_{J+1}, . . . R—{2J−1}, P—{1}, R—{2J}, R—{2J+1}, . . . P_{M}] where J is a quotient of N divided by M.