64B/66B vs. 8B/10B Encoding: A Comparison

signal encoding
ethernet
data communication
64b/66b
8b/10b

This article explains the difference between 64B/66B and 8B/10B signal encoding types, both used in Ethernet-based systems. Ethernet uses various groups based on the transmission medium (copper or fiber optic).

For 10 Gbps systems, we have:

  • 10GBASE-R: Used on optical fiber.
  • 10GBASE-X: Used on both copper and fiber optic.
  • 10GBASE-T: Used on twisted pair.
  • 10GBASE-W: Used on SONET-based optical fiber.

For example, 64B/66B is used on 10GBASE-R and 10GBASE-W, while 8B/10B is used on the 10GBASE-X system. Let’s delve into these signal encoding techniques.

64B/66B Signal Encoding Scheme

The 64B/66B signal encoding technique is used in 10 Gigabit Ethernet systems like 10GBASE-R and 10GBASE-W.

  • 64B: Represents a 64-bit block of data.
  • 66B: Represents a 66-bit block of data.

In 10GBASE-R, the XGMII sublayer provides 64 bits of data to the PCS sublayer. This PCS sublayer, housing the 64B/66B signal encoding, adds 2 bits of data and outputs 66 bits. It adds ‘01’ for data blocks and ‘10’ for control blocks.

Different 64b/66b block formats are shown below, including both data and control blocks:

64b/66b Block Formats

Note that the bit patterns ‘00’ and ‘11’ are intentionally not used. This helps the receiver synchronize by looking for ‘10’ (high-to-low transition) or ‘01’ (low-to-high transition). The block lock state machine searches for ‘01’ or ‘10’ patterns every 66 bits in the received data blocks. If the machine finds 16 instances of ‘00’ and ‘11’ within 64 sync headers, it declares an “out of lock” state. This encoding helps delineate frames and control information.

The data is scrambled using a self-synchronous scrambler with the following polynomial. This scrambler operates only on the data portion and not on the ‘01’ and ‘10’ header patterns.

Scrambler polynomial: G(x) = 1 + x^39 + x^58

8B/10B Signal Encoding Scheme

The 8B/10B signal encoding is used in 10 Gigabit Ethernet systems like 10GBASE-X. The encoding block first divides 8 bits into 5 and 3 bits. The 5 bits are then encoded into 6 bits, and the 3 bits are encoded into 4 bits, resulting in a total of 10 output bits.

  • 8B: Represents 8 input bits.
  • 10B: Represents 10 output bits.

The mapping from 5 bits to 6 bits and 3 bits to 4 bits is done according to lookup tables defined in the Ethernet standard.

64B/66B vs. 8B/10B: Comparison

Here’s a table summarizing the key differences:

Specifications64B/66B8B/10B
Run LengthRelies on scrambler5
DC BalanceNot guaranteed, demanding for receiverExcellent
Bit Synchronization/Clock RecoveryRelies on scrambler, but at least one transition per 66 bitsExcellent
Word SynchronizationSync header”Comma” K characters
Control charactersControl codesK-characters