8b/10b encoding: algorithm for encoding data for transmission in which each eight-bit data byte is converted to a 10-bit transmission character. Invented and patented by IBM Corporation. 8b/10b encoding is used in transmitting data on Fibre Channel, ESCON, and Gigabit Ethernet. 8b/10b encoding supports continuous transmission with a balanced number of ones and zeros in the code stream and detects single bit transmission errors.
See also: code balance, disparity, jitter, junk, K28.5
Concepts
In order to transfer data over a high-speed serial interface, data is encoded prior to transmission and decoded upon reception. The encoding process insures that sufficient clock information is present in the serial data stream to allow the receiver to synchronize to the embedded clock information and successfully recover the data at the required error rate. In addition, the 8b/10b encoding improves the line characteristics, enabling long transmission distances and more effective error-detection.
When IBM invented ESCON, 8b/10b encoding reduced the number of retransmissions because the combination of the encoding scheme (a form of parity) with a checksum could enable reconstruction of the data, i.e., you could fix a single bit error and validate the result by using the checksum. While retransmission is a typical event in an Ethernet or IP based network, retransmission at the high utilization rates found in storage area networks would severely impact performance. In addition, the encoding find errors that a simple parity check cannot detect. The Cyclic Redundancy Check (CRC) or checksum, further assists error detection. As a result, there are fewer retransmissions than would be the case if relying on CRC or parity alone.
Using the 8b/10b encoding algorithm adds 25% overhead to each character. Said another way, 20% of the channel is reserved for 8b/10b encoding overhead. This is not the only overhead, however it is the most significant factor. A common mistake of new administrators is to believe that a 100 MB channel could support 132,812,500 bytes per second in any direction, based on dividing by 8 bits as was true in traditional Ethernet based networks.
While
encoding eight-bit data bytes into ten-bit transmission characters may seem
inefficient, the encoded data stream has superior transmission characteristics
providing reliable transmission with low error rates. Because of its robustness,
8b/10b encoding has been used on several high-performance serial interfaces
including the
Enterprise Systems
Connection architecture (ESCON),
Serial Storage
Architecture (SSA), and Gigabit Ethernet optical links.
Because a serial interface such as fibre channel does not provide a separate
clock to identify when individual bits are valid, it is necessary to encode
clock information within the data stream. The encoding scheme used by fibre
channel encodes eight-bit data bytes into ten-bit transmission characters.
Details of the Encoding Process
The 8b/10b encoding process also provides a number of 10-bit characters conforming to the coding rules which are not required for representing data characters (there are more available code points in the 10-bit space than the corresponding 8-bit data space). These 10-bit characters are available for use as special characters to identify control or management functions.
It is helpful to recognize the notation structure because you might see it in an error messages. The notation structure is:

As you can see, there are two types of characters, special characters and data characters. What follows is the process of encoding. It begins with a character to be transmitted. All that follows is in silicon.

A character enters and lives as a binary representation. The message is transmitted in this bit sequence:

As it transmits the character, two additional bits join the stream. This are known as "running disparity" or "RD". The additional bits are variable and ensure that the number of "1" bits sent is approximates the number of "0" bits sent. RD initializes to negative. The encoding process provides a balance between the number of one bits and zero bits transmitted, a condition referred to as DC balance.
DC balance provides a number of benefits, among which are:
Insure that the duty cycle of lasers used in optical transmission is maintained at 50% for optimal performance and power dissipation.
Limit the amount of DC offset that accumulates at the receiver which facilitates setting the level detect thresholds.
Remove the need for DC restoration circuits which are difficult to design at the frequencies associated with fibre channel transmission.
The informal rules for calculating running disparity include:
if RD is negative or positive, and the number of "1" bits in the next encoded value to be sent or received is six (6), the next RD after the encoded values sent or received will be positive.
if RD is negative or positive, and the number of "1" bits in the next encoded value to be sent or receives is four (4), the next RD will be negative.
if RD is negative, and the number of "1" bits in the next encoded value to be sent or received is five (5), the next RD will be negative.
if RD is positive, and the number of "1" bits in the next encoded value to be sent or received is five (5), the next RD will be positive.
The formal rules include:
RD at the end of any sub-block is positive if the sub-block contains more ones than zeros. RD is also positive at the end of the six-bit sub-block if the six-bit sub-block is 000111, and RD is positive at the end of the four-bit sub-block if the four-bit sub-block is 0011.
RD at the end of any sub-block is negative if the sub-block contains more zeros than ones. RD is also negative at the end of the six-bit sub-block if the six-bit sub-block is 111000, and RD is negative at the end of the four-bit sub-block if the four-bit sub-block is 1100.
Otherwise, RD at the end of the sub-block is the same as at the beginning of the sub-block.
Knowledge Statements (things useful in an exam)
8b/10b encoding enables long transmission distances and more effective error-detection (than traditional parity).
8b/10b encoding incurs an overhead of 25% for each character or 20% of overall bandwidth.
8b/10b encoding scheme allows for special control characters.
8b/10b encoding is used by many high performance protocols, including: ESCON, FICON, Fibre Channel, Gigabit Ethernet optical links and SSA.
© 2008 Knowledge Transfer. All rights reserved.