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):
| Feature | Purpose |
|---|---|
| Traffic Class (TC) | Assign priority levels to TLPs (0–7) |
| Virtual Channels (VC) | Separate logical lanes per priority/traffic type |
| Scheduler | Ensures high-priority traffic gets bandwidth |
| Buffers | Allocated 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 Type | Purpose |
|---|---|
| Header Credits | Number of TLP headers RX can accept |
| Posted Data Credits | For write payloads |
| Non-Posted Data Credits | For read requests / non-posted transactions |
| Completion Data Credits | For 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:
| Rule | Description |
|---|---|
| Posted Writes | Can be reordered unless flagged with Relaxed Ordering |
| Non-Posted Reads | Must complete in order, respect dependencies |
| Completions | Follow 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

