Signaling · line codes

NRZ (PAM2) Signaling Primer

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.

The one-paragraph answer

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.

01The idea

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.

02Bits per symbol

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.

SchemeLevels MBits/symbol (max)EyesEye height vs NRZSNR penaltySlicers
NRZ / PAM221.000110 dB1
PAM331.58521/26.02 dB2
PAM442.00031/39.54 dB3
PAM883.00071/716.9 dB7

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.

03Bandwidth: where NRZ runs out

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.

Worked example · one 10 Gb/s lane, three ways

Same crude slope as the PAM3 page, 1.2 dB/GHz (a round number for the arithmetic, not a spec value):

$$\begin{array}{lrcrcr} & \text{loss at Nyquist} & & \text{level penalty} & & \text{total}\\ \text{NRZ:} & 5.00\ \text{GHz} \times 1.2 = 6.0\ \text{dB} & + & 0.00\ \text{dB} & = & 6.0\ \text{dB}\\ \text{PAM3 (11b/7t):} & 3.18\ \text{GHz} \times 1.2 = 3.8\ \text{dB} & + & 6.02\ \text{dB} & = & 9.8\ \text{dB}\\ \text{PAM4:} & 2.50\ \text{GHz} \times 1.2 = 3.0\ \text{dB} & + & 9.54\ \text{dB} & = & 12.5\ \text{dB} \end{array}$$

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:

$$\begin{aligned} L_{\text{NRZ}}\Bigl(1 - \tfrac{1}{b}\Bigr) &= 20\log_{10}(M-1) \qquad (b = \text{bits per symbol})\\ \text{PAM4: } L_{\text{NRZ}} &= \frac{9.54}{1 - 1/2} = 19.1\ \text{dB}\\ \text{PAM3 (11b/7t): } L_{\text{NRZ}} &= \frac{6.02}{1 - 7/11} = 16.6\ \text{dB} \end{aligned}$$

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.

04Eye height and the 0 dB reference

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:

$$\begin{aligned} P_{\text{sym}} &= 2\left(1 - \frac{1}{M}\right) Q\!\left(\frac{d}{2\sigma}\right)\\ \text{NRZ } (M=2):\quad \text{BER} = P_{\text{sym}} &= Q\!\left(\frac{d}{2\sigma}\right) = Q\!\left(\frac{A}{\sigma}\right), \qquad d = 2A \end{aligned}$$

Worked example · how much eye for BER 10⁻¹²

  1. \(Q(x) = 10^{-12}\) at \(x = 7.03\). So the eye must open \(A/\sigma \ge 7.03\), an eye height of \(2A \ge 14.07\,\sigma\).
  2. With \(\sigma = 2\ \text{mV}\) of vertical noise at the slicer, the inner eye needs at least \(28\ \text{mV}\) plus the slicer's offset and sensitivity.
  3. The horizontal version is the dual-Dirac jitter model: \(\text{TJ} = \text{DJ} + 2\,Q^{-1}(\text{BER})\,\text{RJ} = \text{DJ} + 14.07\,\text{RJ}\) at \(10^{-12}\). With \(\text{DJ} = 8\ \text{ps}\), \(\text{RJ} = 1\ \text{ps}_{\text{rms}}\): \(\text{TJ} = 22.1\ \text{ps}\). At 10.3125 GBd (UI = 97.0 ps) the eye is 77% open.

Bit errors vs symbol errors

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}\).

05Packing bits into line codes

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\) codewordsOverheadEfficiencyMax runUsed in
Raw NRZ——0%100%unboundedShort parallel buses with a forwarded clock
8b/10b2561,02425%80.0%5PCIe 1/2, USB 3.x Gen 1, SATA, SAS, Fibre Channel, DisplayPort 1.x
16b/18b65,536262,14412.5%88.9%boundedHDMI 2.1 FRL
64b/66b\(2^{64}\) + ctrlsync header + scrambled3.125%97.0%≤ 6610/25/40/100GBASE-R, Thunderbolt 3
128b/132b\(2^{128}\)4-bit header3.125%97.0%statisticalUSB 3.x Gen 2, DisplayPort 2.x UHBR
128b/130b\(2^{128}\)2-bit header1.5625%98.5%statisticalPCIe 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.

068b/10b, worked end to end

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.

Worked example · encode 0xB5

  1. Split: \(\text{0xB5} = 101\,10101_2\): HGF = 101 (\(y = 5\)), EDCBA = 10101 (\(x = 21\)). The byte is \(\text{D}21.5\).
  2. 5b/6b: D21 → 101010. Three ones, three zeros: neutral, so the running disparity is unchanged.
  3. 3b/4b: D.x.5 → 1010. Also neutral.
  4. Serialize: 101010 1010, a perfect 1010… pattern. D21.5 is the standard high-frequency test character because it puts every edge on the line.
  5. Rate: 2.5 GT/s of 8b/10b carries \(2.5 \times \tfrac{8}{10} = 2.0\ \text{Gb/s}\) of data, PCIe 1.0's 250 MB/s per lane.

A disparity-dependent character

  1. \(\text{D}0.0\) (0x00) starting at RD−: 5b/6b gives 100111 (four ones, disparity +2), so RD flips to +.
  2. 3b/4b now uses its RD+ form, 0100 (one one, disparity −2), bringing RD back to −.
  3. Word: 100111 0100, five ones and five zeros. Started at RD+ instead, the same byte is 011000 1011. Both decode to 0x00.

Decoding with an error

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.

07Running disparity and DC balance

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.

Worked example · how much baseline wander a long run costs

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}\).

$$\begin{aligned} C = 10\ \text{nF}:\quad f_c &= \frac{1}{2\pi \cdot 50 \cdot 10\times10^{-9}} = 318\ \text{kHz}\\ \text{1 Gb/s, run of } N = 1000:\quad \text{droop} &= 1 - e^{-2\pi \cdot 318\times10^{3} \cdot 1000 \cdot 10^{-9}} = 1 - e^{-2.0} = 86\%\\ \text{1 Gb/s, 8b/10b run of } N = 5:\quad \text{droop} &= 1 - e^{-0.010} = 1.0\%\\ C = 200\ \text{nF}, \text{ 8 GT/s, run of 72}:\quad f_c &= 15.9\ \text{kHz},\quad \text{droop} = 0.09\% \end{aligned}$$

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.

0864b/66b and 128b/130b: near-zero overhead

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.

Worked example · line rates

$$\begin{aligned} \text{10GBASE-R:}\quad & 10\ \text{Gb/s} \times \tfrac{66}{64} = 10.3125\ \text{GBd}\\ \text{25GBASE-R:}\quad & 25\ \text{Gb/s} \times \tfrac{66}{64} = 25.78125\ \text{GBd}\\ \text{PCIe 3.0:}\quad & 8\ \text{GT/s} \times \tfrac{128}{130} = 7.877\ \text{Gb/s} = 984.6\ \text{MB/s per lane}\\ \text{(with 8b/10b instead:}\quad & 8 \times \tfrac{8}{10} = 6.4\ \text{Gb/s, 23\% less)} \end{aligned}$$

How hardware builds it

  1. 64b/66b uses a self-synchronizing scrambler \(G(x) = 1 + x^{39} + x^{58}\): each output bit is \(s_n = d_n \oplus s_{n-39} \oplus s_{n-58}\). The descrambler needs no seed or alignment, but one line error becomes three data errors.
  2. 128b/130b (PCIe 3.0–5.0) uses an additive per-lane LFSR, \(G(x) = x^{23} + x^{21} + x^{16} + x^{8} + x^{5} + x^{2} + 1\), reset at known points. It adds no error multiplication, but transmitter and receiver must stay in step.
  3. The receiver slips its block boundary until it sees a valid header (01 or 10) in many consecutive blocks; 00 or 11 is a sync error.

The scrambler polynomials above are the published ones; check the exact seeds and reset rules in the specification before reusing them.

09Two levels that aren't NRZ

All of these use two voltage levels, but the bit-to-waveform rule differs:

CodeRuleBits/UIWhy use it
NRZIBit 1: toggle the level. Bit 0: hold. (USB 2.0 uses the inverse convention.)1Polarity-insensitive; it is the mod-2 precoder of section 12.
RZBit 1: pulse for half the UI, then return to the rest level.1Clock content in every 1; twice the bandwidth of NRZ. Optical and legacy links.
ManchesterEach bit is a mid-bit transition: 1 = low→high, 0 = high→low (IEEE 802.3 convention).1 per 2 half-bitsZero DC and a guaranteed edge every bit: 10BASE-T, 10BASE-T1S (Differential Manchester).

Worked example · Manchester on 10BASE-T

  1. 10 Mb/s, each bit split into two half-bit levels: 20 million half-symbols per second.
  2. All ones or all zeros: one transition per half-bit → a 10 MHz square wave. Alternating 1010: transitions only at mid-bit → 5 MHz.
  3. NRZ at 10 Mb/s would have a 5 MHz worst-case fundamental and no guaranteed edges. Manchester doubles the bandwidth to buy DC balance and self-clocking, a good trade at 10 Mb/s and a bad one at 10 Gb/s.

10The transmitter

Worked example · a 2-tap de-emphasis

Coefficients \(c_0 = 0.75\), \(c_1 = -0.25\), normalized so \(|c_0| + |c_1| = 1\):

$$\begin{aligned} \text{after a transition:}\quad & |c_0| + |c_1| = 1.00\\ \text{steady (repeated bit):}\quad & |c_0| - |c_1| = 0.50\\ \text{de-emphasis} &= 20\log_{10}\frac{0.50}{1.00} = -6.02\ \text{dB} \end{aligned}$$

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.

11The receiver: slicer, CDR, DFE

One slicer

$$\hat{y} = \begin{cases} +1, & v \ge 0\\ -1, & v \lt 0 \end{cases}$$

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.

One crossing family

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.

DFE

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\).

Worked example · what a 2-tap DFE buys

Pulse response at the slicer: cursor \(h_0 = 200\ \text{mV}\), post-cursors \(h_1 = 80\ \text{mV}\), \(h_2 = 20\ \text{mV}\).

$$\begin{aligned} \text{worst-case eye, no DFE} &= 2\bigl(h_0 - |h_1| - |h_2|\bigr) = 2(200 - 80 - 20) = 200\ \text{mV}\\ \text{with a 2-tap DFE} &= 2h_0 = 400\ \text{mV} \end{aligned}$$

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.

12Precoding against DFE bursts

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.

$$\begin{aligned} \text{Transmit:}\quad p[n] &= \bigl(x[n] - p[n-1]\bigr) \bmod 2 = x[n] \oplus p[n-1]\\ \text{Receive:}\quad \hat{x}[n] &= \bigl(\hat{p}[n] + \hat{p}[n-1]\bigr) \bmod 2 = \hat{p}[n] \oplus \hat{p}[n-1] \end{aligned}$$

Worked example · a 4-bit DFE burst

n01234567
data \(x\)01111101
precoded \(p\)01010110
burst error \(e\)00+1−1+1−100
received \(\hat{p}\)01101010
decoded \(\hat{x}\)01011111

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.

13Where NRZ is used

StandardBaudCodingData rateNotes
PCIe 1.0 / 2.02.5 / 5 GBd8b/10b2 / 4 Gb/s/laneAC-coupled, embedded clock
PCIe 3.0 / 4.0 / 5.08 / 16 / 32 GBd128b/130b, scrambled7.9 / 15.8 / 31.5 Gb/s/laneGen 5 adds optional precoding; Gen 6 moves to PAM4
USB 3.2 Gen 1 / Gen 25 / 10 GBd8b/10b / 128b/132b4 / 9.7 Gb/s/laneUSB4 v2 Gen 4 moves to PAM3
10/25GBASE-KR10.3125 / 25.78125 GBd64b/66b (+ optional RS-FEC at 25G)10 / 25 Gb/sBackplane Ethernet; 50G/lane and up is PAM4
SATA 36 GBd8b/10b4.8 Gb/s600 MB/s
DisplayPort 2.x UHBR10 / 13.5 / 20 GBd128b/132b≈77.4 Gb/s payload over 4 lanesCable and connector loss limit UHBR20 reach
HDMI 2.1 FRL3–12 GBd16b/18bup to 48 Gb/s over 4 lanesReplaced TMDS 8b/10b

Worked example · PCIe 5.0 x16 throughput

$$\begin{aligned} \text{per lane} &= 32\ \text{GT/s} \times \tfrac{128}{130} = 31.51\ \text{Gb/s}\\ \times 16 \text{ lanes} &= 504.1\ \text{Gb/s} = 63.0\ \text{GB/s per direction}\\ f_{\text{Nyq}} &= 16\ \text{GHz} \end{aligned}$$

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.

Worked example · USB 3.2 Gen 2 payload

$$\begin{aligned} 10\ \text{GBd} \times \tfrac{128}{132} &= 9.70\ \text{Gb/s} \approx 1.21\ \text{GB/s before protocol overhead}\\ \text{Gen 1 for comparison: } 5\ \text{GBd} \times \tfrac{8}{10} &= 4.0\ \text{Gb/s} = 500\ \text{MB/s} \end{aligned}$$

Moving from 8b/10b to 128b/132b alone is worth a 21% gain in payload per baud.

14NRZ vs PAM4

FactorNRZPAM4
Eye height (same swing)1 (0 dB)1/3 (−9.5 dB)
Baud for 64 Gb/s64 GBd32 GBd
Nyquist for 64 Gb/s32 GHz16 GHz
Slicers / unrolled DFE tap 11 / 23 / 12
LinearityNot needed: two levels are always "linear"Two inner levels; \(\text{RLM} \ge 0.95\) in 802.3ck
CDROne crossing familySix transition types, crossing skew
Typical targetRaw BER \(10^{-12}\), no FECRaw BER \(10^{-4}\)–\(10^{-6}\) with mandatory FEC
Where it winsLoss at NRZ Nyquist below about 16–19 dB; latency- and power-sensitive linksHigh-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)).

15Encoder playground

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.

16Interview drill

Why is NRZ still the default when PAM4 exists?

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.

What is the Nyquist frequency of a 25.78125 Gb/s NRZ lane?

Half the baud: 12.89 GHz. Channel loss and return loss are specified there.

What does 8b/10b buy for its 25% overhead?

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.

Why did PCIe 3.0 move from 8b/10b to 128b/130b?

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.

BER 10⁻¹² needs how many sigma?

\(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}\).

What is error multiplication in a self-synchronizing descrambler?

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.

What does NRZ precoding do?

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.

How would you validate an NRZ SerDes link on a new board?

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.