Transmitting data words6853730Abstract There is provided a method of encoding a data word. The method includes (a) scrambling a data word to generate a scrambled data word, and (b) encoding the scrambled data word so that a first occurrence of the scrambled data word is encoded to produce a first code word, and a subsequent occurrence of the scrambled data word is encoded to produce a second code word. The second code word is different from the first code word. Claims What is claimed is: Description TECHNICAL FIELD
C0 0000011111
C1 0000101111
C2 0000111110
C3 0001001111
C4 0010001111
C5 1100000111
C6 0100001111
C7 1000001111
C8 0111110000
C9 1011110000
C10 0011111000
C11 1101110000
C12 1110110000
C13 1111000001
C14 1111010000
C15 1111100000
The sets of Dx.0 and Dx.4 codewords are all at least partially polarity independent, in that each codeword and its complement are both mapped to data having the same three most significant bits. For example, input data value 000 000 11 is coded as codeword D3.0 (Positive alphabet). The negative alphabet version of D3.0 is 1100011011. The complement of this codeword, 0011100100, is the positive alphabet codeword for data value D28.0, and so would be decoded as 000 11100. The three most significant bits of this value (000) are identical to those of the original codeword D3.0. (Some of the codewords are totally polarity independent. For example, input data 000 00000 is coded as a D0.0, which has a positive alphabet version that is the complement of its negative alphabet version.) Since two of these three most significant bits are fixed by the selection of the subsets {Dx.0. Dx,4}, only the most significant bit remains available in this case to carry useful information in a polarity independent manner. FIG. 3 shows a block diagram of the communications system Referring to FIG. 3, a multiplexer A is used to select an input signal to a scrambler 12 from among data, control state and delimiter inputs. The output of the scrambler 12 consists of an 8 bit word. Labelling the most significant bit of the word as bit 7 and the least significant bit as bit 0, bits 6 and 5 are passed to a multiplexer B. All other bits of the scrambler output are passed unmodified to tile input of an 8B10B coder 14. When data are being transmitted, the multiplexer B selects bits 6 and 5 of the scrambler output and passes them unmodified to the 8B10B coder input. When a control state is being transmitted, the multiplexer B selects two bits having value 0 and passes them to the input of the 8B10B coder 14. The operation of the multiplexer B thus causes the codeword subsets Dx.0 and Dx.4 to be used for coding control states. The output of the 8B10B coder 14 is passed to a multiplexer C. The other input to this multiplexer is the "comma" codeword, identified as K28.5. The multiplexer C selects the K28.5 codeword whenever training mode (for synchronisation) is selected and the coder output is simultaneously a D28.0 codeword. Otherwise the multiplexer C selects the output of the 8B10B coder 14. A multiplexer D selects between the 8B10B coder output and the output of a delimiter coder 16, which selects the appropriate delimiter Cz. The output of the multiplexer D is passed to a parallel to serial converter 18 which is coupled via twisted pair cable 20 to a polarity correction device 22 (a switchable signal inverter) and a serial to parallel converter 24 in the receiver. In the receiver, the output of the converter 24 is supplied to a decoder 26 which converts each 10-bit codeword to either data, control state or delimiter information, and sets a control input for a demultiplexer 28 accordingly. A de-scrambler 30 between the decoder 26 and the demultiplexer 28 is synchronised with the transmitter scrambler 12 during the training phase. When the system is initialised (for example after power up or a reset event), an initial set of procedures is followed during the training mode to establish communication between the transmitting and receiving nodes. The first stage of training is for the receiver to synchronise its clock with that of the transmitting node, for example by recovering clock information from the received signal in known manner. Having recovered a bit clock, the receiving node next achieves codeword synchronisation, and then synchronisation of the distributed sample scrambler 30. To facilitate bit, codeword and scrambler synchronisation, a set of training signals are exchanged between the two nodes, X and Y, as shown in FIG. 4. Initially each transmitter sends a training signal A. In the example shown the node X initiates a training phase by sending the training signal A, and the node Y responds when it receives this training signal. As explained below, the training signal A is chosen to have all the properties necessary to allow a receiving node to complete bit, codeword and scrambler synchronisation. Once the first node, X say, has completed synchronisation, it changes the signal it transmits to a training signal B. This indicates to the other node, Y, that the node X has completed, synchronisation. The training signal B is also chosen to have all the properties necessary for the node Y to continue synchronisation if not already completed. When the second node Y completes its synchronisation, it also changes its transmitted signal to the training signal B. This in turn indicates to the node X that the node Y has completed synchronisation. When a node determines that it is receiving the training signal B (i.e. its peer node has completed synchronisation) and that it has itself completed synchronisation and transmitted the training signal B for some minimum period, that node exits the training procedure. (Note that the training signal B must be sent for some minimum duration before a node exits training to ensure that the peer node is made aware that the node has completed synchronisation). An advantage of this technique is that each training signal can be designed to contain all the necessary information for bit, codeword and scrambler synchronisation. This is in contrast to prior systems in which a separate exchange of training signals is necessary for codeword synchronisation and scrambler synchronisation. Since each exchange of signals, or handshake, between nodes incurs a time penalty equal to at least the round trip time over the transmission channel, such other techniques are necessarily slower than the system described here. The requirements for a training signal which enables effective training, independently of the polarity of received signals, are: it should satisfy the requirements for radiated emissions; it should contain a comma codeword so that codeword synchronisation can be achieved; it should contain samples of the transmitter scrambler state; it should periodically indicate its status as a training signal; and the comma and scrambler information should be polarity independent. In the embodiment described herein, the training signals are a subset of the set of control states i.e. they are each generated by applying a predetermined, constant control state at the input to the transmitter scrambler 12. This control state is scrambled and the result is coded by the block coder 14. In this way the training signals share the properties of all other control signals, being composed of a pseudo-random sequence of control codewords. To enable insertion of a comma pattern into the training signal, one control codeword which corresponds to a pattern which occurs with predictable probability in the output of the scrambler 12 is chosen for replacement by an alternative comma codeword, the comma codeword by definition being unique with respect to all other codewords. The advantage of this is that the comma pattern is sent frequently but not in a periodic manner, thereby avoiding or at least diminishing the generation of a transmitted signal spectrum containing undesirable spectral peaks. The comma substitution also serves to distinguish a training signal from any other control signal, without a receiving node needing to have first established scrambler synchronisation. At the receiving node, the comma codeword is used to achieve codeword synchronisation, and decoded to give the same result as the replaced codeword. This technique is not limited to the substitution of a single codeword by a comma codeword. Several comma codewords may each be used to replace particular codewords, provided a one-to-one mapping is maintained between the comma codewords and the substituted codewords. The use of several comma codewords may serve to reduce the period required for comma detection. For codeword synchronisation to succeed independently of the polarity of the received signal, any comma codeword used should be chosen such that its complement also has the property of being a comma, i.e. it can only ever be found in one position relative to the codeword boundary in a stream of codewords. A further enhancement may be made by ensuring that the complement of any comma codeword used for substitution is not only a comma itself, but is also unique with respect to any other comma codeword that has been used. This property allows a receiving node to not only achieve codeword synchronisation independently of polarity, but also to determine that polarity inversion of the received signal has occurred when such a complemented comma codeword is received. With many practical block codes, the number of comma codewords available is very limited (perhaps to only one or two). In such cases, although it is possible to achieve polarity-independent codeword synchronisation, it may not be possible, or it may require an unacceptably latency, to achieve polarity detection in the manner described above. It is therefore desirable that the system be able to proceed with scrambler synchronisation in a polarity independent manner, and subsequently correct the polarity if necessary. In the case of a distributed sample scrambler a mechanism is needed to transmit samples of the scrambler state to the receiving node in order for that node to train its de-scrambler 30. For this training to be successful independently of the polarity of the received signal, the scrambler samples must be transmitted in a manner that is independent of polarity. This could be achieved through the use of a polarity-independent block code. However, these tend to make inefficient use of transmission bandwidth. Since the scrambler state need only be sampled periodically, then the samples may be transmitted in a polarity independent manner provided some portion (though not necessarily all) of the information capacity of the channel is polarity independent. One way in which this may be achieved is by making the codeword set used for transmitting scrambler samples partially polarity independent. The manner in which a codeword and its complement may be used to represent the same information as part of two distinct alphabets has been described above with reference to FIGS. 1 and 2, for the purposes of d.c. balance control. For such codewords, the information represented by each codeword is essentially transmitted in a polarity independent fashion. However, in other cases, the complement of a particular codeword may be used to represent other information than that represented by the codeword itself. For example, the complements of codewords that contain an equal number of ones and zeros can be used to represent other information than that for which the codeword itself is used, since the complement cannot be used to control d.c. balance. In the present system a partially polarity independent coding scheme is constructed by ensuring that codewords are mapped to information input to the multiplexer A such that any particular codeword and its complement represent information that has at least some subset of l (1<l<m) bits in common. In this way, information represented by any of the l polarity-independent bits will be correctly decoded independently of the received signal polarity. By transmitting samples of the scrambler state using one or more of those l bits that have polarity independence, scrambler synchronisation can be achieved regardless of the received signal polarity. Once scrambler synchronisation has been achieved, the only impediment remaining to successful information transfer is the possibility of polarity inversion. This can now be detected in a receiving node simply by checking that the received control state is indeed one of the anticipated training states. To this end, it is advantageous for the training state information to be represented by at least some of the bits that are not polarity independent. Should the receiver decode and de-scramble a control state other than the anticipated training control states, then it may determine that a polarity inversion has occurred. This technique has the advantage that the polarity inversion may be corrected at the receiver input without the need for the training procedure to be repeated. In the embodiment shown in FIG. 3, the training control states are chosen such that the most significant bit (bit 7) of the control state input to the multiplexer A is constant and in this case (arbitrarily) zero. Thus after scrambling, by virtue of the intrinsic operation of the scrambler 12, the most significant bit of the scrambled training control state is equal to the corresponding bit of the current scrambler state. One out of every eight scrambler state bits is therefore transmitted to the receiving node in a polarity independent manner. At the output of the 8B10B coder 14 in the transmitting node, each occurrence of a D28.0 codeword (see FIG. 1) is replaced with a comma codeword by the multiplexer C whenever a training signal is being transmitted. The pattern coded as the D28.0 codeword can be shown to occur in the output of the scrambler 12 with sufficient probability to enable effective use of the replacement comma codeword for codeword synchronization. The comma codewords used are those described in the article by Widmer and Franaszek referenced above, and are labelled K28.5. A positive and a negative alphabet version of this comma codeword exist, and these are used to replace the positive and negative alphabet versions of the D28.0 codeword respectively. At the receiver, the reception of the K28.5 comma codeword is used to achieve codeword synchronization in the serial-to-parallel converter 24, i.e. determine the location in the incoming bit stream of boundaries between successive 10 bit codewords to be supplied by the serial-to-parallel converter to the 8B10B decoder 26. The comma codewords do not provide polarity detection, as the positive and negative alphabet versions of K28.5 are complementary. With this arrangement it is possible that a spurious comma codeword might be generated by the concatenation of Dx.y codewords with Cz codewords, for example whenever a Cz codeword is used to delimit the start or end of a packet. This could lead to incorrect codeword synchronization when a receiving node has entered a training state but its peer node is still transmitting packets. This is plausible since there will be some delay between node A's initiating training, by generating a training signal, and node B's responding with its training signal. However, we have found that should such an erroneous comma codeword be generated and used as a reference during codeword synchronisation, then it is impossible for the preceding two codewords to be valid members of the set of Dx.0, Dx.4 codewords. Therefore the codeword synchronization process in this example is conditional upon not only receiving a comma codeword, but also upon that comma codeword being preceded by two consecutive valid Dx.0 or Dx.4 codewords. Once codeword synchronization is accomplished, the most significant bits of the successive decoded octets are used to train the de-scrambler 30. For an 1-bit scrambler shift register, 11 samples are required to complete scrambler synchronization. Once the de-scrambler is synchronized, the de-scrambled control state should equal one of the predetermined training control states. If polarity inversion has occurred, then the five least significant bits of the received control signal will either be unaffected or will be inverted, depending upon the particular codeword that was used to represent that control signal. Since the scrambling process causes a pseudo-random selection of Dx.0 and Dx.4 codewords to be used, the least significant 5 bits of the control signal will at some point be inverted if a polarity inversion exists. This inversion can be used to detect the polarity inversion and control corrective action. FIGS. 5 to 8 illustrate the signal values at various points in the transmitter and receiver during the training phase, in the case where a polarity inversion has occurred along the cable 20 between the transmitter and receiver. Each column in these figures represents a time period T1 to T22 of length equal to the time taken to transmit a single octet of data; the kth data octet or control state is transmitted during time period Tk. For the sake of clarity, it is assumed that the propagation delay experienced by signals passing through the transmitter, the cable and receiver is zero. In practice there would of course be some delay associated with each of these elements of the system. In this example a training signal is transmitted which has control state value 000 00000. During the training phase the multiplexer B selects two 0 bits to replace bits 6 and 5 of the scrambler output. At time period T3 an example of comma codeword substitution is shown. The output of the multiplexer B is 000 11100, which is coded as a D28.0 codeword. The occurrence of this codeword during training causes the multiplexer B to replace the D28.0 codeword with a K28.5 codeword. Because the running digital sum at the start of time period T3 is positive, the positive alphabet version of the codeword K28.5 is transmitted. (In this example, the output of the multiplexer D is always equal to the output of the multiplexer C.) After polarity inversion in the cable 20, the K28.5 codeword at time period T3 becomes the negative alphabet version of K28.5. This is also a comma codeword, and so at the end of time period T3 the receiver nonetheless achieves codeword synchronisation. During time periods T4 to T14 the receiver receives polarity-inverted codewords. However, in each case the most significant bit of the decoded codeword is equal to the most significant bit output by the transmitter scrambler 12, owing to the partially polarity independent nature of the control state coding. The receiver is therefore able to synchronise its de-scrambler 30 with the transmitter scrambler 12. This process requires 11 time periods (since 11 samples of the transmitter scrambler state are required). At the end of time period T14, the receiver de-scrambler is synchronised, and the receiver is able to examine the de-scrambled control state. Owing to polarity inversion between the transmitter and receiver, the received control state is 000 11111, at time period T15. This indicates that the polarity of the received signal is inverted, and the receiver can use this information to correct the polarity inversion in the correction device 22. Various modifications are possible to the system described above and shown in the drawings. For example, instead of having the 8B10B coder 14 supplying the multiplexer C, this multiplexer could receive the outputs of the scrambler 12 and the multiplexer B directly and select between two coders, one like the coder 14 for the normal 8B10B code and the other for this code but with the K28.5 codeword substituted for the D28.0 codeword.
|
Same subclass Same class Consider this |
||||||||||
