Abstract:
Means for serially encoding and decoding cyclic block codes having minimal parity check bits and single error correcting capability are disclosed. 
     Encoder (12) comprises: serial shift and divide means (4100, 4150, 4200, SA, S3, S4 and S5) for generating parity check bits to append to the data word and thereby form the channel word; input buffer (4300) for storing bits of the next channel word during evaluation of the parity bits of the previous word; and output buffer registers (4400 through 4800) for storing bits of the channel word for eventual transmission. Certain registers (4400 through 4800) are partitioned into a parallel arrangement of register segments of predetermined lengths so as to effect full loading of each segmented register prior to the request for transmission from each register. 
     Decoder (20) comprises: means (5100, 5200, 5030, SA1, SB1, or 6100, 6200, 6030, SA2, SB2) for shifting and dividing the received word to generate the syndrome as well as iteratively shifted versions of the syndrome; means (5300,5031 or 6300,6301), alternating operation with the shifting and dividing means, for comparing the characteristic polynomial (5300) of the code with the iteratively shifted versions of the syndrome; and means (5020, 5021, 5022 and 5400 or 6400) for correcting, in response to a predetermined output from the comparing means, the received word by inverting the bit in the received word depending on the number of iterations performed in generating the iteratively shifted versions of the abstract. The decoder comprises two substantially identical sections each having two modes of operations. The sections alternate modes of operation so that two contiguous blocks are processed during a given interval.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates generally to encoders and decoders for cyclic block codes of the Bose-Chaudhuri-Hocquenghem (BCH) type and, more particularly, to serial encoders and decoders with single error correcting capability. 
     2. Description of the Prior Art 
     Most of the prior art relating to BCH-type encoders and decoders concentrate on binary division techniques for generating the parity check bits at the encoder, and the syndrome, as well as shifted versions thereof, at the decoder. Largely ignored in the prior art are the necessary logical functions needed to maintain synchronism between bits of the code word generated at the encoder and the corresponding synchronizing functions required at the decoder to process the sequentially received data blocks. 
     Prior to 1972, binary division was typically accomplished by distributing a series of exclusive OR gates along a shift register cascade. With this arrangement, division at the encoder utilizes an augmented version of the input data as the dividend and the code generator word as the divisor. During each step of the division, the leading bit of the partial remainder is fed back to the numerous exclusive OR gates embedded within the shift register string. This conventional arrangement requires a significant number of exclusive OR circuits, particularly for code generator words that are densely distributed. 
     With the advent of high-speed magnetic bubble devices, it became inefficient to use a large number of exclusive OR gates and unduly complicated logic. Instead, a single exclusive OR gate was utilized in a serial encoding arrangement that was first described in a paper by the applicant. The paper, entitled &#34;The Design and Embodiment of Magnetic Domain Encoders for Single-Error Correcting Decoders for Cyclic Block Codes,&#34; was published in the February, 1972 issue of the Bell System Technical Journal and represents the most pertinent prior art reference. The paper presents an encoder topology utilizing a single exclusive OR gate; however, the topology is specifically arranged for use with magnetic domain technology. The topology is dictated by a constraint imposed by the technology which requires all bits of information to be propagated by one period in one clock cycle. Thus, although magnetic domain technology offers inexpensive storage, this technology requires significant time intervals for every operation (generation, propagation, sensing, annihilation, and so forth) in contrast to the essentially instantaneous operation of semiconductor circuitry. Moreover, the ability of semiconductor shift registers to shift in at one rate and shift out at another rate is not utilized with such a topology. 
     In addition, the encoder topology presented in the paper is for the special case wherein the number of parity bits is sufficiently large compared to the number of data bits. To efficiently utilize channel capacity, it is desirable that the number of parity bits be small relative to the number of data bits. Neither applicant&#39;s paper nor other prior art teaches or suggests a serial encoding arrangement for efficient channel utilization. 
     The paper also discusses the binary division process utilized in a decoder. Besides elucidating a conventional decoder of the type wherein a series of exclusive OR gates is embedded in a shift register string, a specifically designed serial decoder adapted for use with the constraints of magnetic domain technology is presented. The aforementioned restrictions discussed with respect to magnetic domain encoders also apply with respect to decoders. 
     Furthermore, the paper only alluded to the need for a technique to synchronize the interaction of an encoder-decoder pair comprising a transmission system. No synchronizing plan was set forth for perusal. 
     SUMMARY OF THE INVENTION 
     These prior art restrictions, deficiencies and limitations are mitigated in accordance with the present invention of a synchronized, single error correcting data transmission system utilizing serial binary division for generating parity bits at the encoder and iteratively shifted versions of the syndrome at the decoder; error correcting information is obtained by serial comparison of the iteratively shifted versions of the syndrome with the characteristic word of the code. 
     Broadly speaking, the encoder comprises: generator word and data word shift registers as well as input and buffer shift registers; an exclusive OR circuit; and gating and clocking means. Shift-in to the registers occurs at the data word rate and a submultiple thereof; shift-out occurs at the code word rate. For the encoder to function properly whenever the number of parity bits is small, one of the buffer registers is partitioned into segments. These segmented registers have lengths that satisfy the data synchronism requirement as well as the shift register requirement that each of the storage means be shifting in or shifting out during predefined intervals within an encoding cycle. 
     The decoder comprises two substantially identical sections, each having two modes of operation. In the first mode, an incoming block of data is processed via serial division to obtain the syndrome. While one section is operating in the first mode, the other section operates in the second mode and processes the syndrome of the last received block to obtain shifted versions of the syndrome. Before evaluating each successively shifted version, a comparison with the fixed pattern of the characteristic is effected to determine if an error has occurred. The first mode operates at the data word rate and submultiples thereof whereas the second mode operates at the code word rate and submultiples thereof. Each decoder section comprises: generator word, characteristic word and syndrome shift registers as well as received word buffer registers; two exclusive OR circuits; and gating and clocking means. The sections alternate modes of operation so that two contiguous received blocks are being processed during any particular interval. 
     A number of distinct advantages and features accrue from the serial encoding and decoding transmission system. One major advantage is the ability of the system to utilize efficient block codes when the number of parity bits is small. Another advantage is that the number of exclusive OR gates is considerably reduced, especially for code generator words that are densely distributed. Yet another advantage is that the synchronization between (i) the bits in the data and code words at the encoder, and (ii) the bits in the received word and the corrected data word at the decoder, is easily achieved. One feature is the ability to change the generator word from block-to-block to increase secrecy of transmission. 
     The organization and operation of this invention will be better understood from a consideration of the detailed description of the illustrative embodiments thereof, which follow, when taken in conjunction with the accompanying drawing. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a circuit diagram of a prior art serial division processor exemplifying the process for a (7,4) Hamming code; 
     FIG. 2 is a circuit diagram of a prior art serial encoder for a general (n,k) block code having p≧0.414k; 
     FIG. 3 is a timing diagram indicating the various processing intervals for the encoder shown in FIG. 2; 
     FIG. 4 is a circuit diagram depicting an illustrative embodiment in accordance with the present invention of a serial encoder for a general (n,k) block code having p&lt;0.414k; 
     FIG. 5 is a circuit diagram depicting an illustrative embodiment in accordance with the present invention of a serial decoder for a general (n,k) block code; and 
     FIG. 6 is a timing diagram indicating the various processing intervals for the decoder of FIG. 5. 
    
    
     DETAILED DESCRIPTION 
     For clarity of exposition, it is helpful to provide a function theoretic basis to facilitate presentation of the illustrative embodiments. A (7,4) Hamming code, representing one particular code from the set of possible BCH codes, exemplifies function theoretic concepts. Also as an aid to illustrate the foundational concepts, the special encoder described by the applicant in the aforementioned paper is discussed. Descriptions of generalized illustrative embodiments of the present invention of an encoder, decoder and combination thereof follow the functional basis discussion. 
     1. Function Theoretic Basis 
     The primary purpose of this overview is to establish the terminology accompanying cyclic block codes and to define the mathematical manipulations associated with such codes. A more complete development of these concepts is presented in the text Error-Correcting Codes by W. W. Peterson, John Wiley and Sons, 1961. 
     Block codes constitute a set of codes in which a binary block of k-information bits has a binary block of p=n-k parity bits appended to it, thereby constituting a (n,k) block code. The k-bit block is called the data word, the n-bit block the channel word and the p-bit block the parity check word. (It is worthwhile to note that the term &#34;word&#34; does not imply a fixed bit length. The length is variable depending on the context used; thus, for example, a data word has k bits whereas a channel word has n bits.) 
     It is convenient for manipulation purposes (as well as more esoteric mathematical purposes), to associate a polynomial with various code words. For instance, if a n-bit channel word has a bit stream given by 1010011, then the polynomial representation is 
     
         c(X)=X.sup.6 +X.sup.4 +X.sup.1 +X.sup.0 =X.sup.6 +X.sup.4 +X+1, 
    
     corresponding to unity in the first, third, sixth and seventh binary positions. 
     For each cyclic code there exists a polynomial g(X) which divides every channel word. This polynomial is called the generator of the code; it is of length (p+1) bits. The polynomial g(X) is both irreducible and primitive in the field over which it is defined. 
     To understand how the division of code words by the generator polynomial proceeds, the c(X) above is divided by its generator g (X)=X 3  +X+1 (1011): ##EQU1## the remainder is three binary zeros, as postulated. In the division process, the &#34;plus&#34; symbol denotes the exclusive OR operation. With this convention defined, a short form polynomial division process may be accomplished using only bit manipulations; the above division has the form: ##EQU2## 
     In general, the first k bits of c(X) represent the data polynomial, designated d(X), and the last p=n-k bits of c(X) represent the parity check polynomial, designated p(X). To obtain p(X) for each d(X), an augmented data polynomial, designated e(X), is formed from each d(X) by appending p zeros. For the c(X) given above, d(X) and e(X) are represented by the bit strings 1010 and 1010000, respectively; division of e(X) by g(X) yields 011 as a remainder, as anticipated. 
     Based on the above discussion, the general function of an encoder is to receive information d(X) in contiguous blocks from a data source and generate the channel word c(X) in blocks. Two subfunctions are: (i) forming the augmented data word e(X) and dividing it by the generator function g(X); and (ii) appending the remainder, p(X), to d(X), thereby forming c(X). 
     As the channel word c(X) is transmitted through the system, errors may randomly occur and change the received bit pattern. For a single error correcting system, the decoder recovers the original information (bits) of d(X). The received channel word is designated r(X). To detect and correct an error, the decoder first divides r(X) by g(X). The remainder, of length p bits, is called the syndrome, designated s(X). This syndrome is compared to the characteristic polynomial of the code, designated Γ(X), which is obtained as the remainder upon division of X n-1  by g(X). If the syndrome matches Γ(X), an error has occured in the first bit position, that is, the one corresponding to X n-1 . If no match is achieved, the syndrome is shifted, that is, multiplied by X to yield Xs(X). This shifted version is divided by g(X) and the remainder is compared to Γ(X). A match indicates an error in the position corresponding to X n-2 . No match causes another iteration of shift and divide. The shift, divide and match iterations proceed until a match is found, or in the case of no error, until a new received word r(X) is ready for processing. 
     To exemplify this discussion regarding decoder functions, the channel word c(X) above is assumed to be in error in the third binary position; thus, r(X)=X 6  +X+1 (1000011). The characteristic word Γ(X) for the generator word 1011 is found from: ##EQU3## or Γ(X)=X 2  +1. Division of r(X) by g(X) yields: ##EQU4## or s(X)=X 2  +X. 
     Since s(X) does not match Γ(X), the syndrome must be shifted and divided. A shorthand notation for this operation, as well as iterated versions thereof, is as follows: ##EQU5## Since there is a match between the remainder of X 2  s(X) and Γ(X), the third bit position is corrected (inverted) and the first k bits, representing d(X), are extracted for postdetection processing by the decoder. 
     To demonstrate the division process in terms of a circuit arrangement, the topology of FIG. 1, representing an encoder for the (7,4) Hamming code, is considered. This topology represents a modified version of one set forth by the applicant in the above-mentioned paper. 
     The p least significant bits of g(X) (1011), denoted g&#39;(X) (011), are stored in circulating shift register 100. Both before and after a circulation, register position 101 stores the highest order bit (0), register position 102 stores the next highest order bit (1) and register position 103 stores the remaining bit (1). Shift register 200 serves two purposes: (i) initially, register positions 201 through 204 receive and store the data word represented by d(X), with the highest order bit residing in position 201; and (ii) as the division process proceeds, register positions 201 through 204 store partial remainders, with the remainder after k (4) circulations representing the parity check word p(X). Switch S4 is designed to respond to the contents of register 201, closing only if the contents of register 201 are a logic one. The contents of shift registers 100 and 200, once initialized with g&#39;(X) and d(X), respectively, are circulated in synchronism and compared in exclusive OR circuit 150. Register 100 is circulated clockwise whereas register 200 circulates counterclockwise. The circulation time is chosen so that computation of the parity check bits and transmission of the results to output buffer 300 are completed before the arrival of the first bit from the next data word. 
     The operation of encoder 10, after emptying its contents from the last full cycle, is as follows: 
     
         ______________________________________Step 1 Switch    S1     S2   S3   S4     S5   S6  Position  1      1    2    1 or 2 2    1______________________________________ 
    
     The first 3 bits (101) are shifted into register 200 and output buffer 300. 
     
         ______________________________________Step 2 Switch    S1     S2   S3   S4     S5   S6  Position  1      1    2    1 or 2 1    1______________________________________ 
    
     Shift register 200 is shifted once more so that the highest order data bit enters position 201 and the 4 th  bit of data (0) enters position 204 and output buffer 300 simultaneously. 
     
         ______________________________________Step 3  Switch     S1     S2   S3   S4   S5   S6   Position   2      2    1    1    2    1______________________________________ 
    
     Shift registers 100 and 200 are completely circulated once. 
     
         ______________________________________Step 4  Switch     S1     S2   S3   S4   S5   S6   Position   2      1    2    1    1    1______________________________________ 
    
     Shift register 200 is shifted once so that the bit in position 202 shifts to position 201 and a &#34;0&#34; bit enters position 204. Steps 3 and 4 are repeated 3 more times, each time using the contents of register position 201 to determine the setting of switch S4. The division is now complete. 
     
         ______________________________________Step 5 Switch    S1     S2   S3   S4     S5   S6  Position  2      1    1    1 or 2 2    2______________________________________ 
    
     The parity check bits are emptied into buffer 300. The process is repeated for the next data word by returning to step 1. 
     A prior art serial encoder 10 for a generalized (n,k) block code with p≧0.414k is depicted in FIG. 2; this encoder embodies division circuitry similar to that of FIG. 1. In the circuit arrangement of FIG. 2, incoming bits of data arrive uniformly on lead 2011 every nt seconds and coded information is transmitted every kt seconds on lead 2012. Code information is partitioned and stored in shift registers 2400, 2500 and 2600. These registers are emptied every kt seconds through corresponding switches S6, S7 and S8, respectively; only one of these switches is closed at any given instant of time. Shift register 2400 (R1) is of length p and stores the parity check bits. Shift register 2500 (R2) is also of length p and stores the first p bits of the present data word, designated d&#39;(X) or d&#39; (the i th  bit is d&#39; i ). Shift register 2600 (R3) is of length (k-p) and stores the bits of d&#39;(X) starting with the (p+1) bit and ending with the bit in position k. Shift register 2300 (RI) is an interim store of length p and it collects the first p bits of each data word. 
     In operation, when register 2300 is full, its contents are moved, via switch S2 in position 1, to shift register 2200 (SR) and shift register 2500 within the nt interval preceding the arrival of the (p+1) data bit. The shift is synchronized with movement of the parity check bits of the last data word to register 2400 via switch 3 in position 2. Thus, shift-in bits propagate between register positions every nt seconds in register 2300 and every nt/p seconds in registers 2200 and 2500, whereas shift-out bits propagate between register positions every nt/p seconds in register 2300. 
     The arrival of the (p+1) bit of d&#39;(X) is synchronized with the movement of the first bit of d&#39;(X) from register position 2202 to position 2201 via switch S5 in position 2, of the second bit from position 2203 to position 2202, and so forth, until the (p+1) bit is entered into register position 2207 via switch S1 in position 1. The circulation of register 2200 for division by the contents of register 2100 (g&#39;(X)) occurs for the next k number of nt intervals; the circulate propagation interval between register positions in both register 2100 and 2200 is nt/p seconds. The operation of switches SA, S4 and S5 is essentially identical to the operation of switches S4, S3 and S5 in FIG. 1. 
     The binary division process is synchronized with the arrival of bits (p+1) through k of data word d&#39;(X). These (k-p) bits are stored in register 2600 via switch S1 and, as each bit arrives every nt seconds, it is entered into register position 2207. Moreover, during the division process, the data stored in register 2500, after a delay of (2n-k)kt seconds, is emptied, followed by a shifting-out of the contents of register 2600. The p parity bits residing in register 2200 are shifted to register 2400 during the nt interval preceeding the last shift-out operation of register 2600. Also, shift register 2300 is accumulating the p bits of the next data word d&#34;(X) during this same nt interval. 
     The above cycle can be repeated indefinitely provided registers 2400, 2500 and 2600 can be emptied at the appropriate times. 
     The operation of encoder 10 of FIG. 2 is summarized in the timing diagram of FIG. 3. Line (i) depicts the arrival intervals of data word d&#39;(X) and d&#34;(X). Line (ii) indicates the interval that bits are shifted from register 2300 to registers 2200 and 2500. Line (iii) shows the interval for which the binary division process is activated. Line (iv) indicates when the parity bits are shifted. Finally, line (v) indicates the shifting-out order of segmented code information from shift registers 2400, 2500 and 2600. 
     2. Encoder Illustrative Embodiments 
     A close examination of FIGS. 2 and 3 reveals that the arrangement of registers 2400, 2500 and 2600 is inadequate when p becomes a sufficiently small fraction of k; in particular, whenever p&gt;(√2-1)k, the prior art encoder of FIG. 2 does not function. This situation arises because the p bits from register 2500 have all shifted out before the (p+1) bit propagates along register 2600 to register position 2601. Because register 2600 is still shifting in, it does not contain the proper bit pattern to begin its shift-out operation. Since most practical codes, in order to efficiently utilize channel capacity, require a small p, the condition of p&lt;(√2-1)k is generally a system design constraint. 
     An illustrative embodiment of an encoder in accordance with the present invention that circumvents the deficiency of the prior art is shown in FIG. 5. In this configuration, the register that stores bits (p+1) through k (register 2600 in FIG. 2 ) has been partitioned into segment registers 4600, 4700 and 4800. This new configuration satisfies the data synchronism requirement as well as the shift register stipulation that each of these stores be shifting in or shifting out during a predefined period within an encoding cycle. 
     In the preferred embodiment of encoder 12, there are generally two ways to partition the segments. The first arrangement sets all segment lengths to p except the last, the length of which is the difference between (k-p) bits and the bits allocated to the previous segments of length p. A second way is to arrange the segment lengths in proportion to a geometric progression. 
     To exemplify these principles, a (15,11) block code is considered. With this code, p=4 so that p&lt;(√2-1)k≅4.5. Registers 4600, 4700 and 4800 are segmented to partition the 7 (k-p) bits required to be stored during the interval (p+1)(nt) through k(nt) in the following fashion: with the first arrangement, register 4600 is of length 4, register 4700 is of length 3 and register 4800 is not required; with the geometrical arrangement, register 4600 is of length 4, register 4700 is of length 2 and the last arriving bit is stored in register 4800. 
     With a (31,26) code, the first arrangement requires four segment registers of length 5 and one of length 1; the geometrical arrangement requires registers of length 1, 2, 4, 8 and 6, the last register accounting for bits unallocated to the geometric progression. 
     The operation of all elements of FIG. 4, except register segments 4600, 4700 and 4800, has been described with reference to FIG. 2. (Indicia of FIG. 2 have been incremented by 2000 when referred to in FIG. 4). Regarding the operation of registers 4600, 4700 and 4800, shift-in occurs during the interval (p+1)(nt) through k(nt), and shift-out occurs during the interval (p+1)(kt) through k(kt). Specifically, register 4600 shifts in from (p+1)(nt) through m(nt), register 4700 is activated from (m+1)(nt) through 1(nt), and so forth, until register 4800 shifts in from (l+1)(nt) through k(nt). The values, m, 1, . . . , are determined according to the equal distribution or geometric progression techniques. Switches S9 and S10 serve to synchronize the propagation of bits to channel 4012. 
     It is to be further understood that the encoder, and associated methodology, described herein is not limited to specific forms disclosed by way of example and illustration, but may assume other embodiments limited only by the scope of the appended claims. 
     3. Decoder Illustrative Embodiment 
     The circuit diagram depicted in FIG. 5 is an illustrative embodiment of a decoder implemented in accordance with the present invention. In gneneral, decoding comprises three distinct steps: (i) the calculation of the syndrome s(X) of received word r(X); (ii) shift and divide procedure of the syndrome s(X), that is, multiplication of s(X) by X 1 , 1=0, 1, . . . , k-1, followed by the division X 1  s(X)/g(X); and (iii) after each shift and divide, comparison of the partial remainder with the characteristic polynomial Γ(X)=X n-1  /g(X). 
     Decoder 20 in FIG. 5 has two syndrome shift registers 5200 (SR1) and 2600 (SR2), both of length p. While register 5200 is processing one received word, designated r&#34;(X) or r&#34; (bits are designated r i  &#34;, i=1, 2, . . . , n) to determine its corresponding syndrome, register 6200 is shifting and dividing the syndrome of the previous received word r&#39;(X). 
     Shift register 5100 (g&#39;(X)), of length p, and register 5200, together with exclusive OR circuit 5030 and switches SA1 and SB1, comprise the basic serial divide circuitry. During syndrome computation, the serial divide circuitry circulates once every kt seconds, corresponding to a register position-to-register position propagate time of kt/p seconds. Shift register 5400 (r&#34;(X)) stores the first k bits of r&#34;(X) arriving on lead 5011 during the same interval the syndrome of r&#34;(X) is being computed. Shift register 5300, of length p, stores the characteristic polynomial Γ(X). When the decoder section associated with register 5300 operates in the shift and divide mode, the contents of register 5300 are compared bit-by-bit with the contents of register 5200 via exclusive OR circuit 5031. A circulation in the comparison mode occupies one nt period, corresponding to a register position-to-position propagate time of nt/p seconds. Operating in synchronism with the comparison circulation is the shifting-out operation of register 5400. If all p bits contained in register 5200 after the 1 th  shift and divide operation match all p bits of Γ(X), then the 1 th  bit in r&#39;(X) is complemented for error correction in exclusive OR gate 5022. The correction is accomplished with the aid of inverter 5020 and toggle circuit 5021. Each bit of the comparison is inverted by circuit 5020 and toggle 5021 provides a logic one output only if all p bits received in the nt interval corresponding to the 1 th  data bit are logic one. 
     A structural and operational description similar to the one presented for the section corresponding to shift register 5200 applies for the other decoder section associated with register 6200. All indicia of the latter section are increased by 1000 over the indicia of the former section. 
     Data synchronization is achieved by switches SC, SD, Se and SF. These switches alternate between positions 1 and 2 for consecutive received words. The corrected data word appears on lead 5012, which is the output of exclusive OR gate 5022. 
     The timing diagram for decoder 20 of FIG. 5 is shown in FIG. 6. Line (i) indicates that the received words r&#39;(X) and r&#34;(X) arrive in blocks of n with kt seconds between each bit. Line (ii) shows that for the first p(kt) interval, received word bits r i  &#39; are loaded into register 6200. Upon arrival of the (p+1) bit, k steps of division are initiated and occur for the next k(kt) seconds. While r&#34; is being received and processed to determine its syndrome in register 5200 (line (iv)), comparison of the shifted and divided syndrome of r&#39; is occurring. Line (iii) indicates that only the first k bits of r&#39; are stored in register 6400, and this occurs at the input rate of kt seconds. Register 6400 is deactivated for the interval (n-k)kt through nkt seconds. Then register 6400 shifts out at the rate of one bit per nt seconds. Lines (iv) and (v) demonstrate that the same timing with respect to the complementary decoder section alternate with that depicted in lines (ii) and (iii). Line (vi) shows the settings of switches SC, SD, SE and SF to achieve proper synchronization. Finally, line (vii) indicates when the serial divide switches SA1, SB1 and SA2,SB2, associated with the first and second decoder sections, respectively, are activated. 
     It is to be further understood that the decoder, and associated methodology, described herein is not limited to specific forms disclosed by way of example and illustration, but may assume other embodiments limited only by the scope of the appended cliams.