News for hackers. Stuff that matters.
Re:PCI Express Retimers vs. Redrivers: An Eye-Popping Differ... by amelius on Wednesday August 26, 2020 @10:03AM (#24282567)
> A retimer is a mixed signal analog/digital device that is protocol-aware and has the ability to fully recover the data, extract the embedded clock and retransmit a fresh copy of the data using a clean clock.

How does the retimer recover the underlying clock if the signal is (say) all zeroes for an extended period of time?

And why is clock recovery from the data signal necessary in the first place? Can't the clock signal be recovered from the clock signal itself? Iow, why is the clock signal not one of the inputs to the retimer?

Re:PCI Express Retimers vs. Redrivers: An Eye-Popping Differ... by segfaultbuserr on Wednesday August 26, 2020 @10:53AM (#24282994)
> And why is clock recovery from the data signal necessary in the first place? Can't the clock signal be recovered from the clock signal itself?

In many (if not most) serial communication systems, there's no clock signal. The clock is embedded in the data itself. The data is encoded in a way that always guarantees enough changes (e.g. a long run of '0' or '1' is restricted) , so that the link partner can use the data itself as a reference to recover the clock. This is true for USB, Ethernet, PCI-E, most fiber optics communication systems (installing another cable just for clocking is rather awkward), among others.

Ideally, one data signal is all we need. This is known as a self-clocking signal [0].

[0] https://en.wikipedia.org/wiki/Self-clocking_signal

Re:PCI Express Retimers vs. Redrivers: An Eye-Popping Differ... by amelius on Wednesday August 26, 2020 @12:49PM (#24284288)
Thanks for the explanation, but when I look at a typical PCIe card, I see many connections (of which the clock could easily be one). It seems strange to convert to a serial connection with only two wires.
Re:PCI Express Retimers vs. Redrivers: An Eye-Popping Differ... by segfaultbuserr on Wednesday August 26, 2020 @01:17PM (#24284643)
Indeed, among the 18 pins in a PCI-E x1 slot, only four wires forms the actual data link, two for RX and another two for TX [0]. In terms of space, A PCI-E connection is really a piece of cake.

And interestingly, to make a designer's life easier, PCI-E does have a reference clock signal, but it doesn't directly control the data transfer, it's only here for establishing a stable frequency reference, so a card doesn't have to include its own clock (which is a possible option). Since PCI-E Gen 2, its use is entirely optional because data recovery was possible, see [1].

[0] https://en.wikipedia.org/wiki/PCI_Express#Pinout

[1] https://www.silabs.com/documents/public/white-papers/PCIe-Cl...

Re:PCI Express Retimers vs. Redrivers: An Eye-Popping Differ... by andyv on Wednesday August 26, 2020 @10:19AM (#24282694)
> How does the retimer recover the underlying clock if the signal is (say) all zeroes for an extended period of time?

Data is encoded such that all-zeros or all-ones doesn't happen. For Gen3, eight bits are encoded with ten bits, look up "10/8 encoding" for details. For Gen4+, blocks of 128 bits are exclusive-ored with random numbers, plus a pair of bits to keep the number of one bits roughly equal to the number of zero bits. This is "130/128" encoding.

> And why is clock recovery from the data signal necessary in the first place? Can't the clock signal be recovered from the clock signal itself?

Recovering the clock signal from the data avoids the need for an additional clock wire.

Re:PCI Express Retimers vs. Redrivers: An Eye-Popping Differ... by lizknope on Wednesday August 26, 2020 @11:22AM (#24283258)
Close but PCIE Gen3 was the first version that switched to 128/130 encoding.

https://en.wikipedia.org/wiki/PCI_Express#History_and_revisi...

Re:PCI Express Retimers vs. Redrivers: An Eye-Popping Differ... by baybal2 on Wednesday August 26, 2020 @11:53AM (#24283612)
A small correction. PCIE has a clock, but it's an utility reference clock only.
Re:PCI Express Retimers vs. Redrivers: An Eye-Popping Differ... by rrss on Wednesday August 26, 2020 @10:57AM (#24283034)
The clock signal is not sent because it would require another high-bandwidth wire and would introduce problems of clock skew within a lane. In other words, having a separate clock means you need to ensure that the clock and data signals are synchronized at the receiver, which is pretty difficult to achieve.

PCIe has this problem for lane-to-lane skew, but not within a lane. The limit for lane-to-lane skew is 1.6 ns. If each lane might also have similar skew between the data and clock, then the per-lane bandwidth would be limited to a few hundred megabits per second (instead of the achieved gigabits per second).

Re:PCI Express Retimers vs. Redrivers: An Eye-Popping Differ... by baybal2 on Wednesday August 26, 2020 @11:50AM (#24283556)
PCIE has no clock signal, only a common reference from which clocked signal is synthesized.