Focusing on the Physical Layer (Gen1–Gen4), encoding, framing, link initialization, and special symbols.


1. Physical Layer Overview

The Physical Layer (PHY) is responsible for:

  • Transmitting and receiving serial data across lanes
  • Converting TLPs/DLLPs into electrical signals
  • Encoding/decoding for signal integrity
  • Handling link initialization, equalization, and training

ASCII Layer Diagram

+--------------------+
| Transaction Layer  | <- TLPs
+--------------------+
| Data Link Layer    | <- DLLPs
+--------------------+
| Physical Layer     | <- Electrical signals over lanes
+--------------------+

Key Functions:

  • Lane serialization/deserialization
  • Signal integrity (scrambling, equalization)
  • Framing TLPs/DLLPs
  • Generating and processing ordered sets
  • Link speed negotiation and recovery

2. PCIe Physical Layer Generations

GenYearLane SpeedEncodingMax x16 Bandwidth
Gen120032.5 GT/s8b/10b4 GB/s
Gen220075 GT/s8b/10b8 GB/s
Gen320108 GT/s128b/130b16 GB/s
Gen4201716 GT/s128b/130b32 GB/s

Gen1/2 use 8b/10b encoding
Gen3/4 use 128b/130b encoding for efficiency


3. Encoding & Scrambling

3.1 8b/10b Encoding (Gen1/Gen2)

  • Converts 8-bit data to 10-bit symbols
  • Ensures DC balance and enough transitions for clock recovery
  • Prevents long sequences of 0s or 1s

ASCII Example

Data: 10101100  ->  10-bit encoded: 1010110010
  • Used for special symbols like Start-of-Frame or Ordered Sets

3.2 128b/130b Encoding (Gen3/Gen4)

  • Groups 128 bits of payload + 2-bit header → 130-bit symbol
  • Reduces overhead vs 8b/10b
  • Supports higher bandwidth

3.3 Scrambling

  • Randomizes the bit stream to reduce electromagnetic interference (EMI)
  • Applied per lane
  • Ensures signal integrity across long traces

4. Link Initialization and Training (LTSSM)

PCIe links go through Link Training and Status State Machine (LTSSM):

ASCII LTSSM Simplified States

Detect
   |
   V
Polling
   |
   V
Configuration
   |
   V
L0 (Active)
   |
  L0s/L1 (Low power)
  • Detect: PHY detects connection
  • Polling: Negotiates speed and lane width
  • Configuration: Assigns device IDs, completes training
  • L0: Active link
  • L0s/L1: Low-power states

5. Special Symbols & Ordered Sets

PCIe uses special sequences for link management:

Symbol / Ordered SetPurpose
TS1Lane initialization and training
TS2Further lane equalization
EIOS (End-of-Initialization Ordered Set)Marks end of training phase
EIEOS (End-of-Initialization EIOS)Confirms link is ready

ASCII Example: Ordered Set Flow

[TS1] -> [TS2] -> [EIOS] -> [EIEOS] -> Link Active

Ordered sets are critical for reliable Gen3/Gen4 operation.


6. Start-of-Data Stream (OS) and Framing

  • Framing tokens indicate TLP boundaries
  • OS sequences are inserted to align the physical stream with DLL and Transaction layers
  • Ensures TLP/DLLP are correctly reconstructed at the receiver

7. Low-Power States

PCIe PHY supports link power management:

StateDescription
L0Fully active
L0sLow power with partial activity
L1Deeper low power (clock stopped)
DisabledLink inactive, device idle
LoopbackPHY loops back data internally (testing)
Hot ResetForce reset for recovery

✅ Low-power states are used to save energy without affecting performance.


8. Clock Tolerance Compensation & Equalization

  • PCIe uses Decision Feedback Equalization (DFE) and other techniques to compensate for signal degradation
  • Receiver adapts to incoming signals dynamically
  • Critical for high-speed links (Gen3/Gen4/Gen5/Gen6)

9. Summary – Physical Layer

Responsibilities:

  • Serial data transmission and reception
  • Encoding (8b/10b or 128b/130b)
  • Framing and scrambling
  • Link initialization and training (LTSSM)
  • Ordered sets (TS1, TS2, EIOS, EIEOS)
  • Low-power states and equalization

Scroll to Top