# Patent

## Title
Modulation coding and decoding

## Abstract

Methods and apparatus are provided for modulation coding a stream of binary input data. A 4-ary enumerative encoding algorithm is applied to the input bit-stream to produce a succession of 4-ary output symbols. The 4-ary algorithm is operative to simultaneously encode respective generalized Fibonacci codes in the odd and even interleaves of the input bit-stream. The bits of each successive 4-ary output symbol are then interleaved, producing an output bit-stream which has global and interleaved run-length constraints. Inverting the bits of the 4-ary output symbols produces an output bit-stream with (G, I)-constraints as in the PRML (G, I) codes used in reverse-concatenation modulation systems. Corresponding decoding systems are also provided.

## Background
This application claims priority to European Patent Application No. 07120162.8, filed 7 Nov. 2007, and all the benefits accruing therefrom under 35 U.S.C. §119, the contents of which in its entirety are herein incorporated by reference.
BACKGROUND
This invention relates generally to methods and apparatus for modulation coding input data and to corresponding modulation decoding systems.
Modulation codes are employed in data storage systems to eliminate undesirable bit-sequences in the recording data, for example bit sequences which give rise to errors in the reproduction process. One example of an undesirable bit-sequence is a long run of bits of the same value. Another example is a long run of bits of the same value in alternating positions in the bit stream, i.e. in either the odd (O) or even (E) interleave of a bit stream . . . EOEOEO . . . . For instance, a long sequence of the form 0a0b0c0d0 . . . , where a, b, c, etc. can be either 0 or 1, would be generally undesirable. Modulation codes impose some form of constraint on the occurrence of undesirable bit-sequences in the encoded bit-stream. For example, some modulation codes impose a so-called j-constraint, whereby the maximum length of a run of consecutive 1's in the encoded bit-stream is limited to the predetermined value j. Other modulation codes impose a constraint on the maximum run-length of consecutive 0's. This is referred to as a k- or G-constraint, whereby the maximum run-length of consecutive 0's is limited to the value k or G respectively. An example of the latter code-type is provided by the PRML (G, I) codes used in PRML (partial-response maximum likelihood) based recording systems such as tape drives and optical storage systems. In addition to the “global” or G-constraint, these codes impose an “interleave” or I-constraint. This limits the maximum run-length of 0's in each of the odd and even interleaves to the value I. An I-constrained bit-stream is of course necessarily G-constrained with G=21.
PRML (G, I)-codes are particularly useful for reverse concatenation (RC) modulation schemes, where the modulation coding is performed prior to error-correction coding (ECC). Error propagation is reduced in RC schemes because the ECC decoder operates before the modulation decoder on reproduction. That is, if the ECC decoder makes no errors, there is no error propagation through the modulation decoder. Thus, RC allows the use of long modulation codes (i.e. codes with long codeword lengths), facilitating the design of high-rate codes and encoders which operate close to the capacity of the selected constraint. To be useful, however, these codes need to have a practical implementation based on efficient encoding and decoding algorithms.
A practical encoder for imposing a k-constraint in the encoded bit-stream is disclosed in U.S. Pat. No. 5,760,718. This implements an enumerative encoding technique based on the class of generalized Fibonacci codes. Enumerative encoding is discussed in “Enumerative Source Encoding”, T. M. Cover, IEEE Trans. Inform. Theory, Vol. 19, pp. 73-77, January 1973. Fibonacci codes are discussed in “Fibonacci Codes for Synchronisation Control”, W. H. Kautz, IEEE Trans. Inform. Theory, Vol. 11, pp. 284-292, April 1965. While reference is made to the foregoing papers for a detailed discussion, it is useful here to give a brief explanation of these techniques to assist understanding of the invention to be described.
In simple terms, enumerative encoding is a process of mapping input words to output codewords based on lexicographic ordering of the codewords. That is, if a set of X binary codewords are ordered according to binary value, then each codeword can be assigned a number from 1 to X according to its position in the ordered set. If each of these assigned numbers 1 to X then defines the value of a binary input word, each of the X binary input words is associated with a corresponding codeword. Enumerative encoding is the process of mapping input words to output codewords in accordance with this type of scheme. While the underlying encoding principle is simple enough, the problem in practice lies in designing an efficient encoder for generating the codewords from the binary input words. If there are 2100 codewords for example, then the need for an efficient encoder design is readily apparent.
Fibonacci codes are characterised by a set of weights, also called bases, which define the value of a binary 1 at respective positions in a binary codeword representation. That is, a 1 at a given position in a binary codeword represents the value of the Fibonacci base for that position rather than the usual power of two. As a simple example, consider a Fibonacci code defined by a set of N=7 bases given by {wn}=1, 2, 3, 5, 8, 13, 21. It can be seen that the bases satisfy the linear recursion

wn+1=wn+wn−1 for n=2, 3, . . . , 6

The complete set of (N=7)-bit Fibonacci codewords can represent wN+1=(13+21)=34
possible values. Since 34≧25, this simple Fibonacci code can encode 5-bit inputs into codewords of length N=7 by an enumerative encoding process. This encoding process is defined by

u=ΣxiwN−i+1 for i=1 to 7

where u is the input word value and (x1, x2, . . . , x7) is the output codeword. The encoding process is performed by successive subtraction of the Fibonacci bases from the input word value as illustrated in FIG. 1 of the accompanying drawings. In particular, the number u is successively reduced by whichever of the bases wn, taken in decreasing value order, does not give a negative result. If a given weight wN−i+1 is actually subtracted from the running difference, then xi=1. Otherwise xi=0.

Consideration of FIG. 1 demonstrates that this simple Fibonacci code imposes a j=1 constraint, i.e. no more than one consecutive 1's can occur in a codeword. With generalized Fibonacci codes, the bases wn for n=1 to N satisfy the following linear recursion (inequality)

wn+1≦wn+wn−1+ . . . +wn−j for n=j+1, j+2, . . . , N−1

where the specified positive integer j defines the j-constraint of the code. The maximum number of codewords in such a generalized Fibonacci code is given by

wN+1=wN+wN−1+ . . . +wN−j. 

As with the simple code of FIG. 1, a binary codeword (x1, x2, . . . , xN) in the generalized Fibonacci code is obtained by representing an input u, 0≦u<wN+1, by the bases {wn}, i.e.

u=ΣxiwN−i+1.

For implementation purposes, as described in U.S. Pat. No. 5,760,718 referenced above, the bases are chosen to have a limited span L, i.e.

wn=Bn2n−1 

where Bn is in the range 2−1≦Bn≦1 and has an L-bit representation. With bases of span L, encoding can be performed in a sliding window fashion, using an (L+1)-bit wide window which runs from the most significant bits of Σ uk2k to the least significant bits.

Based on similar enumerative encoding ideas to those of U.S. Pat. No. 5,760,718, U.S. Pat. Nos. 7,064,687 and 7,071,851 disclose encoders and decoders designed for PRML (G, I) codes. These are derived from generalized Fibonacci codes. In particular, an input bit-stream is separated into its odd and even interleaves, and the two interleaves are then encoded by separate Fibonacci encoders. Since Fibonacci codes impose a j-constraint on runs of 1's, bit inversion of the encoder outputs results in two encoded bit streams each with a constraint on runs of 0's. A multiplexer then interleaves the encoded bit streams to give a single, (G, I)-constrained output bit-stream with G=2I, where I equals the value of j for the original Fibonacci code. In the modulation encoder of U.S. Pat. No. 7,064,687, a short block encoder is required to encode a subset of the input data bits prior to separation of the odd and even interleaves. This imposes an initial constraint on the input bit-stream to limit the possible inputs to the two Fibonacci encoders. While this offers a practical implementation, the need for efficient Boolean logic for the short block code makes it difficult to achieve very high rates for the resulting PRML (G, I) code.
SUMMARY
A first aspect of the present invention provides a method for modulation coding a stream of binary input data. The method comprises:

    
    
        applying a 4-ary enumerative encoding algorithm to the input bit-stream to produce a succession of 4-ary output symbols, the 4-ary algorithm being operative to simultaneously encode respective generalized Fibonacci codes in the odd and even interleaves of the input bit-stream; and
        interleaving bits of each successive 4-ary output symbol to produce an output bit-stream.
    
    


A second aspect of the invention provides a method for decoding an output bit-stream produced by a modulation coding method according to the first aspect of the invention. The decoding method comprises:

    
    
        de-interleaving bits of the output bit stream to produce a succession of 4-ary symbols; and
        applying a 4-ary enumerative decoding algorithm to the 4-ary symbols to simultaneously decode said generalized Fibonacci codes applied to said odd and even interleaves by said 4-ary encoding algorithm, thereby to recover said stream of binary input data.
    
    


A third aspect of the invention provides apparatus for modulation coding a stream of binary input data. The modulation coding apparatus comprises:

    
    
        a 4-ary encoder for applying a 4-ary enumerative encoding algorithm to the input bit-stream to produce a succession of 4-ary output symbols, the 4-ary algorithm being operative to simultaneously encode respective generalized Fibonacci codes in the odd and even interleaves of the input bit-stream; and
        a multiplexer for interleaving bits of each successive 4-ary output symbol to produce an output bit-stream.
    
    


A fourth aspect of the invention provides apparatus for decoding an output bit-stream produced by modulation coding apparatus according to the third aspect of the invention. The decoding apparatus comprises:

    
    
        a demultiplexer for de-interleaving bits of the output bit stream to produce a succession of 4-ary symbols; and
        a 4-ary decoder for applying a 4-ary enumerative decoding algorithm to the 4-ary symbols to simultaneously decode said generalized Fibonacci codes applied to said odd and even interleaves by said 4-ary encoding algorithm, thereby to recover said stream of binary input data.
    
    


A fifth aspect of the invention provides a data storage system comprising:

    
    
        modulation coding apparatus according to the third aspect of the invention for modulation coding a stream of binary input data comprising a succession of M-bit words to produce an output bit-stream comprising a succession of 2N-bit codewords;
        a recording channel comprising a storage medium and a recording/reproduction mechanism for recording the succession of codewords on the storage medium and for reading the storage medium to generate a reproduced signal;
        detector apparatus for detecting a succession of 2N-bit words in the reproduced signal;
        a demultiplexer for de-interleaving bits of the detected 2N-bit words to produce a succession of 4-ary symbols; and
        a 4-ary decoder for applying a 4-ary enumerative decoding algorithm to the 4-ary symbols of each 2N-bit word to simultaneously decode said generalized Fibonacci codes applied to said odd and even interleaves by said 4-ary encoding algorithm, thereby to produce a succession of M-bit data words.
    
    


In such data storage systems, the succession of 2N-bit codewords produced in the modulation apparatus will typically undergo various further processing steps, such as precoding and ECC coding in the case of PRML systems, prior to being recorded in the channel. In preferred embodiments, PRML (G, I) codes are employed in a reverse concatenation modulation scheme, whereby the data storage system includes a precoder for 1/(1+D2) coding the output bit-stream from the modulation coding apparatus to produce a precoded bit-stream, and an ECC coder for error-correction coding the precoded bit-stream to produce an ECC-coded bit-stream for supply to the recording channel. The detector apparatus then includes an ECC decoder for correcting errors in the 2N-bit words detected in the reproduced signal.
Systems can of course be envisaged which permit reading of a recording medium but not writing to the medium, an example being a read-only CD or DVD player. Such systems may thus employ decoding apparatus embodying the invention without having the corresponding encoding apparatus. In particular, a sixth aspect of the invention provides a data reproduction system for reproducing data recorded on a storage medium by a recording system implementing a modulation coding method according to the first aspect of the invention. The data reproduction system comprises:

    
    
        a read mechanism for reading the storage medium to generate a reproduced signal;
        detector apparatus for detecting a succession of 2N-bit words in the reproduced signal;
        a demultiplexer for de-interleaving bits of the detected 2N-bit words to produce a succession of 4-ary symbols; and
        a 4-ary decoder for applying a 4-ary enumerative decoding algorithm to the 4-ary symbols of each 2N-bit word to simultaneously decode said generalized Fibonacci codes applied to said odd and even interleaves by the 4-ary encoding algorithm of said modulation coding method, thereby to produce a succession of M-bit data words.
    
    


In general, where features are described herein with reference to embodiments of one aspect of the invention, corresponding features may be provided in embodiments of another aspect of the invention.



BRIEF DESCRIPTION OF THE DRAWINGS
Preferred embodiments of the invention will now be described, by way of example, with reference to the accompanying drawings in which:
FIG. 1 illustrates an encoding process using a simple Fibonacci code;
FIG. 2 is a schematic block diagram of a data storage system embodying the invention;
FIG. 3 is a block diagram of a modulation encoder of the FIG. 2 system;
FIG. 4 is a block diagram of a modulation decoder of the FIG. 2 system;
FIG. 5 gives a breakdown of processing steps performed in operation of the encoding algorithm implemented by the modulation encoder of FIG. 3;
FIGS. 6 and 7 tabulate the bases of respective Fibonacci codes employed in embodiments of the modulation encoder of FIG. 3; and
FIG. 8 compares three PRML (G, I) codes employed in embodiments of the modulation encoder.



DETAILED DESCRIPTION
As described earlier, in the prior art techniques two separate binary encoding algorithms operate independently on the separated odd and even interleaves of an input bit-stream. In contrast, with the modulation technique of this invention, the 4-ary enumerative encoding algorithm operates on the succession of binary input bits forming the (O/E-interleaved) input bit-stream to Fibonacci encode the odd and even interleaves simultaneously as a single enumerative code with 4-ary output symbols. This single code will be referred to herein as an “interleaved Fibonacci code”. In accordance with the principle of enumerative encoding discussed above, the 4-ary algorithm of the interleaved Fibonacci code thus maps M-bit words of the input bit-stream, according to value, to an ordered set of output codewords with 4-ary symbols. The 4-ary symbols are each represented by two parallel bits, and these are then interleaved for the succession of output symbols to produce a binary output stream with Fibonacci-encoded odd and even interleaves. The inherent properties of Fibonacci codes explained earlier provide an output bit-stream with global and interleaved run-length constraints. While applications might be envisaged where the constraint is required on the maximum run-length of 1's, bit-inversion results in a (G, I)-constraint suitable for the PRML codes discussed above.
It will be seen from the foregoing that, with the modulation technique of the present invention, a single 4-ary enumerative encoder is sufficient to generate both the odd and even interleaves of the output bit-stream as compared with the two encoders required by the prior art. In addition, no short block encoder is required. Furthermore, the modulation technique enables one to fully exploit all the codewords of the underlying generalized Fibonacci codes, and thus easily achieve the maximum possible length of the PRML (G, I) code. This results in the highest possible rate for the PRML code. In contrast, achieving this maximum length can be very difficult for the modulation encoder of U.S. Pat. No. 7,064,687 due to the difficulty in designing efficient Boolean logic for the short block code, particularly at rates above 13/14.
For applications such as PRML codes where the bits of the 4-ary output symbols are inverted, the inversion can of course be performed either before or after interleaving of the symbol bits.
In general, the Fibonacci codes encoded in the O/E interleaves of the output by the 4-ary algorithm may be different codes or the same code, though more usually the same code will be used. In any case, in preferred embodiments, the bases of the underlying Fibonacci code(s) have a limited span, allowing the encoding process to be performed in a sliding window fashion.
The block diagram of FIG. 2 is a schematic representation of a data storage system embodying the invention showing the main components involved in the recording/reproduction process. In this embodiment, the data storage system is a tape drive, indicated generally at 1, and thus has a recording channel 2 having a read/write head 3 for reading and writing to magnetic tape 4. On the recording side, the tape drive 1 has modulation coding apparatus in the form of a PRML (G, I) encoder 5, a precoder 6, and an ECC coder indicated generally at 7. ECC coder 7 consists of RS (Reed-Solomon) parity generator 8 and partial interleaver 9. On the reproduction side the drive 1 includes detector apparatus, indicated generally at 11 and comprising a detector 12 and an ECC decoder 13, together with a modulation decoder 14.
In operation, data to be recorded is supplied to PRML encoder 5 in the form of an input bit-stream comprising a succession of M-bit data words. The encoder 5 performs modulation coding of the input data as detailed below to produce a (G, I)-constrained encoded bit-stream comprising a succession of 2N-bit codewords. As usual in modulation systems based on PRML (G, I) codes, the encoded bit-stream is then subject to 1/(1+D2) precoding by precoder 6, where “+” here signifies modulo-2 addition. In accordance with the reverse concatenation concept discussed earlier, ECC coding is performed after modulation coding in this embodiment. In this case, ECC coding involves partial interleaving of parity symbols in the codeword stream from precoder 6. Unconstrained RS parity symbols are generated in known manner from the 2N-bit codewords by parity generator 8. These symbols are then inserted at desired points in the encoded bit stream by partial interleaver 9. The resulting ECC-coded bit-stream is then recorded on tape 4 after the usual signal processing in channel 2. On reproduction, the reproduced signal obtained by reading tape 4 is supplied, after the usual reproduction signal processing, to detector 12. The detector 12 is typically a soft-input/hard output detector like the Viterbi detector, or a soft-input/soft output detector, which provides a likelihood measure for each recorded bit, and detects 2N-bit words in the reproduced signal in known manner. Parity checking and error correction processing is then performed in known manner by ECC decoder 13. The resulting succession of 2N-bit words is then supplied to modulation decoder 14 which operates as detailed below to produce a succession of M-bit words corresponding to the original input data.
Operation of the modulation encoder 5 and decoder 14 of tape drive 1 will now be described in detail with reference to FIGS. 3 and 4. While in principle these components could be implemented in software or a combination of hardware and software, in practice implementation in hardwired logic is preferred for simplicity and speed of operation. Suitable implementations will be apparent to those skilled in the art from the description herein.
As illustrated in FIG. 3, PRML (G, I) encoder 5 comprises a 4-ary enumerative encoder 16, a multiplexer 17 and an inverter 18. Briefly, encoder 16 applies a 4-ary enumerative encoding algorithm to the input bit-stream to implement an interleaved Fibonacci code as defined above. That is, the encoder 16 operates to simultaneously encode respective generalized Fibonacci codes in the odd and even interleaves of the input bit-stream as a single enumerative code with 4-ary output symbols. For each M-bit word in the input bit-stream, encoder 16 generates a succession of N 4-ary output symbols as indicated by the bold line in the figure. The 4-ary symbols are each represented by two bits. These bits are then interleaved by multiplexer 17 for the succession of 4-ary symbols to produce a binary output stream of 2N bits for each input M-bit word. Bit-inversion is then performed by inverter 18 so that the resulting modulation encoded bit-stream consists of a succession of 2N-bit codewords satisfying a (G, I) constraint as explained above.
In accordance with the principles of enumerative encoding, the 4-ary enumerative encoding algorithm implemented by encoder 16 maps input M-bit words directly to 4-ary codewords in dependence on the value of the input word. The 4-ary algorithm of this embodiment is applied in encoder 16 as an iterative process which produces one 4-ary symbol, represented by a binary output pair (xoi, xei), for each iteration step i. For an interleaved Fibonacci code IF to simultaneously encode two underlying Fibonacci codes each with N defined bases {wn}, n=1 to N, the algorithm maps an input word (uM−1, uM−2 . . . , u0) of value uIF=Σuk2k, k=0 to M−1, to a 4-ary codeword ((xo1, xe1), (xo2, xe2), . . . (xoN, xeN)) in dependence on uIF. In particular, given an input uIF in the range

0≦uIF<(wN+1)2 

the algorithm is as follows.
















Initialization: Uo=wN+1, Ue=wN+1, u=uIF.



For i=1 to N do {



 Compute partial lexicographic indices vo, ve and partitioning



indices N00, N01, N10:



  vo=min{wN−i+1, Uo}, ve=min{wN−i+1, Ue}



  N00= vove, N01= voUe, N10= N01+(Uo−vo)ve



 Compute time-i output (xoi, xei) and update input u:



  if u<N00, then xoi=0 , xei =0



  else if N00≦ u<N01 then xoi =0 , xei =1, u=u−N00



  else if N01≦ u<N10, then xoi =1, xei =0, u=u−N01



  else xoi =1 , xei =1, u=u−N10



 Update upper bounds:



  Uo=min{ wN−i+1, Uo − xoi wN−i+1 },



  Ue=min{ wN−i+1, Ue − xei wN−i+1}



}










Consideration of the above shows that the algorithm essentially involves initialising an input value u to the M-bit word value uIF and then, for each iteration i of i=1 to N, calculating values for the variables N00, N01, N10 and generating an output symbol (xoi, xei) by comparing the input value u with N00, N01, N10. The variables N00, N01, N10 are referred to herein as “partitioning indices” since they serve to partition the range of possible input values u for each iteration into four sub-ranges:

u<N00;

N00≦u<N01;

N01≦u<N10; and

u≧N10.

For each iteration, the range of possible input values u is 0≦u<UoUe, where Uo and Ue are the odd and even upper bounds at iteration i prior to the updating. Since the initial input value uIF is an M-bit word and since 0≦uIF<2M≦(wN−1)2, the partitioning indices for the first iteration i=1 partition the range of possible M-bit values into four. In more detail, the generation of an output symbol (xoi, xei) involves:
calculating the partitioning indices N00, N01, N10;
comparing the current input value u to the partitioning indices to determine which of the four sub-ranges defined above contains that input value;
setting the two bits of (xoi, xei) according to which particular sub-range contains the input value; and
updating the input value by subtracting from the current value of u the lower boundary value of the sub-range containing that value of u. (Here, the updated input value will be unchanged if u lies in the lowest sub-range since the lower boundary value is then zero).
The partitioning indices N00, N01, N10 are calculated from first and second pairs of “partial lexicographic indices” vo, ve and Uo, Ue. The indices vo, ve are referred to hereinafter as lower partial lexicographic indices, and the upper bounds Uo, Ue are referred to hereinafter as upper partial lexicographic indices. These value pairs are referred to as partial indices in that each value of the pair is associated with a respective one of the odd and even interleaves of the binary output stream from inverter 17, and hence, in effect, with one or other of the underlying Fibonacci codes in the interleaved Fibonacci code. As indicated in the above algorithm, the partial lexicographic indices of each pair vo, ve and Uo, Ue are dependent on respective Fibonacci bases selected in dependence on the iteration number i (that is, wN−i+1). Note that, if the underlying Fibonacci codes are different, the appropriate base from one code will be used for calculating vo, Ue, and the appropriate base from the other code will be used for ve and Ue. However, in preferred embodiments of encoder 16 the underlying Fibonacci codes are the same, and particularly preferred examples will be described below. Moreover, in preferred embodiments the underlying Fibonacci codes have bases with limited span L as defined earlier. In this case, the encoder 16 operates as a sliding window encoder of width 2L+2 as will be apparent to those skilled in the art.
FIG. 4 shows the modulation decoder 14 corresponding to PRML (G, I) encoder 5. As illustrated, the decoder 14 comprises an inverter 20, a demultiplexer 21 and 4-ary decoder 22. Inverter 20 receives the succession of 2N-bit words detected from the reproduced signal, and inverts the bits to provide a binary output stream to demultiplexer 21. This de-interleaves the odd and even bits of the received binary stream to produce a succession of N 4-ary output symbols (xo, xe) for each detected 2N-bit word. Each group of N 4-ary symbols are then decoded by 4-ary decoder 22 to recover an output M-bit word corresponding to an M-bit word in the original steam of input data. 4-ary decoder 22 implements the inverse of the encoding algorithm applied by encoder 16, and thus applies a 4-ary enumerative decoding algorithm to simultaneously decode the underlying Fibonacci codes of the interleaved Fibonacci code applied by the 4-ary encoder. In successive iteration steps, the algorithm processes the pair of bits of successive 4-ary symbols (xoi, xei). In particular, given codewords xo1, xo2, . . . , xoN, and xe1, xe2, . . . , xeN of the underlying Fibonacci codes in the odd and even interleaves, the algorithm is as follows.















Initialization: UoN=wN+1, UeN= wN+1, u=0



Pre-processing (Pre-compute and store all upper partial



lexicographic indices):



For i=1 to N−1 do {



 UoN−i=min{wN−i+1, UoN−i+1 − xoiwN−i+1},



 UeN−i=min{wN−i+1, UeN−i+1 − xeiwN−i+1}



 }



For i=N down to 1 do {



 Compute lower partial lexicographic indices vo, ve and partitioning



indices N00, N01, N10:



  vo=min{ wN−i+1, Uoi }, ve=min{ wN−i+1, Uei }



  N00= vove , N01= vo Uei , N10= N01+(Uoi−vo)ve



 Update enumerative index (=decoder output) u:



  if (xoi=0 , xei=0) then u=u



  else if (xoi =0 , xei=1) then u=u+N00



  else if (xoi =1 , xei=0) then u=u+N01



  else u=u+N10



 }










As before, the bases wN−i+1 for the odd an even indices of pairs vo, ve an Uoi, Uei can be different if the underlying Fibonacci codes differ, and the decoder operates as a sliding window decoder of width 2L+2 in the preferred case where the bases have limited span L.
The table of FIG. 5 gives an indication of the level of complexity of the 4-ary encoder operation as a breakdown of the numbers of different types of processing steps required per iteration. The critical complexity lies in the numbers of multiplications required. As indicated in the table, only three multiplications of (L+1)-bit numbers are required where the Fibonacci bases have limited span L. The complexity of the decoding algorithm is even less since there is no need for comparisons of (L+1)-bit numbers. In terms of storage requirements, where the underlying Fibonacci codes in the odd and even interleaves are identical with bases of span L, the 4-ary encoder need only store the N L-bit base elements. The decoder additionally needs to store 2N upper partial lexicographic indices which are L-bit numbers.
It will be appreciated that the 4-ary enumerative encoding techniques described above lead to highly efficient modulation encoding and decoding systems. These techniques allow all the codewords of the underlying generalized Fibonacci codes to be fully exploited, facilitating achievement of the maximum possible length of the PRML (G, I) code. This allows the highest possible rates to be achieved for the PRML codes. The resulting gains in code-rate support the use of partial interleaving of non-constrained symbols as in the RC scheme of FIG. 2. Moreover, the high-rate coding techniques lend themselves to use with ECC techniques based on LDPC (low-density parity-check) codes or turbo coding schemes which require message passing of soft information from the detector to the encoder. Particular examples of preferred PRML codes for embodiments of the invention will now be described with reference FIGS. 6 to 8.
Three rate (2N-P)/2N codes will be described (i.e. M=2N-P) in the following. In each case the two underlying Fibonacci codes in the interleaved Fibonacci code are the same. In the first code, P=1. The bases wn=Bn2n−1, n=1, 2, N=118 for the underlying j=7 generalized Fibonacci code of span L=9 are defined by:

Bn29=512 for n=1, 2, . . . , 5

Bn29=496 for n=6, 7, . . . , 9

Bn29=505-n for n=10, 11, . . . , 118.

These bases provide an interleaved Fibonacci code of length 236 and rate 235/236. The resulting PRML-code satisfies an I=7 and G=14 constraint within codewords and across codeword boundaries of concatenated codewords. This PRML code supports partial symbol interleaving of 8-bit RS parity bytes at any desired locations spaced by at least 16 bit positions. The insertion of such unconstrained bytes weakens the modulation constraints to I=11 and G=22. Any PRML-code obtained by using fewer than the N=118 base elements satisfies the same modulation constraints as the longer code, and shorter PRML-codes with the same constraints can be easily constructed, e.g. a rate-223/224 code.
In the second and third codes, P=3. By choosing code rates of this form, i.e. (2N-3)/2N, it was possible to design two very high rate codes of length 200 and 400 respectively. The first of these is a PRML(G=10, I=5) code of rate 197/200. This code is fully defined by the bases and j-profile of the underlying generalized Fibonacci code, with N=100 and j=5, set out in the table of FIG. 6. The second is a PRML(G=12I=6) code of rate 397/400. For this code, the bases of the underlying generalized Fibonacci code, with N=100 and j=6, are set out in the table of FIG. 7. The j-constraint profile of the underlying Fibonacci code is j(n)=6 within the codewords, i.e., for n=6, 7, . . . , 199. At the boundaries, the following j-constraints apply:
at the left boundary: j(1)=1, j(2)=2, j(3)=3, j(4)=3, j(5)=4, j(6)=5;
at the right boundary: j(200)=3.
Thus, the j=6 constraint applies within codewords and across codeword boundaries. The resulting PRML code thus satisfies the constraints G=12 and I=6 within codewords and across codeword boundaries.
The three codes described above have the following characteristic properties as demonstrated by the comparison table of FIG. 8: the PRML(G=14,I=7) code has the highest rate but the weakest constraints; the PRML(G=10,I=5) code has the tightest constraints but the lowest rate; the PRML(G=12,I=6) code is a good compromise of the two other codes in that it has constraints of intermediate strength and achieves almost the rate of the PRML(14,7) code. All three codes support partial symbol interleaving of non-constrained parity symbols at any insertion locations which are sufficiently spaced.
While preferred embodiments of the invention have been described above, many changes and modifications can be made without departing from the scope of the invention.

## Claims

1. A method for modulation coding a stream of binary input data, the method comprising:
applying a 4-ary enumerative encoding algorithm to the input bit-stream to produce a succession of 4-ary output symbols, the 4-ary algorithm being operative to simultaneously encode respective generalized Fibonacci codes in the odd and even interleaves of the input bit-stream; and
interleaving bits of each successive 4-ary output symbol to produce an output bit-stream.

2. The method of claim 1, further comprising including inverting the bits of the 4-ary output symbols to produce a (G, I)-constrained output bit-stream.

3. The method of claim 1, wherein the 4-ary algorithm is operative to simultaneously encode the same Fibonacci code in the odd and even interleaves.

4. The method of claim 1, wherein the bases of each Fibonacci code have a limited span.

5. The method of claim 1, wherein an output bit-stream comprising a succession of 2N-bit codewords is produced from a succession of M-bit words in the input bit-stream, and wherein the 4-ary algorithm comprises, for each M-bit word, initialising an input value to the M-bit word value and then, for each iteration i of i=1 to N:
calculating partitioning indices for partitioning the range of possible input values into four sub-ranges;
comparing the input value to the partitioning indices to determine which sub-range contains the input value;
producing a 4-ary output symbol of value dependent on the sub-range containing the input value; and
updating the input value by subtracting the lower boundary value of the sub-range containing the input value.

6. The method of claim 5, wherein the partitioning indices are calculated from first and second pairs of partial lexicographic indices, the partial lexicographic indices of each pair being dependent on respective Fibonacci bases selected in dependence on the iteration number i.

7. The method of claim 5, wherein M=2N−1.

8. The method of claim 7, wherein N=118 and wherein the 4-ary algorithm is operative to encode the same generalized Fibonacci code in the odd and even interleaves, the generalized Fibonacci code having a j=7 constraint and having bases with limited span L=9 defined by:


Bn29=512 for n=1, 2, . . . , 5



Bn29=496 for n=6, 7, . . . , 9



Bn29=505-n for n=10, 11, . . . , 118.

9. The method of claim 5, wherein M=2N−3.

10. The method of claim 9, wherein N=100 and wherein the 4-ary algorithm is operative to encode the same generalized Fibonacci code in the odd and even interleaves, the generalized Fibonacci code having a j=5 constraint and having bases with limited span L=9.

11. The method of claim 9, wherein N=200 and wherein the 4-ary algorithm is operative to encode the same generalized Fibonacci code in the odd and even interleaves, the generalized Fibonacci code having a j=6 constraint and having bases with limited span L=9.

12. A method for decoding an output bit-stream produced by a modulation coding method as claimed in any preceding claim, the method comprising:
de-interleaving bits of the output bit stream to produce a succession of 4-ary symbols; and
applying a 4-ary enumerative decoding algorithm to the 4-ary symbols to simultaneously decode said generalized Fibonacci codes applied to said odd and even interleaves by said 4-ary encoding algorithm, thereby to recover said stream of binary input data.

13. Apparatus for modulation coding a stream of binary input data, the apparatus comprising:
a 4-ary encoder for applying a 4-ary enumerative encoding algorithm to the input bit-stream to produce a succession of 4-ary output symbols, the 4-ary algorithm being operative to simultaneously encode respective generalized Fibonacci codes in the odd and even interleaves of the input bit-stream; and
a multiplexer for interleaving bits of each successive 4-ary output symbol to produce an output bit-stream.

14. The apparatus of claim 13, further comprising an inverter for inverting the bits of the 4-ary output symbols to produce a (G, I)-constrained output bit-stream.

15. The apparatus of claim 13, wherein the 4-ary encoder is adapted to simultaneously encode the same Fibonacci code in the odd and even interleaves.

16. The apparatus of claim 13, wherein the bases of each Fibonacci code have a limited span L and wherein the 4-ary encoder is adapted to operate as a sliding window encoder of width 2L+2.

17. The apparatus of claim 13, wherein the 4-ary encoder is adapted to encode a succession of M-bit words in the input bit-stream such that the output bit-stream comprises a succession of 2N-bit codewords, the 4-ary encoder being adapted to apply a 4-ary algorithm which comprises, for each M-bit word, initialising an input value to the M-bit word value and then, for each iteration i of i=1 to N:
calculating partitioning indices for partitioning the range of possible input values into four sub-ranges;
comparing the input value to the partitioning indices to determine which sub-range contains the input value;
producing a 4-ary output symbol of value dependent on the sub-range containing the input value; and
updating the input value by subtracting the lower boundary value of the sub-range containing the input value.

18. The apparatus of claim 17, wherein the 4-ary encoder is adapted to calculate the partitioning indices from first and second pairs of partial lexicographic indices, the partial lexicographic indices of each pair being dependent on respective Fibonacci bases selected in dependence on the iteration number i.

19. The apparatus of claim 17, wherein M=2N−1.

20. The apparatus of claim 19, wherein N=118 and wherein the 4-ary encoder is adapted to encode the same generalized Fibonacci code in the odd and even interleaves, the generalized Fibonacci code having a j=7 constraint and having bases with limited span L=9 defined by:


Bn29=512 for n=1, 2, . . . , 5



Bn29=496 for n=6, 7, . . . , 9



Bn29=505-n for n=10, 11, . . . , 118.

21. The apparatus of claim 13, wherein M=2N−3.

22. The apparatus of claim 21, wherein N=100 and wherein the 4-ary encoder is adapted to encode the same generalized Fibonacci code in the odd and even interleaves, the generalized Fibonacci code having a j=5 constraint and having bases with limited span L=9.

23. The apparatus of claim 21, wherein N=200 and wherein the 4-ary encoder (16) is adapted to encode the same generalized Fibonacci code in the odd and even interleaves, the generalized Fibonacci code having a j=6 constraint and having bases with limited span L=9.

24. Apparatus for decoding an output bit-stream produced by modulation coding apparatus as claimed in claim 13, the decoding apparatus comprising:
a demultiplexer for de-interleaving bits of the output bit stream to produce a succession of 4-ary symbols; and
a 4-ary decoder for applying a 4-ary enumerative decoding algorithm to the 4-ary symbols to simultaneously decode said generalized Fibonacci codes applied to said odd and even interleaves by said 4-ary encoding algorithm, thereby to recover said stream of binary input data.

25. A data storage system comprising:
modulation coding apparatus as in claim 13 for modulation coding a stream of binary input data comprising a succession of M-bit words to produce an output bit-stream comprising a succession of 2N-bit codewords;
a recording channel comprising a storage medium and a recording/reproduction mechanism for recording the succession of codewords on the storage medium and for reading the storage medium to generate a reproduced signal;
detector apparatus for detecting a succession of 2N-bit words in the reproduced signal;
a demultiplexer for de-interleaving bits of the detected 2N-bit words to produce a succession of 4-ary symbols; and
a 4-ary decoder for applying a 4-ary enumerative decoding algorithm to the 4-ary symbols of each 2N-bit word to simultaneously decode said generalized Fibonacci codes applied to said odd and even interleaves by said 4-ary encoding algorithm, thereby to produce a succession of M-bit data words.