IEEE Gigabit Ethernet Interim Meeting May 21, 1996 Revision 2 Colonial Hiton, Wakefield, Mass. Richard Taborek Amdahl Corp. GIGABIT ETHERNET LINK CODES ___________________________ Proposal for link codes and receiver/transmitter states based on the PCS protocol requirements. CONTENTS ________ Link startup codes Automatic link configuration data SOP/EOP codes Idle codes Link synchronization The following companies have indicated their support for the concepts outlined in this proposal (in alphabetical order): 3Com, Amdahl, Cisco, Compaq, Granite, Packet Engines, Sun, VLSI Logic, and Xaqti. HIGH-LEVEL ASSUMPTIONS ______________________ o Codings are based on 8B10B data codes (Dx.y) and special control characters (Kx.y) as defined in ANSI X3.230 FC-PH (Fibre Channel) Clause 11. o Codings should take into careful consideration the error detection properties of code words selected. o Codings are required for all primitives specified for the link startup sequence. o Codings should provide sufficient coding space for all automatic capability detection parameters and shall be similar in nature to the base capability register defined in IEEE 802.3u clause 28. o Automatic capability detection codings should allow for future expansion of the associated protocol. o Codings are required for idle codes. o Codings are required for a defer indication to be signaled during the idle sequence. o Codings are required for IEEE 802.3 packets. o Codings are required for packet start and end delimiters. o Coding is required for a bad packet information indication. o Coding is required for an indication which allows the carrier to be extended. o Coding is required for an indication which ensures that packet or carrier extension always concludes on an odd-numbered character. NOMENCLATURE ____________ o One or more data codes and special characters are grouped into transmission words. o Special transmission words called ordered sets are defined. o Packet delimiter ordered sets are used to mark packet boundaries. o Signal ordered sets are used to signal events. o Sequence ordered sets are repeated ordered sets used to signal states, carry information and operate in enviromnents with relatively (to frames) high error rates. o The link is not considered usable until Link Initialization is complete. o Synchronization is achieved when the receiver identifies the same transmission word boundary on the received bit stream as that established by the transmitter at the other end of the link. o The detection of Invalid Transmission Words is an indication that a receiver is out of synchronization. o The clock recovery system in a receiver shall have sufficient hysteresis to prevent a single transmission error from causing it to go out of synchronization. o A loss_of_synchronization procedure defines the method by which the receiver changes from the synchronization_acquired state to the loss_of_synchronization state. o The first transmission character of an ordered set transmitted over an operational link is transmitted in an even-numbered character position. Subsequent characters continuously alternate as odd and even-numbered characters. 8B10B TRANSMISSION CODE _______________________ o 8B10B transmission code provides the following functions: - Improves transmission characteristics - Enables bit-level clock recovery - Improves error detection - Separates data symbols from control symbols - Derives bit and word synchronization o Data bytes are encoded into 10-bit Data Characters. o 12 Special Characters are defined for special signaling. o One or more Data and/or Special Transmission Characters may be grouped into Transmission Words. o Special Transmission Words called Ordered Sets are defined. o Ordered Sets are flexible building blocks which may be used for in-band or out-of-band protocol functions. ORDERED SET USAGE _________________ o Various coding objectives suggest the the specification of multiple length ordered sets. - A single character ordered set is required to ensure that the packet or carrier extension always ends on an odd-numbered character. - Multiple character ordered sets are required for sequences which include a comma and communicate a small amount of information. Two-character ordered sets provide 16/20 bit alignment. - The current requirements for automatic capability detection call for the support of greater than 8 bits of information which requires either multiple 2 character sequences or the use of larger ordered sets. The use of 4 character ordered sets provides ample coding space and provides information within a single ordered set. o Packets and sequences shall start only on even-numbered characters SPECIAL CHARACTER USAGE _______________________ o The K28.5 special character is chosen as the first character of all sequences for the following reasons: - Bits abcdeif make up a comma. A comma is a singular bit pattern which in the absence of transmission errors cannot appear in any other location of a transmission character and cannot be generated across the boundaries of any two adjacent transmission characters. - The comma can be used to easily find and verify character and word boundaries of the received bit stream. - Bits ghj of the encoded character present the maximum number of transitions, simplifying receiver acquisition of bit synchronization. o Special characters other than K28.5 are specified for single character ordered sets for alignment purposes or to provide timely function recognition. - Other special characters are chosen from the list of 12 available special characters. - The list is reduced to 9 when special characters containing a comma are excluded to prevent ordered set alignment on odd- numbered characters. DEFINED ORDERED SETS - IDLE SEQUENCE ____________________________________ o The I sequence is used to signal IDLE. - The I sequence effects the LINK_UP primitive which indicates that the link is available to send packets. - The first I sequence following a packet or link configuration sequence shall restore the current positive or negative running disparity to a negative value. Two I sequence codes are required for this purpose. - All subsequent I sequences shall insure negative runningmdisparity. - I sequences, including the first after a packet or link configuration sequence, shall be capable of signaling link DEFER/NOT_DEFER status. Two additional I sequence codes are required for this purpose. - I codes should have a high transition density to keep the receiver in optimum sync during the high-frequency IDLE sequence. - A set of four I codes, I1, I2, I3 and I4, are defined consisting of a K28.5 special character followed by a data character. DEFINED ORDERED SETS - START AND END OF PACKET DELIMITERS _________________________________________________________ o The S delimiter is used to signal Start-Of-Packet (SOP). - A single character ordered set is desired in order to quickly assert the CSMA/CD carrier indication. o The T delimiter is used to signal End-Of-Packet (SOP). - A single character ordered set is desired in order to assist in quick de-assertion of the CSMA/CD carrier indication. DEFINED ORDERED SETS - ALIGN/EXTEND SEQUENCE ____________________________________________ o The R signal is used to force even-numbered character alignment for the first IDLE following a packet or to extend the carrier following a packet. - A single character ordered set is required. - If T is transmitted as an odd-numbered character, and the CSMA/CD carrier is not extended, T shall be followed by two successive R signals in the absence of any error condition. o Two R's rather than none are required because of the possibility of running disparity error propagation to characters beyond those during which the error occurred. - If T is transmitted as an even-numbered character, and the CSMA/CD carrier is not extended, exactly one R shall be transmitted after the T in the absence of any error condition. - Additional R's shall be transmitted following a T to extend the CSMA/CD carrier as required. The last R to extend the carrier must be transmitted in an odd-numbered character position. DEFINED ORDERED SETS - INVALID PACKET DELIMITER/SIGNAL ______________________________________________________ o The H delimiter and signal is used to mark packet as invalid, and, if necessary, to extend the carrier following a packet error condition. - A single character ordered set is required. - An inter-station unit, such as a repeater, may substitute H for any packet character upon detection of a packet error. - Additional H's shall be transmitted following the first H to extend the CSMA/CD carrier indication to emulate normal carrier timing following a packet error. o The last H to extend the carrier must be transmitted in an odd-numbered character position. DEFINED ORDERED SETS - LINK_NOT_AVAILABLE & LINK_CONFIGURATION ______________________________________________________________ o The F sequence is used to indicate LINK_NOT_AVAILABLE. - The F sequence is signaled continuously while the associated receiver attempts to acquire synchronization. o The C Sequence is used to indicate LINK_CONFIGURATION. - C conveys a single parameter to the other end of the link. o The parameter is a 16-bit config_register that includes bits sufficient to specify the capabilities of a PHY as well as an ACK bit. o Config_Register format is styled after the Link Code Word (LCW) defined in IEEE 802.3u clause 28. - Config_Register data bits are coded as the third and forth characters of the LINK_CONFIGURATION ordered set. - The order of transmission of config_register data is encoded bits d0:d7 followed by encoded bits d8:d15. o The transmitted bit streams bears little resemblance to order of the Config_Register. CONFIG_REGISTER _______________ +-----------------------------------------------------+ |D0|D1|D2|D3|D4|D5|D6|D7|D8|D9|D10|D11|D12|D13|D14|D15| |S0|S1|S2|S3|S4|A0|A1|A2|A3|A4| A5| A6| A7| RF|ACK| NP| +-----------------------------------------------------+ Selector Field | Technology Ability Field | Config_Register bit usage: -------------------------- D5/A0: Full duplex capable D6/A1: Half duplex capable D7/A2: Defer capable D8/A3: Long Topology D9/A4: Short Topology D13/RF: Remote Fault D14/ACK: Acknowledge D15/NP: Next Page (Escape) LISTING OF ORDERED SETS _______________________ Code Function Encoding Beg. RD End RD ---- -------------------- --------------------- ------- ------ F LINK_NOT_AVAILABLE K28.5 D21.5 ? flip C LINK_CONFIGURATION K28.5 D26.1 LCR ? ? (LCR is the Link Configuration Register) I1 Flip disparity/not_defer K28.5 D5.6 + - I2 Flip disparity/defer K28.5 D10.5 + - I3 Disparity OK/not_defer K28.5 D2.2 - - I4 Disparity OK/defer K28.5 D16.2 - - S SOP K27.7 - + T EOP1 K23.7 ? flip R EOP2 K29.7 ? flip H EOPbad K30.7 ? flip CODING DISTANCE OF CHARACTERS USED IN ORDERED SETS __________________________________________________ Char D21.5 D2.2 D16.2 D10.5 D26.1 D2.2 7 . . . . D16.2 7 4 . . . D10.5 6 7 7 . . D26.1 6 3 5 4 . D5.6 4 7 4 6 10 LINK INFORMATION EXAMPLE ________________________ 802.3 info 8B10B codes ---------- ----------- LINK_NOT_AVAILABLE F LINK_NOT_AVAILABLE F ~ ~ LINK_NOT_AVAILABLE F LINK_CONFIGURATION C LINK_CONFIGURATION C ~ ~ LINK_CONFIGURATION C Disparity OK/Not Defer I3 Disparity OK/Not Defer I3 ~ ~ Disparity OK/Not Defer I3 0 PREAMBLE S 1 PREAMBLE Data = 10101010 2 PREAMBLE Data = 10101010 3 PREAMBLE Data = 10101010 4 PREAMBLE Data = 10101010 5 PREAMBLE Data = 10101010 6 PREAMBLE Data = 10101010 7 SFD Data = 10101011 8 DA Data = DA... ~ ~ LLC DATA Data = LLC DATA... ~ ~ FCS1 Data = FCS1 octet... FCS2 Data = FCS2 octet... FCS3 Data = FCS3 octet... FCS4 Data = FCS4 octet... EOP1 T EOP2 R EOP2 R ~ ~ EOP2 R (odd-num character) Flip Disparity/Not Defer I1 Disparity OK/Not Defer I3 ~ ~ Disparity OK/Not Defer I3 Disparity OK/Defer I4 Disparity OK/Defer I4 ~ ~ Disparity OK/Defer I4 Disparity OK/Not Defer I3 LINK_NOT_AVAILABLE F (error detected) LINK_NOT_AVAILABLE F ~ ~ LINK_NOT_AVAILABLE F LINK_CONFIGURATION C LINK_CONFIGURATION C ~ ~ LINK_CONFIGURATION C Flip Disparity/Not Defer I1 Disparity OK/Not Defer I3 ~ ~ Disparity OK/Not Defer I3 Disparity OK/Defer I4 Disparity OK/Defer I4 ~ ~ 0 PREAMBLE S 1 PREAMBLE Data = 10101010 2 PREAMBLE Data = 10101010 3 PREAMBLE Data = 10101010 4 PREAMBLE Data = 10101010 5 PREAMBLE Data = 10101010 6 PREAMBLE Data = 10101010 7 SFD Data = 10101011 8 DA Data = DA... ~ ~ LLC DATA Data = LLC DATA... ~ ~ FCS1 Data = FCS1 octet... FCS2 Data = FCS2 octet... FCS3 Data = FCS3 octet... FCS4 Data = FCS4 octet... EOP1 T (even char/no extension) EOP2 R Flip Disparity/Defer I2 Disparity OK/Defer I4 Disparity OK/Defer I4 ~ ~ Disparity OK/Defer I4 Disparity OK/Not Defer I3 Disparity OK/Not Defer I3 ~ ~ LINK INITIALIZATION ___________________ o The link is not considered usable until Link Initialization is complete. - To perform link initialization, a station transmits a prescribed sequence and simultaneously attempts to acquire bit and transmission word synchronization from the received signal. - The sequence transmitted varies according to whether the link is initializing, has lost synchronization while initializing, or has completed initialization. - Link initialization may occur during the transmission of the LINK_NOT_AVAILABLE, LINK_CONFIGURATION, or IDLE sequences. Invalid Transmission Words INVALID TRANSMISSION WORDS __________________________ o The detection of Invalid Transmission Words is an indication that a receiver is out of synchronization. o An invalid Transmission Word is recognized by the receiver when one of the following conditions is detected: - A Code Violation is detected within a Transmission Word; - A Special Character Alignment Error is detected. (e.g., a K28.5 character is received as an odd-numbered character, a non-K28.5 special character immediately follows a K28.5 character, a non supported special character is detected, etc.); - An ordered set with improper Beginning Running Disparity received. RUNNING DISPARITY _________________ 8B10B code recognizes the idea of a Running Disparity (the difference between the number of 1Ős and 0Ős transmitted). o The sender keeps the running disparity around zero, the receiver checks the sender. - After powering on or exiting diagnostic mode, the transmitter assumes the negative value for its initial running disparity. - Upon transmission of any transmission character, the transmitter calculates a new value for its running disparity. - After powering on or exiting a special mode, the receiver assumes either a positive or negative initial running disparity. - Upon reception of any transmission character, the receiver determines whether the character is valid and calculates a new value for its RD. - All IDLE ordered sets end with negative RD. I3 and I4 ordered sets also begin with negative running disparity. - I3 or I4 ordered sets may be removed or added from an encoded bit stream by an inter-station unit to compensate for differences in clock frequencies, one word at a time, without altering the beginning RD of the immediately preceding transmission word. SYNCHRONIZATION STATES ______________________ A receiver shall enter the synchronization_acquired state when it has achieved both bit and transmission-word synchronization. o Signal_status=OK when a receiver is in the synchronization_acquired state. The following four conditions shall cause an operational receiver to enter the loss_of_synchronization state. o Signal_status=NOT_OK when a receiver is in the NOT_OK state: 1) Completion of the loss_of_synchronization procedure; 2) Transition to power on; 3) Exit from receiver reset condition; 4) Detection of loss_of_signal. LOSS_OF_SYNCHRONIZATION PROCEDURE STATES ________________________________________ The following five detection states are defined as part of the loss_of_synchronization procedure: - State 1: No invalid transmission word has been detected (the No_Invalid_Transmission_Word detection state). - State 2: The first invalid transmission word is detected (the First_Invalid_Transmission_Word detection state). - State 3: The second invalid transmission word is detected (the Second_Invalid_Transmission_Word detection state). - State 4: The third invalid transmission word is detected (the Third_Invalid_Transmission_Word detection state). - State 5: The fourth invalid transmission word is detected (the Fourth_Invalid_Transmission_Word detection state). A receiver in the synchronization_acquired state may be in any of the first four detection states listed above. A receiver in State 5 shall enter the loss_of_synchronization state. LOSS_OF_SYNCHRONIZATION PROCEDURE TRANSITIONS _____________________________________________ The following detection states are defined as part of the loss_of_synchronization procedure. The transitions are: a) The first invalid transmission word is detected; b) An additional invalid transmission word is not detected in the next two or fewer consecutive transmission words; c) An additional invalid transmission word is detected in the next two or fewer consecutive transmission words; d) The receiver regains synchronization; e) The receiver is reset; f) The receiver exits a previously established reset condition. Synchronization Procedure State Diagram _______________________________________ + - - - - - - - - - - - - - - - - - - - - - - - - + ! Synchronization_Acquired ! ! +---------+ +---------+ +---------+ ! ! | |---a-->| |---c-->| | ! ! | State 1 | | State 2 | | State 3 | ! ! | |<--b---| |<--b---| | ! ! +----A----+ +---------+ +------A--+ ! ! | | | ! + - - -|- - - - - - - - - - - - - - + | | ! | ! c b ! +-------d---------+ ! | | ! + - - -|- - - + ! | | ! +---------+ ! +---------+ ! ! +--V------+ ! | |<--e---| |<--c---| | ! | Reset | ! | State 5 | ! ! | State 4 | ! | |---f-->| | ! ! | | ! +---------+ ! +---------+ ! ! +---------+ ! !Loss_of_Synch! ! ! + - - - - - - + + - - - - - - + TIDBITS AND UNFINISHED ITEMS ____________________________ o All special characters specified in this proposal other than K28.5 may cause false comma detection following a single-bit error. Two events make false comma detection more likely: 1) hot sync; 2) 7-bit comma detection. Reduction of the probability of false comma detection is desirable. o A diagnostic/maintenance mode is desirable for procedures such as jitter testing, remote wrap, etc. - A LINK_OFFLINE sequence and associated state is suggested for inclusion in order to allow a station to be placed in the Offline state. When in the Offline state, as well as transitioning from Online to Offline, the other end of the link shall not record receiver errors. o This proposal specifies a single error state for the receiver which is called the loss_of_synchronization state. The PCS protocol state excessive_receive_errors can be defined as causing entry to the loss_of_synchronization state.