Signaling · line codes
Two-level signaling from first principles: why it is the default, how far it goes before multi-level schemes win, how bits are packed and balanced (8b/10b, 64b/66b, 128b/130b), and how the receiver recovers them. Every section has a worked example with real numbers. Code tables marked illustrative show the method; the normative tables live in the standards.
NRZ (non-return-to-zero), also called PAM2, sends one of two levels per unit interval, so one symbol carries exactly one bit and the symbol rate equals the bit rate. It has the largest possible eye for a given swing, one decision threshold, one family of transitions, and the simplest transmitter, CDR and DFE. Its weakness is bandwidth: the channel must pass a Nyquist frequency of half the bit rate, and copper loss rises with frequency. NRZ stays the right answer until the channel loss at its Nyquist frequency exceeds the level penalty a multi-level scheme pays, roughly 16–19 dB on a smooth loss slope; past that, PAM3 or PAM4 wins. Because NRZ carries no structure of its own, links add a line code (8b/10b, 64b/66b, 128b/130b) or a scrambler for transitions, DC balance and alignment.
Each unit interval (UI) the driver holds one of two levels. Differentially these are \(-A\) and \(+A\); the receiver compares against a single threshold at 0. "Non-return-to-zero" means the level is held for the whole UI rather than returning to a rest level in the middle.
The 12-bit word 0x5A7 (0101 1010 0111) as 12 NRZ symbols, MSB first. The dashed amber line is the receiver's single decision threshold at 0.
An \(M\)-level symbol carries at most \(\log_2 M\) bits. NRZ is the \(M = 2\) case: exactly one bit, no packing problem, no wasted states. Every multi-level scheme is measured against it.
| Scheme | Levels M | Bits/symbol (max) | Eyes | Eye height vs NRZ | SNR penalty | Slicers |
|---|---|---|---|---|---|---|
| NRZ / PAM2 | 2 | 1.000 | 1 | 1 | 0 dB | 1 |
| PAM3 | 3 | 1.585 | 2 | 1/2 | 6.02 dB | 2 |
| PAM4 | 4 | 2.000 | 3 | 1/3 | 9.54 dB | 3 |
| PAM8 | 8 | 3.000 | 7 | 1/7 | 16.9 dB | 7 |
The penalty column is \(20\log_{10}(M-1)\); for NRZ, \(20\log_{10}1 = 0\). With the swing fixed, NRZ uses all of it for one eye.
Skin-effect loss grows as \(\sqrt{f}\) and dielectric loss as \(f\), so the loss at the Nyquist frequency grows with bit rate. NRZ's Nyquist is the highest of any scheme at a given bit rate; it wins only while that loss stays smaller than the level penalty the alternatives pay.
Same crude slope as the PAM3 page, 1.2 dB/GHz (a round number for the arithmetic, not a spec value):
At 10 Gb/s NRZ wins by almost 4 dB. At 40 Gb/s (the PAM3 page) it loses by about 2.5 dB. With loss linear in frequency, the crossover is where the loss saved equals the penalty paid:
So when the channel loses more than roughly 16–19 dB at the NRZ Nyquist frequency, a multi-level scheme starts to win on this budget. PCIe 6.0 is the textbook case: 64 GT/s NRZ would need a 32 GHz Nyquist with losses well past 60 dB, so it moved to PAM4 at the same 16 GHz Nyquist as PCIe 5.0.
Idealized eyes at the same peak-to-peak swing. NRZ has a single eye the full height of the swing; every other scheme divides it.
With Gaussian noise \(\sigma\) and level spacing \(d\), the general \(M\)-PAM symbol error rate collapses for \(M = 2\) to the familiar single \(Q\)-function:
For NRZ a symbol error is a bit error, so \(\text{BER} = P_{\text{sym}}\) directly. The line code above it can multiply errors: one wrong bit in a 10-bit 8b/10b word can corrupt the whole decoded byte, and one wrong bit in a self-synchronizing descrambler (64b/66b) produces three bit errors, one for each tap of \(1 + x^{39} + x^{58}\).
NRZ needs no bit-to-symbol packing, but a raw bit stream gives the receiver nothing to lock to: long runs of identical bits starve the CDR of edges, net DC content droops through AC coupling, and there is no way to find word boundaries. A line code maps \(k\) data bits into \(n\) line bits with \(n > k\), and spends the \(2^n - 2^k\) spare codewords on transitions, DC balance and control characters.
| Code | \(2^k\) data words | \(2^n\) codewords | Overhead | Efficiency | Max run | Used in |
|---|---|---|---|---|---|---|
| Raw NRZ | — | — | 0% | 100% | unbounded | Short parallel buses with a forwarded clock |
| 8b/10b | 256 | 1,024 | 25% | 80.0% | 5 | PCIe 1/2, USB 3.x Gen 1, SATA, SAS, Fibre Channel, DisplayPort 1.x |
| 16b/18b | 65,536 | 262,144 | 12.5% | 88.9% | bounded | HDMI 2.1 FRL |
| 64b/66b | \(2^{64}\) + ctrl | sync header + scrambled | 3.125% | 97.0% | ≤ 66 | 10/25/40/100GBASE-R, Thunderbolt 3 |
| 128b/132b | \(2^{128}\) | 4-bit header | 3.125% | 97.0% | statistical | USB 3.x Gen 2, DisplayPort 2.x UHBR |
| 128b/130b | \(2^{128}\) | 2-bit header | 1.5625% | 98.5% | statistical | PCIe 3.0–5.0 |
The trade mirrors the PAM3 block codes. Codes with many spare words (8b/10b) can enforce run length and DC balance by construction, at 25% overhead. Dense codes (64b/66b, 128b/130b) spend almost nothing and hand transitions and DC balance to a scrambler, which bounds them only statistically.
8b/10b (Widmer and Franaszek, IBM, 1983) splits each byte into a 5-bit and a 3-bit part and encodes them separately with 5b/6b and 3b/4b sub-codes. Bytes are named \(\text{D}x.y\), where \(x\) is the low five bits (EDCBA) and \(y\) the high three (HGF). Control characters are \(\text{K}x.y\). The line bits are sent as abcdei fghj, a first.
Flip one bit of a word and its disparity changes by ±2. The receiver tracks running disparity, so the error shows up either as an invalid 6b or 4b sub-block or as a disparity violation, at that word or a few words later. Like PAM3's unused (0,0) pair, the 768 unused 10-bit words give error detection for free; they do not say which bit was wrong.
The comma K28.5 (001111 1010 at RD−, 110000 0101 at RD+) contains the 7-bit sequence 0011111 or 1100000, which cannot occur across any boundary of valid data characters. Receivers use it to find 10-bit word alignment.
High-speed NRZ links are AC-coupled with series capacitors (PCIe, SATA, Ethernet backplanes) so the two ends can sit at different common-mode voltages. A coupling capacitor and the termination form a high-pass filter. A long run of one level droops toward zero: baseline wander, which eats directly into the eye.
8b/10b bounds this by construction. Every 10-bit word has disparity 0 or ±2, the encoder chooses the form that steers the running disparity (RD) back, and RD never leaves ±1. The longest run of identical bits is 5.
Single-pole high-pass with \(R = 50\ \Omega\) per leg and coupling capacitor \(C\); a level held for \(N\) bits of period \(T\) droops by \(1 - e^{-2\pi f_c N T}\).
An unbounded raw stream can lose most of its eye; a bounded code makes the problem disappear. Scrambled codes (last line) rely on large coupling capacitors and the statistical rarity of long runs instead: that is one reason PCIe 3.0 raised the AC-coupling capacitor range to 176–265 nF, from 75–200 nF for the 8b/10b generations.
Both prefix a scrambled payload with a short sync header that is always 01 or 10. The header guarantees one transition per block and marks the block boundary; the scrambler supplies everything else.
The scrambler polynomials above are the published ones; check the exact seeds and reset rules in the specification before reusing them.
All of these use two voltage levels, but the bit-to-waveform rule differs:
| Code | Rule | Bits/UI | Why use it |
|---|---|---|---|
| NRZI | Bit 1: toggle the level. Bit 0: hold. (USB 2.0 uses the inverse convention.) | 1 | Polarity-insensitive; it is the mod-2 precoder of section 12. |
| RZ | Bit 1: pulse for half the UI, then return to the rest level. | 1 | Clock content in every 1; twice the bandwidth of NRZ. Optical and legacy links. |
| Manchester | Each bit is a mid-bit transition: 1 = low→high, 0 = high→low (IEEE 802.3 convention). | 1 per 2 half-bits | Zero DC and a guaranteed edge every bit: 10BASE-T, 10BASE-T1S (Differential Manchester). |
Coefficients \(c_0 = 0.75\), \(c_1 = -0.25\), normalized so \(|c_0| + |c_1| = 1\):
Long runs are sent at half amplitude and transitions at full amplitude, which boosts high frequencies by 6 dB relative to low. The cost is that the low-frequency swing, and so the eye at the end of a short channel, shrinks.
The threshold sits at 0 for a differential link and does not depend on amplitude, so NRZ needs no AGC to place it. Offset is the main error: a 5 mV slicer offset on a 40 mV inner eye costs 25% of the margin on one side.
Every NRZ transition is a full swing that crosses the threshold at its midpoint, so edge-sampling (Alexander, bang-bang) CDRs see no data-dependent crossing skew from the level structure. Multi-level schemes lose this property (PAM3 section 11). What remains is ISI-induced jitter from incomplete settling.
First-order edge from \(-A\) to \(+A\): it crosses the threshold at \(t = \tau\ln 2 = 0.693\,\tau\). There is only one such family.
A DFE subtracts post-cursor ISI using past decisions: \(v'_n = v_n - h_1\hat{y}_{n-1} - h_2\hat{y}_{n-2} - \cdots\) An unrolled first tap needs \(2 \times 1 = 2\) comparators, at \(\pm h_1\).
Pulse response at the slicer: cursor \(h_0 = 200\ \text{mV}\), post-cursors \(h_1 = 80\ \text{mV}\), \(h_2 = 20\ \text{mV}\).
The DFE doubles the eye here without amplifying noise, which a linear CTLE would. The price is error propagation: a wrong \(\hat{y}_{n-1}\) adds \(2h_1 = 160\ \text{mV}\) of error to the next sample, enough to cause another error and start a burst.
For \(M = 2\), the \(1/(1+D)\) precoder is plain differential encoding (NRZI): addition mod 2 is XOR. PCIe 5.0 added it as an option at 32 GT/s, requested by the receiver, and PCIe 6.0 carries the same idea to PAM4.
| n | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|---|
| data \(x\) | 0 | 1 | 1 | 1 | 1 | 1 | 0 | 1 |
| precoded \(p\) | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 |
| burst error \(e\) | 0 | 0 | +1 | −1 | +1 | −1 | 0 | 0 |
| received \(\hat{p}\) | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 |
| decoded \(\hat{x}\) | 0 | 1 | 0 | 1 | 1 | 1 | 1 | 1 |
Check one inside the burst: \(\hat{x}[4] = \hat{p}[4] \oplus \hat{p}[3] = 1 \oplus 0 = 1 = x[4]\). Four wrong line bits become two wrong data bits (\(n = 2\) and \(n = 6\)). An isolated error, though, now costs two bits instead of one, so precoding is enabled only on channels where DFE bursts dominate.
| Standard | Baud | Coding | Data rate | Notes |
|---|---|---|---|---|
| PCIe 1.0 / 2.0 | 2.5 / 5 GBd | 8b/10b | 2 / 4 Gb/s/lane | AC-coupled, embedded clock |
| PCIe 3.0 / 4.0 / 5.0 | 8 / 16 / 32 GBd | 128b/130b, scrambled | 7.9 / 15.8 / 31.5 Gb/s/lane | Gen 5 adds optional precoding; Gen 6 moves to PAM4 |
| USB 3.2 Gen 1 / Gen 2 | 5 / 10 GBd | 8b/10b / 128b/132b | 4 / 9.7 Gb/s/lane | USB4 v2 Gen 4 moves to PAM3 |
| 10/25GBASE-KR | 10.3125 / 25.78125 GBd | 64b/66b (+ optional RS-FEC at 25G) | 10 / 25 Gb/s | Backplane Ethernet; 50G/lane and up is PAM4 |
| SATA 3 | 6 GBd | 8b/10b | 4.8 Gb/s | 600 MB/s |
| DisplayPort 2.x UHBR | 10 / 13.5 / 20 GBd | 128b/132b | ≈77.4 Gb/s payload over 4 lanes | Cable and connector loss limit UHBR20 reach |
| HDMI 2.1 FRL | 3–12 GBd | 16b/18b | up to 48 Gb/s over 4 lanes | Replaced TMDS 8b/10b |
That 16 GHz Nyquist is the reason PCIe 6.0 chose PAM4: doubling the rate again in NRZ would have doubled the Nyquist frequency, while PAM4 keeps it at 16 GHz.
Moving from 8b/10b to 128b/132b alone is worth a 21% gain in payload per baud.
| Factor | NRZ | PAM4 |
|---|---|---|
| Eye height (same swing) | 1 (0 dB) | 1/3 (−9.5 dB) |
| Baud for 64 Gb/s | 64 GBd | 32 GBd |
| Nyquist for 64 Gb/s | 32 GHz | 16 GHz |
| Slicers / unrolled DFE tap 1 | 1 / 2 | 3 / 12 |
| Linearity | Not needed: two levels are always "linear" | Two inner levels; \(\text{RLM} \ge 0.95\) in 802.3ck |
| CDR | One crossing family | Six transition types, crossing skew |
| Typical target | Raw BER \(10^{-12}\), no FEC | Raw BER \(10^{-4}\)–\(10^{-6}\) with mandatory FEC |
| Where it wins | Loss at NRZ Nyquist below about 16–19 dB; latency- and power-sensitive links | High-loss channels at 50 Gb/s per lane and above |
NRZ's other advantage is that it usually needs no FEC. PAM4 links nearly always add RS FEC, which adds latency (about 2 ns for PCIe 6.0's lightweight FEC, more for Ethernet's RS(544,514)).
RDS is the running sum of levels. Try 000 or FFF: NRZ and NRZI drift or sit still, Manchester stays balanced at half the bit efficiency, and the scrambler breaks the run up. The scrambler is additive with \(1 + x^6 + x^7\), seeded with all ones.
Largest eye for the swing, one threshold, one crossing family, the simplest CDR and DFE, and usually no FEC. Until the channel loses more than roughly 16–19 dB at the NRZ Nyquist frequency, the multi-level level penalty costs more than the bandwidth it saves.
Half the baud: 12.89 GHz. Channel loss and return loss are specified there.
Bounded run length (5), bounded running disparity (±1, so DC balance through AC coupling), comma characters for word alignment, and control characters. Error detection comes free from invalid codewords and disparity violations.
To get 2× the payload of Gen 2 without doubling the baud: \(8\ \text{GT/s} \times \tfrac{128}{130} = 7.88\ \text{Gb/s}\) versus \(5\ \text{GT/s} \times \tfrac{8}{10} = 4\ \text{Gb/s}\). Scrambling replaced 8b/10b's guarantees with statistical ones, which is why the AC-coupling capacitors grew.
\(Q^{-1}(10^{-12}) = 7.03\), so the eye half-height must be at least \(7.03\sigma\) and the eye at least \(14.07\sigma\). In the dual-Dirac model \(\text{TJ} = \text{DJ} + 14.07\,\text{RJ}\).
With \(1 + x^{39} + x^{58}\), each received bit is used three times (directly and at delays 39 and 58), so one line error produces three output errors. Additive scramblers (PCIe) don't multiply errors but need synchronized seeds.
Differential (NRZI-style) encoding, \(p[n] = x[n] \oplus p[n-1]\). A DFE burst of alternating errors becomes two errors at its edges; a single random error becomes two. PCIe 5.0 offers it as a receiver-requested option at 32 GT/s.
Transmitter: eye and jitter (TJ, RJ, DJ) at compliance, FFE presets, return loss. Channel: insertion loss at Nyquist, return loss, crosstalk, simulated with IBIS-AMI. Receiver: stressed-eye jitter tolerance, BER bathtub to 10⁻¹² by extrapolation, margining across PVT with neighbouring lanes active. Check AC-coupling capacitor values against the code's run-length assumptions.