METHOD AND APPARATUS FOR MODIFYING A RUN-LENGTH LIMITED CODE

Abstract: Code modification circuitry (26) alters the end portion of each block in a sequence of code blocks, and also inserts additional bits at the junction between contiguous blocks. The codes to be processed are run-length limited (RLL) codes having a DC component which is to be removed for certain applications such as magnetic recording. The modification circuitry retrains the RLL format. Charge (or the integral of the waveform) accumulated by the sequence of bits of one block is compensated by selecting the sense of charge accumulation in next block to be of opposite sense. This is accomplished by the code modification circuitry using a relatively small set of possible combinations of digital words at the junctions of the blocks.

Description: This invention relates to a method and apparatus for modifying a run-length limited code and, more particularly, to the modification of such codes for the removal of any DC level, thereby to permit communication of such codes via circuitry which is incapable of handling the DC component. Data or information in binary form is composed of data bits wherein the information in each bit is in the form of one or the other of two logic states, a logic 1 and a logic 0. The bits may be transmitted via communication channels, or may be recorded in storage media, particularly, magnetic media. When stored in magnetic media, a logic 1 and a logic 0 can be represented by alternate states of magnetic polarization or, alternatively, one of the logic states can be represented by a transition in magnetic state while the other logic state is represented by a lack of a transition as referenced to a suitable time frame. Various forms of signal format are available for the transmission of digitized data as a series of data bits. For example, a logic 1 may be represented by a relatively high positive voltage while a logic 0 is represented by a relatively low positive voltage. Such a signal waveform clearly has a DC (Direct Current) component. Alternatively, a logic 1 can be represented as a pulse of positive voltage and a logic 0 as a pulse of negative voltage. The individual pulses may be identified by leaving spaces therebetween of value equal to zero volts or, alternatively, the individual portions of the waveform which are identified with respective ones of the data bits are designated by timing signals of a clock. With the foregoing waveforms wherein positive and negative excursions in voltage are present, the presence of a DC level depends on the duration of a succession of logic 1 signals as compared to the duration of a succession of logic 0 signals. Thus, in a series of data bits of a predetermined length, the magnitude of a DC level, if present, depends on the relative contributions of the positive and negative regions of the waveform. In digital communication systems wherein a clock signal is employed for identifying a portion of a waveform which represents an individual data bit, such portions being transitions between positive and negative voltages, a positive voltage, or a negative voltage, receivers of a communicated message require the use of a clock which is synchronized to the data waveform. Such synchronization can be obtained by constructing the digital waveform in a fashion wherein restrictions are placed on the length of a run of positive and negative portions of the waveform. The transitions between positive and negative voltages are utilized in the synchronization of a clock and, accordingly, the foregoing restriction on the waveform insures that such transitions occur sufficiently close in time to provide a desired accuracy in the synchronization of the clock with the waveform. A digital waveform encoded with data bits arranged in accordance with a run-length limitation is identified often by use of a pair of numbers wherein the first number represents a minimum number of zeros which appear between a logic 1, the second number of the pair representing the maximum number of zeros which are to appear between a logic 1. Such a run length restriction may permit a DC level over a sufficient length of a sequence of data bits, such that the signal waveform would be distorted upon passage through capacitive or inductive coupling in a communication circuit or in a recording circuit. For example, a DC level slowly builds up a charge on a coupling capacitor which eventually leads to distortion of the signal waveform unless subsequent portion of the waveform introduce a discharging of the capacitor so that the average charge on the capacitor is zero. Similarly, with inductive coupling, a DC component in the voltage becomes integrated to produce an increasing flux leading to eventual distortion of the signal unless a succeeding sequence of bits introduces a negative contribution to the flux. Thus, a code constructed in a run-length limitation might have an excessive DC component which, heretofore, could not be removed with available designs of digital waveforms for encoding digital data. The elimination of a DC or other frequency component from a coded waveform is disclosed in the following United States Patents, namely, Patel 3,810,111 issued May 7, 1974, Ouchi 3,995,264 issued November 30, 1976, and Franaszek et al 4,028,535 issued June 7, 1977. An article entitled 'Charge-Constrained Byte-Oriented (0,3) code' (IBM Technical Disclosure Bulletin, December 1976, cages 2715-2717) describes a technique of stopping the unlimited increase in accumulated change-value over a coded waveform, i.e. reducing DC levels, by frequently inverting selected partitions of the waveform. This is achieved by introducing an inverting or non-inverting link in the form of a pair of bits at partition boundaries. Of particular interest is a method and apparatus for generating a (1,7) code from an original code, and at 2/3 the rate of the original code, as is disclosed more recently in a United States Patent 4,413,251 by R. Adler et al issued November 1, 1983. Data which has been coded in a format which does not have a run-length limitation is transformed by the foregoing method and apparatus into a code which does have a run-length limitation. The apparatus receives the incoming code, two bits at a time, and converts each sequence of two bits to a three bit sequence. Thereafter, the modified code may be transmitted over a communication channel, or may be stored in magnetic media. Subsequently, prior to utilisation of the code by a receiver or display, the code is reconverted back to its original coded form, and then finally decoded to extract the data therefrom for presentation on the display or for some other purpose. While the foregoing Adler coding method and the set of codes resulting therefrom should be most useful, the utility thereof suffers from the presence of a DC level which may become excessively large and therefore introduce distortion in communication systems which cannot handle a DC component, as well as distortion in any recording of data in magnetic media. The invention is defined in the attached claims. It is an object of the present invention to provide a method and apparatus for converting a run-length limited code, particularly the foregoing Adler code, to a form which, on the average, has no DC level but still maintains the run length limitation of the original code. This object is met and other advantages are provided by a method and apparatus of the invention wherein the original code is divided into blocks, two additional bits are inserted between each of the blocks and, occasionally, individual ones of the bits may be changed in the leading and trailing sequences of four bits of each block so as to secure a reversal in the tendency of a capacitive charge (or magnetic flux) to be built up by the presence of a DC component in blocks of the original code. In accordance with a system using the invention, data is first coded in a standard code, then transformed by the foregoing Adler code to a run-length limited code, which code is then modified by the invention for removal of long-term DC levels extending through plural blocks of the code. The modified code may then be stored or communicated to a receiver, after which the system of the invention provides for the restoration of the previous signal format to permit subsequent decoding and retrieval of the data. Alternatively, the invention can be applied to an existing run-length limited code, having characteristics similar to that of the foregoing Adler code, for removal of the DC level, followed by a subsequent restoration of the DC level. A feature of the invention is found in the discovery that, due to run-length limitations, the leading and trailing ends of a block of the Adler code are limited in the number of distinct combinations of logic states of the individual bits. Thus, with each combination of a four-bit trailing end and four-bit leading end of consecutive thirty-bit blocks of the Adler code a tabulation of the logic states of the additional two bits can be made for directing subsequent charge associated with the DC component of a subsequent block so as to counteract the buildup of charge from a previous block. Greater flexibility could be obtained by inserting more than the foregoing two additional bits between the code blocks, in the sense that the foregoing leading and trailing ends of a block would not have to be modified, or might require less modification for redirecting the direction of charge. However, such additional bits would slow down the data rate and require further storage capacity in the case of stored data. The choice of the two bits for insertion between successive code blocks is believed to be optimal in the sense that there is relatively little change in the data rate, and that no more than minimal changes are required in the format of logic states of the leading and the trailing ends of a code block. In the practice of the invention, the amount of charge introduced by a previous block, and the charge contribution of the present block is noted to determine whether a reversal in direction of charge build-up is required, so as to neutralize the effect of any DC component. Brief Description of the Drawings The foregoing aspects and other features of the invention are explained in the following description taken in connection with the accompanying drawings wherein: Figure 1 is a simplified block diagram of a system incorporating the invention; Figure 2 shows a block diagram of an encoder of Figure 1 which removes DC level in accordance with the invention; Figure 3 is a timing diagram useful in explaining relative code length of block codes processed by the circuit of Figure 2; Figure 4 is a block diagram of encoding circuitry within the encoder of Figure 2 for inserting the additional bits for controlling the direction of charge buildup; and Figure 5 shows a decoder of Figure 1 for restoring DC level. Detailed Description of the Preferred Embodiment of the Invention With reference to Figure 1, there is shown a simplified embodiment of a communications system 20 incorporating the invention. Input data on line 22 is applied to an encoder 24 which encodes the data in the format of a limited run-length code. By way of example, the encoder 24 may be that disclosed in the aforementioned Adler patent. An output signal of the encoder 24 is applied to an encoder 26 which operates in accordance with the invention for modifying the code of the encoder 24 so as to remove the average DC level. The modified code appears on line 28 and is coupled via a communications link 30 to a decoder 32 which operates in accordance with the invention to restore the DC level and return the format of the coded data to that appearing at the output terminal of the encoder 24. The output signal of the decoder 32 is applied to a further decoder 34 which provides the inverse operation of the encoder 24 so as to present the data on line 36 in the same form as the data appears on line 22. The data on line 36 is applied to a utilization device such as a display 38. It is noted that the data on lines 22 and 36, may be in an encoded form such as the ascii code of alpha-numeric characters, or may be a digitized version of sample analog data as would be provided by an analog-to-digital converter (not shown). The communication link 30 may employ a radio transmitter and receiver, or a telephone link (not shown) or as presented in the example of Figure 1, comprises a magnetic medium 40 with a recording head 42 and a playback head 44 connected thereto. Signals on line 28 are applied to the medium 40 via the recording head 42 to be stored in the medium 40. The stored data is read out of the medium 40 by means of the playback head 44, and applied by the playback head 44 to the input terminal of the decoder 32. In the operation of the system 20, the role played by the invention is found in the use of the encoder 26 and the decoder 32. The encoder 26 modifies an incoming digitized signal, such as that exemplified by the aforementioned code of the Adler patent, so as to remove the DC level and thereby prepare the digitized signal for further communication and by a capacitive coupling (not shown) or by the magnetic media 40. Upon retrieval of the digitized signal from the magnetic medium 40, the decoder 32 restores the digitized signal to its previous form, such as the code of the Adler patent, so that the digitized signal can then be utilized for its intended purpose, such as for the presentation of information on the display 38. The removal of the DC level is based on an examination of a present block of the code and one or more preceding blocks of the code to determine their respective contributions to a build-up of charge. The use of the term "charge" herein is the same usage set forth in the foregoing patent of Patel wherein the term is used to describe both the charging which would be experienced by a capacitor through which the code is transmitted, as well as an analogous increase of voltage or current which would be experienced by an integrator through which the coded waveform passes. By observation of a drifting in the charge away from a value of zero charge, either a positive drift or a negative drift, a correction has been made by inserting a corresponding shift, a negative shift or a positive shift, so as to cancel the drifting of the charge away from the value of zero charge. This is accomplished by the insertion of additional bits between the code blocks and/or modification of the leading and trailing end portions of sequential blocks of the coded signal. Due to the run-length limitation in the construction of the block code, there are relatively few combinations which can be formed among the digital words comprising the end portions of the code blocks plus the inserted bits. These relatively few combinations permit the restoration process by the decoder 32 to be accomplished by a relatively simple logic procedure wherein the modified end portions of the blocks are restored to their original format. Figure 2 shows a block diagram of the encoder 26 coupled to the output terminal of the encoder 24 via a line 46 and providing the DC-free code on line 28. A stylized portrayal of a code signal propagating along line 46 is shown at 48. The encoder 26 comprises an up-down counter 50, a toggle flip-flop 52 responsive to positive and negative transitions in the waveform of the code signal 48 and providing an output signal on line 54, a clock 56, a counter 58, an accumulator 60, a frequency scaler 62, a buffer store 64, a code modifier 66, and a logic unit 68 with two sign detectors 70 and 72 coupled to input terminals thereof. In operation, the counter 50 serves as an integrator which counts clock pulses from the clock 56. The output signal of the flip-flop 52 changes state with each transition in the waveform of the code signal 48, and is applied via line 54 to an up/down control terminal of the counter 50. The counter 50 counts up in response to a signal on line 54 indicating a relatively high voltage portion of the signal 48, as sensed by the flip-flop 52. The counter 50 counts down in response a signal on line 54 indicating a relatively low voltage portion of the signal 48, as sensed by the flip-flop 52. In order to provide synchronism between the operation of the encoder 24 and the encoder 26, pulses of the clock 56 are employed also for driving the encoder 24. The counter 58 counts pulses of the clock 56 so as to provide a count representative of the length of a code word of the signal 48. The counter 58 is set to provide an output signal on line 74 upon the conclusion of each block of the signal 48. In the case of the aforementioned code of the Adler patent, each block of the code has 30 bits, and, accordingly, the counter 58 would be set to a value of 30 for use with the foregoing Adler code. Upon reaching the count of 30, the counter 58 generates the pulse on line 74 which resets the counter 58, and also resets the counter 50 and strobes the accumulator 60. By virtue of the resetting of the counter 50 at the conclusion of each block of the code, the total count of the counter 50 is representative of the charge accumulated by the block of the code. The charge may have a zero value, or a non-zero value which is either positive or negative. The count of the counter 50 is stored in the accumulator 60 upon the strobing thereof by the signal on line 74. Thereby, the accumulator 60 stores a history of past buildup of charge, while the output of the counter 50 is the value of the charge of the most recent block. The output count of the counter 50 is applied to the detector 70 which detects whether the count, or charge represented by the count, is positive or negative. The positive or negative sign of the charge is applied by the detector 70 as an input to the logic unit 68. Similarly, the output count, or charge, of the accumulator 60 is applied to the detector 72 which detects whether the accumulated charge is positive or negative. The sign of the accumulated charge is applied by the detector 72 as an input to the logic unit 68. The buffer store 64 receives the signal on line 46 from the encoder 24. The coded signal on line 46 is clocked into the store 64 by clock pulses of the clock 56. The bits of the coded signal are subsequently read out of the store 64 at a higher clocking rate by clock pulses applied by the frequency scaler 62. The scaler 62 is driven by pulses of the clock 56, and include well known counting circuitry and, possibly, an additional clock (not shown) synchronized by pulses of the counters of the scaler 62. If desired, circuitry of the scaler 62 and the clock 56 may be combined into a single clock circuit (not shown) providing output clock pulses at both a lower and a higher clock frequency. The buffer store 64 provides two functions, namely, the storage of the incoming coded signal on line 46 until such time as charge data of the present code word is made available by the counter 50 and an increasing of the clocking rate so as to accomodate the additional bits which are to be inserted by the code modifier 66. This may be explained with reference to the timing diagrams of Figure 3 wherein the upper diagram shows blocks of 30-bit code words propagating on the line 46, while the lower graph shows the corresponding 32-bit blocks appearing at the output of the code modifier 66 on line 28. As shown in Figure 3, the time duration of the 30-bit block is the same as the time duration of the 32-bit block. In order to accomodate the equality of the timed durations, the clocking rate must be increased by the ratio of the bits (32/30). The logic unit 68 directs the modifier 66 either to alter the sense (positive or negative) of the charge buildup of a code block, or to leave the sense in its present state. If the signs detected by the detectors 70 and 72 are of opposite sense, this resulting in a correction of charge buildup and reduction in the DC component, the logic unit 68 commands the modifier 66 to retain the state of the charge of the present code block. In the event that the detectors 70 and 72 detect equal signs in the charges of the counter 50 and the accumulator 60, this indicating a continuing buildup of charge and of the DC component, the logic unit 68 commands the modifier 66 to invert the sense of the charge of the present code block. Thereby, the charge of the code block exiting the modifier 66 is always of the proper sense to correct the accumulation of charge. The code modifier 66, as shown in Figure 4, comprises a memory 76 which may be a read-only memory, a timing unit 78 and a gating unit 80. The code stored in the buffer store 64 is applied to the gating unit 80, and is also applied along with an output signal of the logic unit 68 as an address to the memory 76. The timing unit 78 is driven by the high clock pulses of the scaler 62 (Figure 2), and provides timing signals for operation of the memory 76 and the gating unit 80. In the case of the foregoing exemplary Adler code, leading and trailing end portions, each of which comprise six bits, are employed in the addressing of the memory 76. The timing unit 78 operates the memory 76 to be responsive to the occurrance of the bits in the leading and trailing end portions. The timing unit 78 operates the gating unit to receive all of the bits of a code block from the store 64 except for the bits of the leading and trailing end portions of the code word, and to substitute in their stead the modified set of bits for the end portions plus the additional two bits which are inserted between the code blocks. By way of alternative embodiments, it is noted that the modifier 66 may be constructed in the form of a programmable logic array. With the programmable logic array (not shown) the bits of an incoming code block would be applied to a set of input lines of the array, and the bits of the output modified code block would appear on a set of output lines of the array. Interconnections between the input and output set are provided so as to perform the same function as that performed by the memory 76 and the gating unit 80 in response to the addressing provided by the signals of the store 64 and the logic unit 68. The foregoing operation may be better understood with reference to the following mathematical analysis which is directed to a run-length limited (1,7) code, of the form disclosed in the aforementioned Adler patent wherein each code block is composed of 30 bits, and wherein two bits are inserted by the circuitry of the invention between successive ones of the code blocks. In this situation, the total accumulated charge does not exceed thirty in absolute value. The rate of data propagation of the code, prior to the insertion of the additional two bits, is 2/3 because the thirty bits in a code block contain only twenty bits of data. Upon the insertion of the additional 2 bits, the data rate is reduced to 20/32 = 0.625. In the event that noise or other source causes an error in a bit of the code block, the error propagation of the decoder is limited; one error in the encoded bits can result in no more than ten errors in the decoded bits. As will become apparent in the ensuing mathematical presentation, the modification of the end portions of the code blocks results in a change in the total charge which would be accumulated. Such change would not be accounted for by the count of the counter 50, which count is based on the incoming code block, prior to modification. Accordingly, it is desirable to provide still further basis for decision of the logic unit 68, which further basis is applied via line 82 from the modifier 66. The memory 76 outputs projected end portions of the code blocks for both of the cases, namely inversion or noninversion of the direction of charge accumulation. The projected end portions are coupled via line 84 to a computer 86 of the charge increment which provides two values of charge increment, one corresponding to the case of inversion, and the other corresponding to the case of noninversion of the direction of charge accumulation. The modifier 66 further comprises an averaging unit 88 and a sign detector 90. The two possible values of charge increment are coupled via lines 92 and 94 to the averaging unit 88 which provides the average value of the two charge increments. The detector 90 detects the sign of the average value, and applies the average value along line 82 to the logic unit 68 for a final determination as to whether inversion or noninversion of the direction of charge accumulation is to be ordered by the address lines to the memory 76. The significance of this later step in the process will become apparent from the following mathematical description. The encoder inserts two bits (γ₁, γ₂) between successive blocks of 30 bits (η₁,..., η₃₀) of output from the (1,7) encoder. It may also change the values of the four bits on each end of this 30-bit block. We denote the new values of the 30-bit block by α₁,..., α₃₀. Let η₋₅... η₀ and α₋₅... α₀ refer to the last digits of the previous block. For each value of η₋₅... η₀. η₁... η₆ there are two choices for α₋₅... α₀. γ₁ γ₂. α₁... α₆. The choice labelled "0" has the same parity as the input: α₋₅+...+ α₀ + γ₁ + γ₂ + α₁+...+ α₆ = η₋₅ +...+ η₀ + η₁+...+ η₆ modulo 2, while the choice labelled "1" has the opposite parity. The change in parity coincides with the change in direction of charge accumulation. Choice "1" has the effect of changing the direction of charge accumulation, while choice "0" leaves the direction unchanged, i.e. as it would have been in the absence of the present encoding. The ensuing description employs the following definitions: The charge of a sequence x₁x₂...x n is the cumulative charge after writing the sequence x₁...x n , given that before writing x₁ the cumulative charge was 0 and increasing. Thus for arbitrary strings x (where ⊘ is the empty string): charge (⊘)=0 charge (0.x)=1+charge (x) charge (1.x)=-1-charge(x) For a given value of η₋₅... η₀. η₁... η₆, choice 0 yields the string α⁰₋₅... a⁰₀. γ⁰₁ γ⁰₂. α⁰₁... α⁰₆, while choice 1 yields the string α¹₋₅... α¹₀. γ¹₁ γ¹₂. α¹₁... α¹₆. Let e⁰ denote the charge of the sequence α⁰₋₃... α⁰₀. γ⁰₁ γ⁰₂. α⁰₁... α⁰₄, where the superscripted 0 is an index (not an exponent). Let e¹ denote the charge of the sequence α¹₋₃... α¹₀. γ¹₁ γ¹₂. α¹₁... α¹₄, where the superscripted 1 is an index (not an exponent). A parenthesized argument "(n)" indicates the location at which the function is computed, so that e⁰(n) is computed at the boundary between blocks n and n+1. Let c(n) denote the cumulative charge at four bits before the end of the nth block. Let r(n) denote the direction of charge accumulation (either +1 or -1) at that same time. The encoder (assuming the embodiment of a programmable logic array or a real-time computer) will tabulate the two quantities E(n) = (e⁰(n)+e¹(n))/2 and F(n) = (e⁰(n)-e¹(n))/2 . Let m(n) denote the charge of the sequence η₅... η₂₆, in block n. Let s denote the parity of η₋₃... η₀. η₁... η₄, i.e. s=+1 if there are an even number of 1's in the sequence, and s=-1 if there are an odd number of 1's in the sequence. This is the same as the parity of α⁰₋₃... α⁰₀. γ⁰₁ γ⁰₂. α⁰₁... α⁰₄. Similarly, let t denote the parity of the sequence α₅... α₂₆. For n>0, set d(n) = c(n) + r(n)E(n). Thus d(n) will be the average of two possible values of the cumulative charge after four bits into block n+1, corresponding to the choice between blocks n and n+1. Define Δ(n) = r(n-1)F(n-1) + r(n-1)s(n-1)m(n) + r(n-1) s(n-1)t(n)E(n). It is noted that if a choice of "0" is made between blocks n-1 and n, then d(n)=d(n-1) + Δ(n) , while with a choice of "1", d(n)=d(n-1)- Δ(n) . Also, r(n) = r(n-1) s(n-1)t(n) with a choice of "0", or -r(n-1)s(n-1)t(n) with a choice of "1". Consider the case when choice = "1". Then d(n) = d(n- 1) - r(n-1)F(n-1) - r(n-1)s(n-1)m(n) - r(n-1)s(n-1) t(n)E(n) . Recall d(n-1) = c(n-1) + r(n-1)E(n-1) = c(n-1) + r(n-1)(e⁰(n-1)+e¹(n-1))/2 , where c(n-1) is a cumulative charge. The next term is -r(n-1)F(n-1) = - r(n-1)(e⁰(n-1)-e¹(n-1))/2 . Adding, the e⁰(n-1) cancel, and the r(n-1)e¹(n-1) gives the contribution to the actual cumulative charge, under choice 1, of the ten bits α¹₋₃... α¹₀, γ¹₁ Y¹₂ , d¹₁... α¹₄. The third term gives the contribution of bits 5 through 26 in the nth block (with the correct sign). The final term is just r(n)E(n). Thus the first three terms give the cumulative charge at four bits before the end of the nth block (i.e. c(n)), and the last term corrects this to d(n). Let the choice be "0" or "1", between blocks n-1 and n, in order to minimize the absolute value of d(n). Thus if d(n-1) and Δ(n) have the same signs, choose "1" (in order to subtract Δ(n) from d(n-1) and thereby reduce the magnitude); if d(n-1) and Δ(n) have opposite signs, choose "0", and if one of them has value 0, make either choice. It is further noted that Δ(n) is bounded; its absolute value cannot exceed 19. Because of this, d(n) is also bounded; its absolute value cannot exceed 19. Such must be the case because otherwise, the first time that |d(n)| exceeds 19, since |Δ(n)|≦19, it must be that either |d(n-1)|>|d(n)|, or else d(n-1) and [d(n)-d(n-1)] have the same sign. The first case is impossible because |d(n)| is the first value exceeding 19, and the second case is impossible by our choice of "0" or "1". In turn, the actual cumulative charge at any time is "close" to the value of d(n) at the nearest block boundary, and so is in turn bounded by 30. The following tabulation shows the interfacing bits between two contiguous code blocks ( the trailing end of one block and the leading end of the succeeding block) in the left column, with substitutions therefor being shown in the middle and the right columns. Each substitution includes the two additional bits between the blocks, and may also provide for a change in some of the bits in the leading and the trailing ends. The middle column (no parity change) provides a change in the direction of charge accumulation, and the right column (parity change) retains the direction of charge accumulation. In the following table there are shown possible end portions of the code blocks. In correspondence with each of the block ends, there are provided the charge increments associated with the cases of inversion and noninversion of the direction of charge accumulation. This is the information provided by the computer 86 (Figure 4), which information is then utilized as explained hereinabove, by the logic unit 68 as to whether an inversion or noninversion is to be commanded via the address lines to the memory 76. The charge increments are as follows. The decoder 32 recovers the original RLL (run-length limited code) constrained bits from the RLL and charge constrained bits output by the previous encoder. It takes a block of thirty-two bits, composed of thirty data bits and two charge bits α₁α₂... α₂₉α₃₀ γ₁ γ₂ and converts it into thirty RLL constrained data bits η₁ η₂... η₂₉ η₃₀. No changes are made in the middle twenty-two bits η k = α k , k = 5,6,...26 . Some changes may be made in the beginning and ending four bits. The changes in the beginning (ending) four bits of a block may depend on the last (first) six bits of the preceding (succeeding) block as well as the first (last) six bits of the block itself. The picture is: α₋₅ α₋₄ α₋₃ α₋₂ α₋₁ α₀ γ₁ γ₂ α₁ α₂ α₃ α₄ α₅ α₆ determines η₋₃η₋₂η₋₁η₀η₁η₂η₃η₄ The rules for changes are given by the table below, no listing means no changes are made. The logic functions that execute these changes (or no changes) follow. η₋₁ = α ₋₂α₀α₁α₄α₆ v α₋₅α₋₃ α ₋₁ α ₀ α ₁ α ₂ α ₃ v α₋₁ η₂ = α₋₅α₋₃α₀α₁ α ₃ v α ₋₂ α ₋₁ α ₀ α ₁ α ₂α₄α₆ v α₂ The process described by the foregoing mathematical equations is implemented by the decoder 32 as shown in Figure 5. The code, free of the DC level, is applied from the communication link 30 (Figure 1) to an input register 96 of the decoder 32. The decoder further comprises an output register 98, a set of ten AND gates 100, 102, 104,...118, and two OR gates 120 and 122 which are connected between the registers 96 and 98. Input signals to the AND gates are provided by the input register 96. Three input signals are provided to each of the OR gates, two of the three input signals being coupled from AND gates and the third input signal being provided by the register 96. The connection of the signals between the register 96 and the gate follows that shown in the foregoing equations. By way of example, the last equation is implemented by the AND gates 110 and 112, and the OR gate 122. Error propagation is limited. One error in the RLL and charge constrained bits can result in no more than eight errors in the RLL constrained bits. The decoder set for the foregoing Adler code (1,7), has an error propagation of six bits. When the bits are decoded to the user by first passing through the decoder 32 and 34, the error propagation is again limited. One error in the RLL and charge constrained bits can result in no more than ten errors in the unconstrained user bits. By way of alternative embodiments it is noted that the decision process in determining whether or not an inversion is to be made can be accomplished in a further fashion as is shown with reference to Figures 2 and 4. In lieu of the coupling of the counter 50 to the logic unit 68 by the detector 70, the counter 50 may be coupled via a line 124 to the averaging unit 88 of the modifier 66. The averaging unit 88 would then sum the count of the counter 50 with each of the signals on the lines 92 and 94 to provide the complete charge accumulation which would occur over the duration of a complete block of the code, including both possible modifications of the end portions of the code block. The circuitry of the averaging unit 98 would be modified so that, in lieu of applying the average of the two signals to the detector 90, the averaging unit 88 would apply only the larger (in absolute value) of the two signals to the detector 90. The detector 90 would then be connected in lieu of the detector 70 to provide the sign of the maximum possible charge accumulation obtainable by the present code block after modification by the modifier 66. The foregoing circuitry and coding process has provided a convenient transformation of a run-length limited code which removes the average value of the DC level so as to permit the coded signal to be transmitted via a communication link which does not respond to a DC component, and also to permit the coded signal to be stored in magnetic media. While the foregoing description has been directed to such code having a limitation (1,7), it is to be understood that the teachings of the invention are applicable to codes having other restrictions on the number of logic 0's which may be placed between logic 1's.

Claims: A method for modifying a run length limited code to delete a DC component therefrom while still retaining the run length limitation comprising the steps of: receiving a succession of blocks of a code comprising a succession of digital bits and having a predetermined format and a predetermined run length limitation; analysing first and second successive blocks of code to determine the sense of a charge accumulation on each block; modifying the junction between said first and second blocks of code to provide a sense of charge on the second block to counteract the charge accumulation on the first block; said modifying including the steps of: inserting additional code bits between a trailing end portion of said first block and a leading end portion of said second block, each of said end portions having a predetermined number of bits; providing predetermined sets of substitute end portions for said trailing and leading end portions; and selecting an appropriate set of end portions to achieve the required sense of charge accumulation over said second block; whereby modifying said junction preserves the run length limitation in each of said code blocks. A method as claimed in claim 1, said selecting step including selecting one of two sets of prescribed arrangements of bits, a first arrangement which consists of one substitute set and said additional bits, which arrangement provides an inversion in sense of charge accumulation over said second block and a second arrangement of a second substitute set and said additional bits, which arrangement provides no inversion in the sense of charge accumulation over said second block. A method as claimed in claim 2 wherein the step of selecting is based on an analysis of the sense of the charge accumulation over said first and second blocks and the calculated charge accumulation over said first and second arrangements. A method as claimed in any preceding claim further comprising the step of restoring said predetermined format; and wherein said step of restoring preserves said run-length limitation. Apparatus for modifying a run-length limited code to delete a DC component therefrom while retaining the run-length limitation, said code being formed of a succession of digital bits arranged in a predetermined format in a series of blocks, a trailing end portion of a first block being contiguous with a leading end portion of a second block at a junction between the two blocks, said apparatus comprising: means for analysing each of said blocks to determine the presence of a charge accumulation thereon, said analysing means including means for detecting the sense of such accumulations; means coupled to said analysing means for modifying the junction between two successive blocks of the code to select a sense of a charge accumulation in said second block which counteracts a charge accumulation by said first block; and wherein said modifying means preserves the run length limitation, said modifying means comprising: means for inserting additional code bits between said trailing end and leading end portions each of said end portions having a predetermined number of bits. means for providing predetermined sets of substitute end portions for both leading and trailing end portions said blocks of code; and means for selecting an appropriate set of said substrate end portions to achieve the required sense of change accumulation over said second block. Apparatus according to claim 5, wherein said modifying means operates with a set of prescribed arrangements of digital bits at said junction, said prescribed arrangements including said substitute end portions and said additional code bits; and wherein said providing means comprises a memory storing said prescribed arrangements of digital bits, said memory being addressed by addresses composed of the sequence of bits in a leading end portion of a presently occurring block of said code and the sequence of bits in a trailing end portion of a preceding block of said code. Apparatus according to claim 6, wherein said memory provides two sets of said prescribed arrangements for each address, one set of said prescribed arrangements at said address returning a sense of charge accumulation, and a second set of said prescribed arrangements at said address inverting a sense of charge accumulation. Apparatus according to claim 7, wherein said modifying means alters the polarity of at least one bit in an end portion of a code block. Apparatus according to claim 8, wherein said memory provides two sets of said prescribed arrangements for each address, one set of said prescribed arrangements at said address returning a sense of charge accumulation, and a second set of said prescribed arrangements at said address inverting a sense of charge accumulation; and said modifying means includes means responsive to a sense of charge accumulation detected by said detecting means for activating said memory to output one of said two sets of prescribed arrangements at said address.

Inventors: COPPERSMITH, DON N M N, KITCHENS, BRUCE PRUITT
Applicants: INTERNATIONAL BUSINESS MACHINES CORPORATION
Application year: 1986
Main classification: H03M5
IPC codes: H03M7, H03M5