CodingBox Documentation

VDM and FEC metrics: PAM4 links

At 50G per lane and above, optical power stops being a sufficient health indicator: a PAM4 link with perfect Rx power can be one dirty connector away from uncorrectable errors, and the first sign is not a dBm but a bit error ratio. Two sources give that number. Inside the module, CMIS VDM (Versatile Diagnostics Monitoring) reports pre-FEC BER, SNR and laser health per lane; on the host, the FEC decoder counts corrected and uncorrected codewords. Together they show how far a link is from failure while it still carries traffic without loss.

Why FEC changed diagnostics

Every 25G+ Ethernet PMD on PAM4 (and most 25G NRZ ones) assumes Reed-Solomon FEC. The optics are allowed to deliver a raw error ratio of 10⁻⁵–10⁻⁴ because FEC repairs it to 10⁻¹² or better. The consequence: a degrading link shows no errors at all to the MAC until the FEC limit is crossed, then fails abruptly. The pre-FEC BER is the only smooth indicator of margin.

FECCodeCorrects per codewordPre-FEC BER limit for 10⁻¹² output (approx.)Used by
BASE-R ("FC-FEC", Clause 74)Fire code (2112, 2080)11-bit bursts≈ 10⁻⁷ … 10⁻⁸ gain of ~2 dB10G/25G NRZ, CA-25G-S
RS-FEC KR4 (Clause 91/108)RS(528, 514) over GF(2¹⁰)7 symbols≈ 5 × 10⁻⁵25GBASE-CR/SR/LR, 100GBASE-SR4/CWDM4/CR4
RS-FEC KP4 (Clause 119/134)RS(544, 514)15 symbols≈ 2.4 × 10⁻⁴all 50G PAM4 lanes: 50G/100G/200G/400G/800G
Concatenated / oFEC (coherent)inner + outer codes≈ 10⁻² … 2 × 10⁻²400ZR (CFEC), OpenZR+ (oFEC)

Configuration mismatches: FEC, auto-negotiation & link training.

VDM — what the module reports

VDM lives in CMIS pages 20h–2Fh (banked per 8 lanes) and is advertised in page 01h. Each observable has a descriptor (type, lane), a live sample, four thresholds and flags, exactly like the classic monitors.

PagesContents
20h–23hdescriptors: which observable, which lane, which threshold set
24h–27hsamples (2 bytes each)
28h–2Bhthresholds: high/low alarm, high/low warning
2Ch–2Fhflags and masks

Observable types (CMIS 4.0/5.x)

IDObservableUnit / formatWhat it tells you
1Laser age% (U16)vendor's estimate of consumed life
2TEC current% of max (S16)cooler load — Temperature & voltage
3Laser frequency errorMHz (S16)DWDM/ZR: distance from the grid
4Laser temperature°C (S16, 1/256)cooled lasers
5 / 6eSNR, media / host inputdB (U16, 1/256)electrical SNR after equalisation — the PAM4 "eye height"; > 18–20 dB comfortable, < 15 dB marginal (vendor-dependent)
7 / 8PAM4 level transition parameter, media / hostdBlinearity of the four levels
9 / 10Pre-FEC BER minimum, media / hostF16best over the interval
11 / 12Pre-FEC BER maximumF16worst over the interval — the number to alert on
13 / 14Pre-FEC BER averageF16
15 / 16Pre-FEC BER currentF16last sample
17–24FERC (frame error ratio count) min / max / avg / current, media / hostF16post-FEC uncorrectable frames — should be 0
128+coherent set (CMIS 5.x): modulator bias, CD, DGD, SOPMD, OSNR, eSNR, Q-factor, Rx total/signal power, carrier frequency offset…various400ZR/ZR+ modules

F16 is CMIS's 16-bit ratio format: a 5-bit exponent and 11-bit mantissa, value = mantissa × 10^(exponent − 24). A pre-FEC BER of 1.5 × 10⁻⁶ is stored as mantissa 1500 with exponent 15. Media side = the optical line; host side = the electrical interface to the switch ASIC — a bad host-side BER points at the connector or the board, not the fibre.

Host-side FEC counters

The switch or NIC counts, per port and often per lane:

CounterHealthyWatchFailing
Corrected codewordsgrowing slowly (pre-FEC BER 10⁻⁸ … 10⁻⁶)fast growth (10⁻⁵ at KP4)near the limit
Uncorrectable codewords0any incrementsteady increments = frame loss
Symbol errors per lanebalanced across lanesone lane dominatingthat lane's fibre/connector/laser
Pre-FEC BER (derived)< 10⁻⁷10⁻⁶ … 10⁻⁵> 10⁻⁴ (KP4)

Where to read them: show interfaces … fec / phy detail on most NOS (Verifying optics), ethtool -S (fec_corrected_blocks, fec_uncorrectable_blocks) and ethtool --show-fec on Linux, show interfaces counters fec on SONiC. Counters are cumulative — clear them and watch the rate.

Reading the two together

Rx powerPre-FEC BER / eSNRUncorrectableDiagnosis
in window< 10⁻⁷, eSNR high0healthy with margin
in window10⁻⁵, eSNR falling on one lane0that lane is degrading: dirty MPO fibre, ageing VCSEL, marginal connector — fix before it fails (Per-lane diagnostics)
lowhighsomebudget problem — Rx power & link budget
in window, both endshigh on host sidesomeelectrical: cage/connector contact, board, DAC quality, wrong equalisation settings
in windowhigh on media side, all lanessomedispersion, wrong reach class, wavelength off the mux, polarity partially wrong
fine0 errors, link flaps0not a signal problem — FEC/AN mismatch, thermal, software

Thresholds and alerting

VDM thresholds are set by the vendor; typical high-warning for pre-FEC BER is around a tenth of the FEC limit (2 × 10⁻⁵ at KP4). For alerting, use rates and trends: a pre-FEC BER climbing one decade in a week is a work order regardless of thresholds (Monitoring). Post-FEC uncorrectable errors are always an incident.

Where VDM is missing

SFF-8472 and SFF-8636 modules have no VDM: 10G/25G/100G NRZ links rely on host FEC counters and on Rx power. Some SFF-8636 modules expose vendor-specific SNR or BER in pages 20h–21h or vendor bytes — readable only with the vendor's tool. For NRZ without FEC (10G LR, 1G), CRC/input-error counters on the interface are the only bit-level view.

In CodingBox

For CMIS modules CodingBox reads the VDM descriptors and samples and shows them per lane alongside the classic monitors on DDM, decoding F16 ratios into plain numbers. Host FEC counters are outside the module and outside the programmer — they come from the switch.