Voltage/timing margins, commands, responses, PAM4 margining, software interface
Lane Margining is a capability that allows system software to measure the voltage and timing margins of a PCIe link by instructing the receiver to adjust its sampling point and measuring the error rate at various offsets.
Measures vertical eye opening by offsetting the voltage threshold:
Voltage
▲
│ ┌─────────────────────────┐
+V │ │ Eye │
│ │ ┌─────────────┐ │
│ │ │ Sampling │◄─────┼─── Offset Up
│ ───┼────┼─────────────┼──────┼─── Nominal
│ │ │ Point │◄─────┼─── Offset Down
│ │ └─────────────┘ │
-V │ │ │
│ └─────────────────────────┘
└──────────────────────────────────► Time
Margining moves sampling threshold up/down from center
Errors indicate margin exhausted
Measures horizontal eye opening by offsetting the sampling time:
Voltage
▲
│ ┌─────────────────────────┐
+V │ │ Eye │
│ │ │
│ │ ◄──┬──► │
│ ───│─────│────────────────────── Sample Point
│ │ │ │
│ │ ◄──┴──► │
-V │ │ Left Right │
│ └─────────────────────────┘
└──────────────────────────────────► Time
↑ ↑
Early Late
Margining moves sampling point left/right from center
| Dimension | Min Steps | Max Steps | Units |
|---|---|---|---|
| Timing (8.0 GT/s) | 6 | 63 | % UI |
| Timing (16+ GT/s) | 6 | 63 | % UI |
| Voltage | 8 | 127 | mV |
| Field | Bits | Description |
|---|---|---|
| Receiver Number | [2:0] | Target receiver (for multi-receiver) |
| Margin Type | [5:3] | Command type (see below) |
| Usage Model | [6] | 0=Normal, 1=Voltage only |
| Margin Payload | [15:8] | Command-specific data |
| Value | Command | Description |
|---|---|---|
| 000b | No Command | No operation |
| 001b | Access Receiver Margining Control Capabilities | Query capabilities |
| 010b | Access Margin Control | Set margining mode |
| 011b | Step Margin Execution | Execute margin step |
| 100b | Go to Normal Settings | Return to nominal |
| 101b | Clear Error Log | Reset error counters |
| 110b | No Operation | NOP |
| 111b | Access Vendor-Defined Extended Capability | Vendor specific |
Time spent at each margin offset to accumulate errors:
PAM4 has three eyes that can be margined independently:
┌─────────────────┐
│ Eye 3 │ L3/L2 boundary
│ (Upper Eye) │
├─────────────────┤
│ Eye 2 │ L2/L1 boundary
│ (Middle Eye) │
├─────────────────┤
│ Eye 1 │ L1/L0 boundary
│ (Lower Eye) │
└─────────────────┘
Each eye can be margined separately for PAM4
| Offset | Register |
|---|---|
| 00h | Extended Capability Header (ID = 0027h) |
| 04h | Margining Port Capabilities |
| 06h | Margining Port Status |
| 08h | Margining Lane Control (Lane 0) |
| 0Ah | Margining Lane Status (Lane 0) |
| ... | Repeat for each lane |
Lane Margining temporarily degrades link performance as the receiver operates at non-optimal settings. It should typically be performed during maintenance windows or with redundant paths available.