TRANSACTION LAYER QOS

VC & Traffic Class Arbitration

Traffic Classes, Virtual Channels, arbitration algorithms (WRR, strict), and port arbitration

1. Traffic Classes (TC)

What are Traffic Classes?

Traffic Classes (TC) are 3-bit labels (TC0-TC7) in TLP headers that indicate the priority or type of traffic. They enable differentiated QoS handling throughout the PCIe fabric.

Traffic Class Values

TC Description Typical Use
TC0 Best Effort (Default) General traffic
TC1 Best Effort (Low Priority) Background traffic
TC2-TC3 Best Effort (Higher Priority) Elevated priority
TC4-TC5 Video/Streaming Low latency traffic
TC6 Controlled Load Guaranteed bandwidth
TC7 Network Control Highest priority

TC in TLP Header

2. Virtual Channels (VC)

What are Virtual Channels?

Virtual Channels (VC) are independent logical transmission pathways within a PCIe link. Each VC has separate flow control and buffering, enabling traffic isolation and differentiated QoS.

VC Characteristics

TC to VC Mapping

    Traffic Classes          Virtual Channels
    
    TC0 ─────────────────────► VC0 (always)
    TC1 ─────────────────┬───► VC0 (default)
    TC2 ────────────────┬┤
    TC3 ───────────────┬┤├───► VC1 (optional)
    TC4 ──────────────┬┤├┤
    TC5 ─────────────┬┤├┤├───► VC2 (optional)
    TC6 ────────────┬┤├┤├┤
    TC7 ───────────┬┤├┤├┤├───► VC7 (optional)
                   │││││││
                   └┴┴┴┴┴┴───► TC/VC Mapping Table
    
    Configuration determines which TCs map to which VCs
    TC0 MUST always map to VC0
    Other TCs can map to any enabled VC

3. Arbitration Levels

Two-Level Arbitration

    ┌────────────────────────────────────────────────────────┐
    │                      PORT ARBITER                      │
    │                                                        │
    │    VC0 ──┐                                            │
    │          ├──► Port Arbitration ──► Link Egress        │
    │    VC1 ──┤                                            │
    │          │                                            │
    │    ...   │                                            │
    │          │                                            │
    │    VC7 ──┘                                            │
    │                                                        │
    └────────────────────────────────────────────────────────┘
                            ▲
                            │
    ┌────────────────────────────────────────────────────────┐
    │                  VC ARBITER (per VC)                   │
    │                                                        │
    │    Port A (TC x) ──┐                                  │
    │                    ├──► VC Arbitration ──► VC Queue   │
    │    Port B (TC y) ──┤                                  │
    │                    │                                  │
    │    Port C (TC z) ──┘                                  │
    │                                                        │
    └────────────────────────────────────────────────────────┘
    
    Level 1: VC Arbitration - selects TLP within each VC
    Level 2: Port Arbitration - selects which VC to transmit

VC Arbitration

Arbitrates among TLPs within a single VC from multiple ingress ports:

Port Arbitration

Arbitrates among VCs for access to the link egress:

4. Arbitration Algorithms

Strict Priority

Round Robin (RR)

Weighted Round Robin (WRR)

    WRR Example (Weights: VC0=4, VC1=2, VC2=1, VC3=1)
    
    Round 1: VC0, VC0, VC0, VC0
    Round 2: VC1, VC1
    Round 3: VC2
    Round 4: VC3
    (repeat)
    
    Bandwidth: VC0=50%, VC1=25%, VC2=12.5%, VC3=12.5%

Time-Based WRR (TBWRR)

5. VC Capability Structure

VC Extended Capability

Offset Register
00h Extended Capability Header (ID = 0002h)
04h Port VC Capability Register 1
08h Port VC Capability Register 2
0Ch Port VC Control Register
0Eh Port VC Status Register
10h+ VC Resource Capability/Control/Status (per VC)

Key Capability Fields

6. Isochronous Traffic

What is Isochronous Traffic?

Time-sensitive traffic requiring guaranteed bandwidth and bounded latency:

Isochronous VC Requirements

7. System Configuration

Configuring TC/VC Mapping

  1. Enumerate VC capabilities of all devices
  2. Determine required VCs and TC mappings
  3. Configure TC/VC Map field in each device
  4. Configure arbitration tables if WRR used
  5. Enable VCs

Arbitration Table Programming

Important: TC/VC Mapping Consistency

TC/VC mapping must be consistent across the entire path from Requester to Completer. Inconsistent mapping can cause traffic to use different VCs at different points, breaking QoS guarantees.

8. Ordering Considerations

Ordering Within VC

Ordering Across VCs