Patent Publication Number: US-6700510-B1

Title: Scalable physical coding sublayer (PCS) and 8B/10B encoder

Description:
TECHNICAL FIELD OF THE INVENTION 
     The present invention relates generally to physical coding sublayer (PCS) systems and in particular the present invention relates to a scalable PCS system. 
     BACKGROUND OF THE INVENTION 
     Encoding and decoding systems are often used in data communication. For example, fiber optic systems often use a byte oriented DC balanced run length limited  8 B/ 10 B encoder/decoder. One example of an  8 B/ 10 B encoder is provided in U.S. Pat. No. 4,486,739 issued Dec. 4, 1984 for “Byte Oriented DC Balanced  8 B/ 10 B Partitioned Block Transmission Code” by Franaszek et al., incorporated herein by reference. The Franaszek  8 B/ 10 B encoder/decoder partitions an 8-bit input word into a 5-bit portion and a 3-bit portion. The 5-bit portion is encoded into a 6-bit output, and the 3-bit portion is encoded into a 4-bit output. A detailed description of an  8 B/ 10 B encoding technique is described in Franaszek. 
     Run length is defined as a number of identical contiguous symbols (ones or zeros) that appear in a data stream. A large number of contiguous binary ones will produce a highly positive DC signal, whereas a large number of contiguous binary zeros will produce a highly negative DC signal. It is important, however, to maintain a DC balanced in the signal, both in long data strings as well as short data strings. 
     A disparity of a block of data is the difference between a number of data one bits and a number of data zero bits in a block of data. The Franaszek patent adjusts a DC level on output data by comparing the running disparity from prior words to the disparity of a current word being encoded. The output data word, or a complement thereof, is then output based upon the comparison. For example, if the running disparity is +1 and the current output word has a disparity of +2, the current output data is complemented to a word with a disparity of −2 and a −1 disparity is internally passed to the next encoding stage. That is, the running disparity from a  5 B/ 6 B encoder stage is passed to a  3 B/ 4 B encoder stage, and the running disparity from the  3 B/ 4 B encoder stage is held to encode the 5-bit input portion of the next word in the  5 B/ 6 B encoder. The running disparity for the  5 B/ 6 B encoder is latched on the negative edge of the clock, and coupled to the  3 B/ 4 B encoder. Similarly, the output of the running disparity from the  3 B/ 4 B encoder is latched on the positive edge of the clock and coupled to the  5 B/ 6 B block. 
     Bandwidth requirements of transmitted data are increasing with the increase in communication speeds. For example, the above-described encoder can handle a single 1.25 Gbit data channel. However, a 6.25 Gbit channel may be desired. Present  8 B/ 10 B encoders are not scalable to provide these increased bandwidth requirements. 
     A  16 B/ 20 B encoder is described in U.S. Pat. No. 5,663,724 entitled “ 16 B/ 20 B Encoder” to Westby, issued Sep. 2, 1997, incorporated herein by reference. The described encoder includes upper  5 B/ 6 B and  3 B/ 4 B encoder blocks and lower  5 B/ 6 B and  3 B/ 4 B encoder blocks. The single device couples a disparity from the upper  5 B/ 6 B block to the upper  3 B/ 4 B encoder block. A disparity from the upper  3 B/ 4 B encoder block is coupled to the lower  5 B/ 6 B encoder block. Likewise, a disparity from the lower  5 B/ 6 B block is coupled to the lower  3 B/ 4 B encoder block, and disparity from the lower  3 B/ 4 B encoder block is coupled to the upper  5 B/ 6 B encoder block. The described  16 B/ 20 B encoder is not scalable and a disparity of the upper 10 bits may not be accurately reflected in the lower 10 bits. 
     For the reasons stated above, and for other reasons stated below which will become apparent to those skilled in the art upon reading and understanding the present specification, there is a need in the art for a scalable physical coding sublayer. There is a further need for a scalable  8 B/ 10 B encoder/decoder. 
     SUMMARY OF THE INVENTION 
     The above-mentioned problems with encoders/decoders and other problems are addressed by the present invention and will be understood by reading and studying the following specification. The present invention provides a scalable  8 B/ 10 B encoder/decoder. 
     In one embodiment, a scalable physical coding sublayer (PCS) system comprises N encoders to receive input data, each of the N encoders provides encoded X-bit output data, and a controller to operate the N encoders to provide from  1  to N channels, along with combinations of integer multiples, Y, of the single channel, whose sum does not exceed N, each channel providing Y*X output bits, with the combined channel structure outputting X*N bits. 
     In another embodiment, a scalable physical coding sublayer (PCS) system comprises N encoders to receive input data and provide encoded output data. Each of the N encoders have synchronous and asynchronous data disparity outputs and defines a single communication channel. Disparity select circuitry is coupled to the N encoders, and a controller is provided to operate the disparity select circuitry to provide an N-wide communication channel. 
     In yet another embodiment, a physical coding sublayer (PCS) system comprises a state machine, an eight-bit input to receive eight bits of input data, and an eight-bit to ten-bit encoder coupled to the state machine and the eight-bit input. The eight-bit to ten-bit encoder comprises encoder circuitry to encode the eight bits of input data into ten bits of output data, disparity control circuitry to calculate a running disparity of the ten bits of output data, an output disparity connection to provide the running disparity of the ten bits of output data, and an input disparity connection to receive an externally provided running disparity. 
     An  8 B/ 10 B encoder comprises eight input data connections to receive eight input data signals, a control input connection to receive a control signal, a disparity input connection to receive a disparity input signal, and ten output data connections to provide ten encoded output data signals. A disparity output connection is provided to indicate a running disparity based on the ten encoded output data signals and the disparity input signal. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram of an encoder circuit of one embodiment of the present invention; 
     FIG. 2 illustrates three encoders of FIG. 1 coupled together; 
     FIG. 3 illustrates a NPCS system incorporating the present invention; 
     FIG. 4 is a simplified illustration of the NPCS system of FIG. 3; 
     FIG. 5 is a prior art mapping table of one possible  5   b / 6   b  encoding formula; 
     FIG. 6 is a prior art mapping table of one possible  3   b / 4   b  encoding formula; 
     FIG. 7 is a more detailed block diagram of one embodiment of the encoder of FIG. 1; 
     FIG. 8 is a table of special codes that can be used in a physical coding sublayer embodiment; 
     FIG. 9 is a table that illustrates some differences between an embodiment of the present invention and the prior art  5 B/ 6 B encoding formula of FIG. 5; and 
     FIG. 10 is a table that illustrates some differences between an embodiment of the present invention and the prior art  3 B/ 4 B encoding formula of FIG.  6 . 
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     In the following detailed description of the preferred embodiments, reference is made to the accompanying drawings, which form a part hereof, and in which is shown by way of illustration specific preferred embodiments in which the inventions may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention, and it is to be understood that other embodiments may be utilized and that logical, mechanical and electrical changes may be made without departing from the spirit and scope of the present invention. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present invention is defined only by the claims. 
     The present invention, in one embodiment, provides a scalable encoder/decoder. The encoder can be used in a variety of communication systems. One application is a PCS (physical coding sublayer) system. Prior to describing a PCS embodiment of the present invention, the encoder is described in greater detail. Many of the features of the encoder operation are described with reference to the PCS application. The PCS application, in general, encodes input data to provide output data. Specific coding formulas are used by the encoder and depend upon the system operation. The PCS application encodes data to maintain a DC balanced output. As such, output disparity of previous data is used to encode the data. The encoder, in a PCS system, outputs special codes to synchronize and operate the system. The present scalable encoder addresses the need to prohibit multiple transmissions of these special codes when multiple encoders operate together. Those skilled in the art will appreciate that encoding formula are often dictated by governing bodies, such as IEEE, and a particular formula does not form a part of the current invention. 
     One embodiment of the present invention is an 8-bit to 10-bit ( 8 B/ 10 B) encoder illustrated in FIG.  1 . The encoder  100  has a disparity output connection to allow multiple encoders to be coupled together to increase bandwidth of a system. The running disparity indicates a running DC disparity of a current 10-bits of output data based on the disparity of a previous 10-bits of output data. Two or more  8 B/ 10 B encoders can be coupled to provide different communication channel configurations. The following section of the detailed description describes an embodiment of the encoder and an application of the scalable encoder for use in a physical coding sub-layer. 
     The present scalable  8 B/ 10 B encoder  100  has two outputs, one for a synchronous running disparity  104 , and one for an asynchronous running disparity  102 . Each encoder also has a running disparity input  106  to receive a running disparity output signal from a scalable encoder, explained below. A synchronizing clock signal input  108  and a reset signal input  110  are also provided. An idle signal input  112  is used to request that idle data be sent from the encoder. A slave signal input  114 , when enabled, detects a specific input data pattern, and sends a pre-selected output data pattern, also explained below. A control signal (K) input  116  for the  8 B/ 10 B operation is also included. 
     The scalable encoder uses the running disparity connections to cascade encoders and provide communication channels that are wider than traditional 8-bit channels. FIG. 2 illustrates an embodiment where three scalable encoders  120 ,  125  and  130  are coupled together. The running disparity output from each encoder is selectively coupled to the disparity input of the other decoder(s). 
     Referring to FIG. 2, the three encoders are coupled to operate as an  8 B/ 10 B, a  16 B/ 20 B or a  24 B/ 30 B system. Disparity select circuitry  121 ,  126  and  131  is provided to route the disparity output signals to appropriate encoders in response to the encoder mode that is selected. A control circuit  133  is provided to control the disparity select circuitry. The control circuitry can include programmable registers to modify the select circuitry during operation to change a configuration of the system. When the encoders operate in an expanded mode ( 16 B/ 20 B or  24 B/ 30 B), the asynchronous disparity output is coupled from a first encoder to the subsequent encoder. The asynchronous disparity output, therefore, allows all of the encoders of the expanded system to calculate a disparity of the encoded data on a common clock cycle. The synchronous disparity output is used to provide a current disparity to the encoder for use as a basis for determining the disparity of the next clock cycle. 
     To better understand the expanded system, operation of the disparity select circuitry is described. If encoder  120  is desired to operate as a single  8 B/ 10 B encoder, select circuit  121  routes the synchronous disparity output from encoder  120  to the disparity input of encoder  120 . That is, encoder  120  synchronously provides the disparity input for itself. In operation, the synchronous disparity output provides the input for the next clock cycle disparity calculation. It will be appreciated that encoders  125  and  130  can be coupled in the same manner. The three encoders, therefore, can be operated as three  8 B/ 10 B encoder channels. 
     Encoders  121  and  125  can be coupled to operate as a  16 B/ 20 B encoder channel. These encoders need to simultaneously (same clock cycle) calculate a disparity for the 20-bit output. If the encoders were coupled in a synchronous manner, encoder  120  would generate a disparity for the first 10-bits on a first clock cycle and encoder  125  would generate a disparity for the second 10-bits on a second clock cycle. As such, the present invention provides an asynchronous disparity output. In operation, the asynchronous disparity from encoder  120  is coupled through disparity select circuit  126  to the disparity input of encoder  125 . The disparity for the first 10-bits of encoder  120  is coupled to encoder  125  to generate a disparity for the second 10-bits during a common clock cycle. The synchronous disparity output from encoder  125  is then coupled to the disparity input of encoder  120 . On a subsequent clock cycle, the disparity for the entire 20-bit output is used by encoder  120  to determine a new disparity. It will be appreciated that encoder  130  can be operated as an  8 B/ 10 B encoder channel in this expanded system. 
     The three encoders can be coupled together to provide a single  24 B/ 30 B encoder channel. In this configuration, the asynchronous output of encoder  120  is coupled to the disparity input of encoder  125 . Likewise, the asynchronous output of encoder  125  is coupled to the disparity input of encoder  130 . The synchronous disparity output of encoder  130  is coupled to the disparity input of encoder  120 . The three encoders, therefore, calculate a disparity for the 30-bits on each clock cycle. 
     Data provided as input to the encoders can be input special codes used to request a response from the encoders. Special input codes are identified when the control input is active (K=1). Further, the slave input signal for each subsequent encoder  125  and  130  in the expanded system is used to substitute an inert special code signal in response to the special code, such as a synchronizing code. That is, each of the multiple encoders should not transmit a special code when the encoders are coupled to operate as an expanded channel. The first encoder is used to provide the synchronizing output and the remaining encoders provide inert special codes. In an alternate embodiment, the single slave signal input for each encoder is replaced with two input connections to receive a two-bit slave signal input. This two-bit signal allows the encoder to select from multiple possible inert codes to transmit during slave mode. 
     Scalable PCS System 
     The encoder described above can extend the function of a physical coding sublayer (PCS) as described in IEEE standard 802.3 (incorporated herein by reference) to multiple channels, while still keeping the original functionality of the PCS intact. The present  8 B/ 10 B encoder system is referred to herein as a “NPCS” where N indicates a number of channels in the corresponding physical medium attachment (PMA) that can contain a 1.25 Gbit channel. The resulting NPCS has the ability to send N independent IEEE 802.3 channels, one single N wide (“extended”) channel, or combinations that result in the channel width. Using N=5 (5 decoders in the system) as an example, there are five possible combinations: five independent 1.25 Gbit channels; one 1.25 Gbit, and a 4*1.25 Gbit channel; one 1.25 Gbit channel, a 2*1.25 Gbit channel, and a 2*1.25 Gbit channel; a 3*1.25 Gbit channel, and a 2*1.25 Gbit channel; and a 5*1.25 Gbit channel. All of these combinations can be controlled while the encoder is operating. That is, control registers in a management section of the system can select a desired combination, as explained above. 
     FIG. 3 illustrates a simplified NPCS system incorporating the present invention. The system includes multiple  8 B/ 10 B encoders  300 ( 0 − 300 (n−1). The encoders are coupled as described above to operate in an extended mode. Each encoder has a state machine  302 ( 0 )− 302 (n−1) for controlling encoder operations. The encoders are coupled to the PCS/PMA interface  310 . Likewise, multiple encoders  320 ( 0 )− 320 (n−1) are used on the receiving side to decode data from the PCS/PMA interface. Data flow through the NPCS transmits the least significant bit first. That is, channel  0  is transmitted first, followed by channel  1 , continued to channel n−1. The first channel is considered the master, and encodes all data according to IEEE 802.3 rules. The slave encoders (channels  1  to n−1) substitute K28.5 comma patterns (synchronizing pattern) with K28.x patterns (inert pattern), where a user determines x. 
     Received data flow through the NPCS receives the least significant bit first. Channel  0  is received first, followed by channel  1  to channel n−1. The first channel is considered a master, and decodes all data according to the IEEE 802.3z rules. 
     A simplified illustration of the transmit portion of the PCS system is provided in FIG.  4 . The transmit portion of the PCS system includes three circuit blocks for each channel; an encoder  300 , a protocol state machine  311 , and a code state machine  302 . The encoder  300  acts as a pipeline for data, encoding according to standard IEEE 802.3z. The protocol state machine  311  wraps a protocol around the data to instruct the code state machine  302  to output the appropriate 10-bit data. The code state machine controls the pipeline to give the option of sending idles, data, special, or configuration code groups. When each channel (encoder) is operated independent, each protocol state machine  311  controls the code group state machine  302 . When the system is operating in an extended channel, one protocol state machine  311  controls multiple code state machines  302 ( 0 ) and  302 ( 1 ), see FIG.  4 . Multiple code state machines in extended mode are controlled by the lowest number channel ordered set state machine. 
     As an example, if a dual port PCS is selected to run in extended mode (one 20-bit wide channel), the ordered set state machine  311  for channel  0  controls both code group state machines  302  ( 0 ) and  302  ( 1 ) for channel  0  and channel  1 . As such, the channel  1  ordered set state machine is inactive. If a dual port PCS is selected to run in two channels, each ordered set state machine controls the local code group state machine. 
     The present scalable  8 B/ 10 B encoder, described above, is a cornerstone of the NPCS design. With the scalable encoder, multiple encoders can be linked together automatically. The encoder has two outputs, one for a synchronous running disparity, and one for an asynchronous running disparity. An idle input is also provided which is used to transmit idle data from the encoder. The idle data can be selected based upon the running disparity. In one embodiment of the PCS system, either D5.6 or D16.2 is sent depending on the running disparity. As explained above, the slave input is used to prevent slave encoders from outputting special codes. For example, the slave input, when enabled, detects K28.5 patterns and sends a K28.x pattern that has been pre-selected. 
     In commercially available  8 B/ 10 B encoders, 8 bits of unrestricted data are input along with a control bit “K”. The input data is provided on inputs A,B,C,D,E,F,G,H. 
     The input data is then mapped as 10-bit output data that is run length limited, and DC balanced. The ten bits of encoded output data are provided on outputs a,b,c,d,e,f,g,h,i,j. 
     The 8-bit to 10-bit encoding is implemented by dividing up the device into a 5-bit to 6-bit encoder, and a 3-bit to 4-bit encoder. An internal disparity device indicates if the running total of bits has more zeros, or more ones. 
     The coding formula used to encode 8-bits of data into 10-bits of data can be varied, and the present invention is not limited to any one formula. FIG. 6 illustrates one possible prior art mapping table for the  5   b / 6   b  encoders. Bits A,B,C,D,E are the five input bits that are to be encoded, with bit A being the least significant bit. The control bit K is logic low for every data byte that is transformed. If K is asserted high, the input is considered a special character, as explained below. The input data is illustrated as inputs A,B,C,D,E and each data has a corresponding name (data D. 0 -D. 31 , and control K. 23 , K. 27 -K. 30 ). Referring to the “BIT ENC” column of FIG. 6, symbols starting with “L” represent bits A,B,C,D and bit E is represented by itself. The format is L&lt;number of ones in ABCD&gt;&lt;number of zeroes in ABCD&gt;. For example, L 04  refers to no ones and four zeros in ABCD. Note, the dot (“•”) symbol indicates a logical and, while the tick “′” symbol indicates negation of the previous signal. 
     The mapping of the data from 5 bits (ABCDE) to 6 bits (abcdei) is accomplished by using the symbols in the “BIT ENC” column. The default mapping is to transfer the data ABCDE to abcde, and adding the bit ‘i’ as zero. For each Name entry, if there is a single symbol in the “BIT ENC” column, the shaded bits in abcde are inverted from ABCDE, or if they are no shaded bits in abcd, the bit ‘i’ is set to one. If there are two symbols in the “BIT ENC” column, the shaded bits in ABCDE are inverted by the first symbol evaluated to true, and the ‘i’ bit is set to one given the second symbol evaluation to true. The disparity column defines the current disparity calculation. The current disparity is referred to as D 0 . If the current disparity (D 0 ) does not match the previous disparity (D−1), the alternate columns are used to generate abcdei outputs. An ‘X’ is a don&#39;t care state, which also indicates there is no alternate output pattern. 
     FIG. 6 illustrates a prior art mapping table of one possible  3   b / 4   b  encoding formula. The  3 B/ 4 B operation is analogous to the  5 B/ 6 B table previously described. 
     FIG. 7 illustrates one embodiment of an  8 B/ 10 B encoder  300 . Bits {A,B,C,D,E,F,G,H} are input with a control bit {K} and bits {a,b,c,d,e,i,f,g,h,j} are determined according to an  8 B/ 10 B encoding formula. The present invention allows both extended bandwidth operation, and also has the ability to create multiple domains of lesser bandwidth within an extended channel. For example, if a 6.25 Gbit channel is available, the present invention has the ability to operate as a single 6.25 Gbit channel, or as five 1.25 Gbit channels. 
     The encoder embodiment of FIG. 7 includes the input/output connections described in FIG.  1 . The encoder has a  5 B/ 6 B encoder  303  and a  3 B/ 4 B encoder  305 . These internal encoders are coupled to disparity control  301 . The disparity control determines a current disparity of the ten output bits based on the encoders and the previous disparity provided on input  106 . 
     FIG. 8 illustrates a table of some special codes that can be used as a physical coding sublayer application. The special codes are usually used for synchronization. For instance, in a Gigabit Ethernet application, a K28.5 pattern is used for alignment, and other codes are used for start of frame, end of frame, extension, and error indication. As stated above, the special codes are used when K=1. The slave input signal is used to substitute an inert special code for the special code. That is, multiple encoders should not transmit the same special code when the encoders are coupled to operate as a single encoder. 
     Referring to FIG. 9, a table is provided that illustrates some differences between the present invention and the  5 B/ 6 B encoding formula explained above. The slave function is represented in the table by an asterisk ‘*’. When the slave mode is asserted in one embodiment of the present invention, the encoder substitutes a standard encoded output in response to a K28.5 code with an output pattern defined by a user. Thus, the present invention allows pre-selected data to be substituted for specific input codes and output in a slave mode. 
     Referring to FIG. 10, a table is provided that illustrates some differences between the present invention and the  3 B/ 4 B encoding formula explained above. The slave function is represented in the table by an asterisk ‘*’. When the slave mode is asserted in one embodiment of the present invention, the encoder substitutes a response to the K28.5 code with a pattern defined by a user. Again, the present invention allows pre-selected data to be substituted for specific input codes and output in a slave mode. 
     An IDLE DATA function is also provided in one embodiment of the encoder. When the Idle signal is asserted (logical high), the encoder provides output data that insures a negative running disparity. For example, in one embodiment the encoder transmits an output code of D5.6 if the current disparity is negative. If the disparity is positive, the encoder transmits an output code of D16.2. It will be appreciated by those skilled in the art, that the above codes insure a negative running disparity during idle operation. These code selections are provided for Gigabit Ethernet applications, but can be changed. As such, the present invention allows the output data pattern to be selected based upon a current disparity condition. 
     An additional benefit of the present invention is auto negotiation of speed based on the slowest operating speed. For example, the present invention can negotiate speed based on the slowest speed of 1.25 Gbit. If the system is operating at 2.5 Gbit, the NPCS can be adjusted to operate at 2.5 Gbit. 
     CONCLUSION 
     A scalable physical coding sublayer (PCS) can be adjusted to provide different combinations of communication channels and data widths. The PCS can use  8 B/ 10 B encoders having a disparity input connection and at least one disparity output connection. In one embodiment, the encoder has both a synchronous and an asynchronous disparity output. The encoder can be coupled with additional encoders to provide an expanded width channel. The asynchronous disparity from a first encoder is coupled to the disparity input of a second encoder. The synchronous disparity output of the second encoder is coupled to the disparity input of the first encoder. Additional configurations have also been described. In expanded operation, only one of the encoders needs to output special codes. The encoders, therefore, include a slave input connection to place the encoder in a slave mode. The slave mode replaces a special output code with an inert special code. All but one encoder in an expanded system are slave encoders. An idle input connection is also provided in the encoders. The idle connection is used to place the encoder in an idle mode where pre-defined data is output from the encoder. 
     Although specific embodiments have been illustrated and described herein, it will be appreciated by those of ordinary skill in the art that any arrangement, which is calculated to achieve the same purpose, may be substituted for the specific embodiment shown. This application is intended to cover any adaptations or variations of the present invention. Therefore, it is manifestly intended that this invention be limited only by the claims and the equivalents thereof.