8B/10B Coding and Delimiters for 1000 Mbit/sec Ethernet Andreas Bechtolsheim March 12, 1996 Granite Systems 3450 Hillview Ave. Palo Alto, CA 94304 8B/10B Reference _________________________________________________________________ A DC-Balanced, Partitioned-Block 8B/10B Transmission Code A.X. Widmer, P.A. Frazansek IBM Journal of Research and Development Vol 27, No 5, 9/1983 Copyright (c) IBM Corporation 8B/10B Highlights _________________________________________________________________ Byte Oriented DC-Balanced Partitioned into 5B/6B and 3B/4B coders Maximum Run Length = 5 Maximum Digital Sum Variation = 6 Maximum Error Burst Length = 5 12 special characters meet coding rules 8B/10B DC Balance _________________________________________________________________ Disparity = Difference between 1s and 0s Each 6B/4B Coding sub-block has (+2 | 0 | -2) disparity Disparity is either -1 or +1 at the end of each code Zero Disparity Codes do not change running disparity Non-Zero Disparity Codes have two complementary codes Disparity vs time plot Figure not available in ASCII Delimiter Discussion ________________________________________________________________ * Delimiter Size: 32-bit vs 16-bit vs 8-bit * Delimiter Considerations * Frame Examples * Data Alignment * Other Delimiter Functions * Proposed Delimiter Set * Summary Delimiter Size: 32-bit vs 16-bit vs 8-bit _________________________________________________________________ 32-bit Delimiters: K28.x Dxx.x Dyy.y Dzz.z Provides up to (2^24) delimiters Overkill for Ethernet which only needs 5 delimiters 16-bit Delimiters: K28.x Dxx.x Provides up to 256 delimiters Compatible with existing silicon, allows 62.5 MHz clock 8-bit Delimiters: Kxx.x Provides 12 delimiters (K28.0..7 plus 4 reserved) Not compatible with existing silicon, requires 125 MHz clock 16-bit Delimiter Considerations _________________________________________________________________ 1. First character must be K28.X for hardware synchronization. It should be K28.5 to achieve the best clock recovery. 2. Second character must be a non K28.X character. It should be a "strong" data character (large number of transitions). 3. Running disparity at IDLE delimiter should always be negative to simplify system design, link bring-up and initialization. 4. Since the data field can end with either disparity, two EOF delimiters are required: one for positive and one for negative running disparity. 5. A precise JAM delimiter is required to maintain DC balance. Again, a positive and negative running disparity JAM delimiter must be provided. Frame Examples _________________________________________________________________ Normal Packet -IDLE- -SOF- -DATA- -EOP- -FILL- -IDLE- (neg. EOP) Normal Packet -IDLE- -SOF- -DATA+ +EOP2- -FILL- -IDLE- (pos. EOP) Collision -IDLE- -SOF- -DATA- -JAM1- -FILL- -IDLE- (neg. JAM) Collision -IDLE- -SOF- -DATA+ +JAM2- -FILL- -IDLE- (pos. JAM) +/- indicates positive or negative running disparity Note: The RX MAC must monitor the above state transitions in order to detect error conditions in the delimiters. Data Alignment _________________________________________________________________ 1. Requirement Current silicon requires delimiters to be aligned on a 16-bit boundary. Thus odd-byte length frames must be padded for 16-bit alignment. This should be invisible to the MAC, i.e. limited to the physical layer. 2. Padding Mechanism Choices are a reserved PAD character or special EOF framing. Advantage of the PAD character is it allows precise alignment of the data stream such that the MAC does not have to strip out extra octets. 3. The PAD character The PAD character must be one of the four reserved characters (K23.7, K27.7, K29.7, K30.7) since it can be neither K28.X nor Data. K27.7 appears to be the best choice for PAD Other Delimiter Functions _________________________________________________________________ 1. CSMA/CD Carrier Extension Use a "FILL" delimiter following EOF to indicate carrier extension for short packets in half-duplex CSMA/CD mode. 2. Half/Full-Duplex Auto-Negotiation Transmitter advertises half/full duplex capability continuously between frames using two distinct IDLE delimiters. Receiver instructs the local transmitter to operate in the mode common to local and remote node. 3. Link Status and Initialization Other delimiters are required to communicate link status, including detection of failures such as loss of signal or synchronization, and to perform link bring-up and initialization. Proposed 16-bit Delimiter Set _________________________________________________________________ Start-of-Frame: -SOF- : -K28.5+ +D5.0- End-of-Frame (neg): -EOF1- : -K28.5+ +D5.4- End-of-Frame (pos): +EOF2- : +K28.5- -D5.1- Collision-JAM (neg): -JAM1- : -K28.5+ +D9.4- Collision-JAM (pos): +JAM2- : +K28.5- -D9.1- Carrier Extension: -FILL- : -K28.5+ +D2.5- Idle (Half-Duplex): -IDLE1- : -K28.5+ +D2.1- Idle (Full-Duplex): -IDLE2- : -K28.5+ +D2.2- Packet-Alignment: =PAD= : =K27.7= +/- indicates positive or negative running disparity = indicates either running disparity Summary _________________________________________________________________ 1. Use 16-bit delimiters Simplest solution, compatible with current silicon, 62.5 MHz clock. Use K28.5 for comma character followed by strong data characters. Use positive and negative EOF and JAM delimiters to exit with -RD. 2. Use PAD to align odd-byte frames 16-bit alignment required by current silicon. Make 16-bit alignment invisible to the MAC layer. Use K27.7 PAD character to provide a precise delimiter. 3. Provide delimiters for all basic functions Carrier extension for short packets in half-duplex. Half/full-duplex capability indication during IDLE. Link status, bring-up, and initialization. Granite Systems, Inc. 3/12/96