Can some one explain how PCIe uses 10 bits to send 8 bits?

103 views

This text below is hard to understand. Some thing that the PCIe uses 10 bits to send 8 bits because it is a serial bus that it cannot send 8 bits.

Why the computer bus cannot send 8 bits because some thing to do with it being a serial bus or clock.

Quote PCIe is a serial bus with the clock embedded in the data, it needs to ensure that enough level transitions (1 to 0 and 0 to 1) occur for a receiver to recover the clock. To increase level transitions, PCIe uses “8b/10b” encoding, where every eight bits are encoded into a 10-bit symbol that is then decoded at the receiver. Thus, the bus needs to transfer 10 bits to send 8 bits of encoded data. Quote

In: 1

4 Answers

Anonymous 0 Comments

This is for error detection and timing. If every bit you send/receive corresponds to actual data, you have no way of knowing whether it’s correct. Maybe that letter was a P or maybe it was a Q? No way of knowing you just need to assume it’s correct. Was the bit you just read the end of the previous letter… or are you running slow, and it’s actually meant to be the start of the next letter?

If all the data you process is *actual data* you have no way of knowing if you’re receiving it correctly. If you had any idea what it was supposed to say you wouldn’t need to send it in the first place!

Adding bits lets you verify that it’s being sent/received correctly. For example, you always have a 0 to start. Then you have 8 bits of data. Then you have a 0 or a 1 to verify if the sum of those bits was odd or even.

If the first bit isn’t 0 you know your timing is wrong or you have an error. If the last bit doesn’t verify the middle 8 bits, you know you have an error.

Anonymous 0 Comments

The ELI5 explanation is that in this and similar cases you want to send about as many 1s as 0s.

Using 10 bits to send 8 bits means you can avoid long series of just 1s and use different ways to send the same value so that it evens out the ratio of 1s to 0s you send.

It also allows you to add some control characters.

This way of using more bits to send fewer bits in some medium to avoid sending long strings of 1s or similar is actually quite common.

CDs for example use pits and lands that could be understood as 0s and 1s directly , but because having too long pits makes things difficult, the encoding ensures that there is always some alternation going on.

Barcodes also never go all white or all black for too long, there is a maximum of how thick a stripe can be.

Pure math of there is nothing wrong with a string of dozens of 1s rarely translates well into physical media where you then need to figure out how many 1s that really was.

Encoding things to avoid such issues cost some extra bits in overhead but makes thing work better and faster.

Anonymous 0 Comments

Data is sent by alternating the electric potential between two voltage levels. The time slices when the level is either high or low are chosen by the sender can vary slightly. The receiver needs to have some mechanism for aligning to them. This can be done either by having the clock and data on separate lines, or the clock can be inferred from the data stream. Clock is basically the level alternating in a fixed pattern without any data. High speed connections today are usually serial over only one wire.

If several bytes equal to 0 or 255 (all bits clear or set) are transmitted in a row, the receiver sees a constant voltage for an extended period of time. As this continues, it will lose count of how many time slices have passed, and where the boundary to the next symbol is. A constant level direct current also can’t be easily passed over long cables, where it will tend to decay to zero.

A simple way of avoiding this condition is to allocate two clock intervals for each bit such as 01 for 0, 10 for 1. This cuts the maximum bandwidth in half. 8/10 is a tradeoff allowing for higher throughput. Bit sequences are essentially assigned new codes, skipping over ones with 1 or 0 runs. Because some combinations are not unavailable, additional additional two bits are required to represent all possible inputs.

Anonymous 0 Comments

What is the difference between sending zeros and not setting anything at all of you just send the data on a serial bus?

You can do that on a parallel bus because there is a separate clock line and you can add a specific line that says I am sending data. But on a serial line that is independent how do you know that anything is sent if there are just zeros?

The answer is you need to ensure that any message you send includes both zeros and ones. You also need the often enough changes from zero to one or the other way to determine the clock of the signal. So if you change 8 bits of data to 10 bites on the line you can create a signal that always includes both 1 and 0 and changes often enough to recover the clock.

There is a reason you have a serial signal with the clock built into the signal instead of a separate clock and data line like in a parallel bus.

How fast an electric signal propagates depend on its surrounding. It is hard to build many parallel wires where all signals travel at the same speed. There will be some variation in the arrival time of the signal. When you send data so fast that the variation in arrival time is comparable to the length of bits there will be lots of errors because the value of the line has not yet changed.

It is simple to have all lines as separate serial lines that operate at a bit higher clock speed so you can send 10 bits for 8 bits of data compared to trying to make electronics where all signals arrive at the same time.