9

In the physical layer of USB 3.0 there is an 8b/10b encoder.

Wikipedia says that this eliminated DC offset, while the tutorial I am reading says

it is a common encoding scheme in high-speed serial designs

What is the purpose of this encoding in the context of USB? Additionally, what other applications and benefits does this encoding provide in other types of devices?

Vorac
  • 3,091
  • 5
  • 29
  • 52

3 Answers3

10

The simple answer for an encoding like 8b/10b is that it ensures that the encoded data stream has at least a certain amount of data transitions. Without such encoding a long stream of 0's or 1's would tend toward looking like trying to send DC through the channel.

The same philosophy applies to Manchester encoding where the net bandwidth to transmit through the channel is two times the actual data bandwidth. The advantages touted for 8b/10b is that the transmission bandwidth used is much less than the 2X imposed by Manchester.

One wants to avoid DC through the channel for a number of reasons. Whilst each transmission channel has different types of requirements the main consideration is that DC does not go through capacitor or transformer coupled circuits very well. The other big consideration, even for direct coupled circuits, is that transitions are required to be able to sync a PLL circuit on the receiver end so that clocking can be recovered to allow strobing the data bits at the correct time.

Michael Karas
  • 56,889
  • 3
  • 70
  • 138
  • and the reason it is important to not have it 'look like DC' ...? – Andyz Smith Oct 10 '13 at 13:34
  • See added comment in answer.... – Michael Karas Oct 10 '13 at 13:48
  • 1
    "DC does not go through capacitor or transformer coupled circuits very well" - might as well leave the last two words off :) – Mels Oct 10 '13 at 14:19
  • i'd be a little worried if there was a transformer or a capacitor before the sensitive signal detector in a high speed digital transmission design, but yea, I'm with you and the clocking and strobing is what i'm really thinking of. i mean, this is the main difference between synchronous and asychronous transmission. and the reason why asynchronous is chosen time and time again, even though it wastes bits, because of it's resistance to noise. – Andyz Smith Oct 10 '13 at 14:20
  • @AndyzSmith "The electrical aspects of each path are characterized as a transmitter, channel, and receiver; these collectively represent a unidirectional differential link. Each differential link is AC-coupled with **capacitors located on the transmitter side** of the differential link." USB 3.0, section 3.2.1 – Vorac Oct 10 '13 at 14:53
  • "Sizing the AC coupling capacitors is done by calculating their capacitive reactance at the lowest frequency data stream that will travel down the path. The capacitive reactance at that frequency needs to be a small fraction of the transmission line impedance to avoid excessive attenuation and signal distortion. For random data patterns, the lowest frequency may be at or near DC, in which case the capacitors will have to have very large values. " – Andyz Smith Oct 10 '13 at 15:09
  • "Luckily, most of the data paths that use differential signaling employ an encoding scheme that makes sure the data stream never drops below some “idling” frequency. This idling frequency is used to recover the clock from the data stream at the receiver end. In this case, the capacitor value can be relatively small." – Andyz Smith Oct 10 '13 at 15:10
  • http://www.speedingedge.com/PDF-Files/DiffSigDesign.pdf – Andyz Smith Oct 10 '13 at 15:10
2

Apart from the nice properties mentioned by others, the other good things that 8b10b gives you include: 1. Easy discrimination at the receiver between link control and data symbols 2. Easy detection of ~75% of errors.

It's also surprisingly easy to build 8b10b transmitters and receivers in programmable logic; the original IBM patent specifies all of the logic operations required (and if you're too lazy for that, Chuck Benz has done it for you in Verilog).

Wikipedia has a very useful page on 8b10b as well.

markt
  • 4,936
  • 2
  • 15
  • 13
1

It is explained later in the linked tutorial, on page 15.

The listed reasons to apply this encoding to USB 3.0 are:

  • clock recovery - without the encoding, long streams of 1s or 0s would look like DC
  • error detection - when the receiver decodes the 10 bit symbol, there are many impossible symbols; receiving one of them signals an error.

A colleague has another hypothesis. Paraphrasing:

The cable has inductance and capacitance. This smooths the attacking front of the pulses. Thus, transmitting a single 1 would leave the bus in a certain electrical state, while transmitting several 1s will leave it in a different electrical state (closer to steady-state). Consequently, sending a 0 afterwords will be at a different potential in the two scenarios.


Thirdly, here is a quote from the standard, section 3.2.1

The receiver needs enough transitions to reliably recover clock and data from the bit stream. To assure that adequate transitions occur in the bit stream independent of the data content being transmitted, the transmitter encodes data and control characters into symbols using an 8b/10b code.

Vorac
  • 3,091
  • 5
  • 29
  • 52