4
\$\begingroup\$

This is probably very basic, so please bare with me.
In one hand, I read that PCIe is used for serial data communication, but on the other hand, it comes with x1, x2, x4, x8, x16 and x32 flavours.
But what's the use, or rather, the point of having, say, 32 lanes for a serial data communication?

*EDIT

Maybe I should have elaborate.

Sure, 32 lanes means 32 times faster, but then you can't say the communication is serial, because by definition it means that each clock cycle transfers one bit of information, whereas in PCIe x32, 32 bits are transferred at each clock cycle.

\$\endgroup\$
1

2 Answers 2

8
\$\begingroup\$

It's 32x faster.

Graphics cards require lots of high-speed data transfer, so they get lots of lanes; other devices like sound cards and serial interfaces can be served adequately by a single lane, which is cheaper.

In response to your edit:

Sure, 32 lanes means 32 times faster, but then you can't say the communication is serial, because by definition it means that each clock cycle transfers one bit of information, whereas in PCIe x32, 32 bits are transferred at each clock cycle.

Not quite: the lanes aren't synchronized with each other! That is the key difference between multiple serial lanes and a parallel interface. Each lane has its own clock. Even if multiple lanes transmit in a synchronous fashion, because the lanes aren't required to be exactly the same length they may recieve asynchronously.

https://en.wikipedia.org/wiki/PCI_Express#Serial_bus explains this.

(I'm trying to find a good explanation of whether bytes are split across the available lanes before or after the 8b/10b encoding is applied, but this detail of the physical layer seems to be underexplained)

\$\endgroup\$
7
  • \$\begingroup\$ Edited my post for clarification. \$\endgroup\$ Commented Oct 2, 2015 at 14:40
  • \$\begingroup\$ Edited response: the lanes are not synchronised. \$\endgroup\$
    – pjc50
    Commented Oct 2, 2015 at 15:10
  • 2
    \$\begingroup\$ @so.very.tired: It's a parallel arrangement of serial links, not a single parallel link. \$\endgroup\$
    – Ben Voigt
    Commented Oct 2, 2015 at 18:10
  • 1
    \$\begingroup\$ Think about what the skew refers to: the different arrival times of the signals relative to the clock. If it's a parallel system, there is only one clock and it must run slow enough that all the data signals arrive within one clock period. With the different lanes, each data bit has its own clock, so there is only one signal to consider for skew. The different clocks transmit at the same frequency, but may be skewed relative to each other: this doesn't matter, only the skew relative to their data signal. \$\endgroup\$
    – pjc50
    Commented Oct 3, 2015 at 19:20
  • 3
    \$\begingroup\$ @so.very.tired skew certainly affects PCIe links. Therefore they are designed explicitly to de-skew the link. There is a small elastic buffer on each lane, and when the link comes up the buffers will dump all received data until they all receive a synchronization control character over the link, which the transmitter sends simultaneously in all lanes. After that, the data coming out of the buffers will be aligned across the lanes. This is also done for 40G and 100G ethernet, which each consist of 4 parallel lanes. \$\endgroup\$ Commented Apr 16, 2018 at 18:54
3
\$\begingroup\$

The point is, of course, speed.

There are currently three versions of PCI Express with a fourth version in the works. Version 1 used a serial signalling rate of 2.5GHz. So if a x1-width card/socket were used, the maximum signalling bandwidth is 2.5G * (10 bits for 1 byte) = 250MB/s. 10 bits are signalled for 8 bits of data, so efficiency is 80%. Of course, there are TX and RX pairs of wires for communication in each "width" or "lane" of slot, so a x1 slot has 1 TX and 1 RX path as it's "lane." x2-width slots are seldom seen in my experience. x4 is 4 TX lanes and 4 RX lanes, enabling 250MB/s * 4 = 1GB/s. x8 slot = 2GB/s. x16 slot = 4GB/s.

PCIe v2.0 doubled the signalling rate from 2.5GHz to 5.0GHz, which of course doubles all of the previous bandwidths.

PCIe v3.0 couldn't double the signalling rate, but did bump it up to 8.0GHz. They also changed the specification to include less check-bits, sending 130 bits for 128 data bits, increasing the efficiency to 98.46%. x1 slot = 8.0G * (128bits/130bits) = 985MB/s to x16 slot = 15.754GB/s.

PCIe v4.0 is still being specified, but in 2017, intends to bump the signalling rate up to 16.0GHz, effectively doubling the v3.0 speeds. The encoding scheme hasn't (yet) changed.

Added (to answer refined question):

This link explains why serial links are faster than parallel, and essentially says that parallel links are more greatly affected by cross-talk and propagation delay issues as the clock rates are increased, which limit their speed. Serial links use a "differential" or "opposing-phase" transmission system, where two wires are used for each TX and RX link. The wires are driven with opposite polarity voltages, such that the receiver only needs to detect whether the signals are both one way or the other, which almost eliminates the issues that plagued parallel links. This is why serial links can go into the gigahertz range, and parallel links are much more limited.

And from the aforementioned Wikipedia article, "Data transmitted on multiple-lane links is interleaved, meaning that each successive byte is sent down successive lanes. The PCIe specification refers to this interleaving as data striping. While requiring significant hardware complexity to synchronize (or deskew) the incoming striped data, striping can significantly reduce the latency of the nth byte on a link."

AndrewM has to say, "The answer is that multi-lane serial links stripe bytes across the lanes at the sender and buffer them back into contiguous memory at the receiver (as appropriate). This maintains the resistance to propagation time differences, while increasing bandwidth."

So the data is striped, simultaneously, down all links at the same time. So data is broken up into blocks and sent, in parallel (more or less - receiver's job to synchronize the data), down all of the available links. It is a form of parallelization... just using serial links.

\$\endgroup\$
1
  • \$\begingroup\$ Edited my post for clarification. \$\endgroup\$ Commented Oct 2, 2015 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.