Focuses on PCIe QoS, virtual channels, flow control, credit types, and transaction/TLP ordering rules.


1. Quality of Service (QoS) in PCIe

PCIe supports QoS via Traffic Classes (TC) and Virtual Channels (VC):

FeaturePurpose
Traffic Class (TC)Assign priority levels to TLPs (0–7)
Virtual Channels (VC)Separate logical lanes per priority/traffic type
SchedulerEnsures high-priority traffic gets bandwidth
BuffersAllocated per VC to avoid head-of-line blocking

ASCII Example – VC Mapping

TLP TC=0 -> VC0 -> Low Priority
TLP TC=1 -> VC1 -> High Priority
TLP TC=2 -> VC2 -> Video Stream

2. Flow Control & Credit Types

PCIe uses credit-based flow control to ensure reliable transmission:

Credit TypePurpose
Header CreditsNumber of TLP headers RX can accept
Posted Data CreditsFor write payloads
Non-Posted Data CreditsFor read requests / non-posted transactions
Completion Data CreditsFor read completions from endpoint

ASCII Flow Control Example

[TLP Sent] -> RX buffers
RX sends FC DLLP -> TX updates credits
If credits exhausted -> TX stalls

3. Transaction Ordering Rules

PCIe enforces strict ordering rules based on transaction type and attributes:

RuleDescription
Posted WritesCan be reordered unless flagged with Relaxed Ordering
Non-Posted ReadsMust complete in order, respect dependencies
CompletionsFollow TLP Prefix/Sequence numbers to maintain order
Ordered Header Categories (OHC)A/B/C/E categorization ensures memory coherency

ASCII Example – Ordering

TLP1: Memory Write A
TLP2: Memory Read B
If TLP1 and TLP2 in same OHC category A:
 -> TLP1 must complete before TLP2

4. TLP Prefix Rules

  • TLP Prefix carries hints for ordering and routing:
    • PASID for virtual address tracking
    • TPH for transaction completion hints
    • Steering Tag for efficient routing

ASCII Prefix Flow

[TLP Prefix] + [TLP Header] -> Link -> RX reconstructs ordering based on Prefix

5. Virtual Channel Management

  • VCs isolate traffic classes to avoid interference
  • Each VC has dedicated buffer and flow control credits
  • Supports QoS for latency-sensitive applications (e.g., graphics, storage)

ASCII VC Example

VC0: Control Traffic
VC1: High Priority Data
VC2: Bulk Transfers
Scheduler ensures fair access

6. Summary – PCIe QoS & Transaction Flow

Responsibilities:

  • Separate traffic into Virtual Channels (VCs)
  • Prioritize via Traffic Class (TC)
  • Manage credits per VC for reliable flow control
  • Enforce transaction ordering rules using OHC and TLP prefix
  • Support PASID and TPH for virtualization and hints

Scroll to Top