PHYSICAL LAYER DEEP-DIVE

Lane Margining at Receiver

Voltage/timing margins, commands, responses, PAM4 margining, software interface

1. What is Lane Margining?

What is Lane Margining at Receiver?

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.

Purpose

Capability Requirements

2. Margining Dimensions

Voltage Margining

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

Timing Margining

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

Margining Steps

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

3. Margining Commands and Responses

Command Format

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

Command Types (Margin Type)

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

Response Format

4. Margining Procedure

Basic Procedure

  1. Read Lane Margining Extended Capability to verify support
  2. Read Margining Control Capabilities
  3. Clear error log
  4. Set margin type (voltage/timing) and direction (up/down or left/right)
  5. Step to desired offset
  6. Wait for dwell time
  7. Read error count
  8. Repeat for additional offsets
  9. Return to normal settings

Dwell Time

Time spent at each margin offset to accumulate errors:

5. PAM4 Margining

Multi-Eye Margining

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

PAM4 Voltage Margining

PAM4 Considerations

6. Extended Capability Structure

Lane Margining at Receiver Extended Capability

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

Key Capability Bits

7. System Applications

Manufacturing Test

Predictive Maintenance

System Debug

Important: Impact on Link Traffic

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.