(Requester ID, Tag, Traffic Class, Attributes, and Data Rules)
- (Requester ID, Tag, Traffic Class, Attributes, and Data Rules)
- 1. Introduction
- 2. Overview of Descriptor Fields
- 3. Requester ID
- 4. Tag Field
- Tag Allocation Rules:
- 5. Traffic Class (TC)
- 6. Attributes Field (Attr[2:0])
- 7. Length Field
- 8. Rules for TLPs with Data Payloads
- 9. Design Insight – Tag and Requester ID Logic
- 10. Summary
- NOTES
1. Introduction
Each Transaction Layer Packet (TLP) carries not just data, but also a set of descriptor fields that describe who sent the packet, what it’s for, how it should be handled, and how responses should be matched.
These fields are packed into specific header locations and include:
- Requester ID
- Tag
- Traffic Class (TC)
- Attributes (Attr)
- Transaction Rules for Data Payloads
They make PCI Express transactions stateful, traceable, and deterministic.
2. Overview of Descriptor Fields
Field | Width | Purpose |
Requester ID | 16 bits | Uniquely identifies the device/function initiating the request |
Tag | 8 bits | Distinguishes multiple outstanding requests from the same requester |
Traffic Class (TC) | 3 bits | Defines service priority and routing through Virtual Channels |
Attributes (Attr[2:0]) | 3 bits | Specify ordering, snooping, and ID-based ordering policies |
Length | 10 bits | Defines number of doublewords (DW) in payload |
Additional Payload Rules | — | Control how data payloads follow the header and BEs |
3. Requester ID
Each PCIe device or function is uniquely identified by a Bus Number, Device Number, and Function Number — collectively known as the Requester ID.
Bits | Field | Example |
[15:8] | Bus Number | 0x02 |
[7:3] | Device Number | 0x05 |
[2:0] | Function Number | 0x1 |
This means the Requester ID 0x0251 represents Bus 2, Device 5, Function 1.
Purpose:
- It identifies the source of a transaction to the completer.
- The completer echoes the Requester ID in the Completion TLP to ensure proper delivery.
- Software can use it to map requests to device contexts during debug or AER (Advanced Error Reporting).
💡 In multi-function endpoints, each function has a unique Requester ID.
4. Tag Field
The Tag field (8 bits) allows a single requester to track multiple outstanding non-posted transactions (e.g., reads).
How It Works:
- When a device sends multiple read requests, each one gets a unique Tag (0–255).
- The completer includes the same Tag in the corresponding Completion with Data (CplD) packet.
- The requester uses the Tag to match completions to pending requests.
Example:
Request 1: Read 128 bytes @ 0x0001_0000 → Tag = 05h
Request 2: Read 256 bytes @ 0x0002_0000 → Tag = 06h
When completions arrive:
- Completion with Tag=05 → Response for first read
- Completion with Tag=06 → Response for second read
💡 This enables out-of-order completions while still maintaining data coherency at the requester side.
Tag Allocation Rules:
- Only non-posted requests (reads, configuration reads) require tags.
- Posted writes don’t — they never expect a completion.
- For MSI/MSI-X interrupts and messages, tags are unused.
5. Traffic Class (TC)
Traffic Classes define logical priority levels in PCIe traffic and tie directly into Virtual Channels (VCs) in the Data Link Layer.
TC Value | Use Case |
000b | Default / Best Effort traffic |
001b–011b | Reserved for other QoS classes |
100b | Isochronous or latency-sensitive traffic |
Each virtual channel has independent flow control credits and arbitration, ensuring that high-priority transactions aren’t blocked by bulk transfers.
Key Points:
- TC mapping to VC is configured during link initialization.
- Devices must not starve lower-TC traffic — PCIe enforces fairness via Weighted Round Robin arbitration.
6. Attributes Field (Attr[2:0])
Attributes define how the transaction behaves in terms of caching, ordering, and coherency.
Bit | Name | Meaning |
Attr[2] | ID-based Ordering (IDO) | 0 = ID-based ordering disabled, 1 = enabled |
Attr[1] | Relaxed Ordering (RO) | 1 = Request can bypass strict ordering rules |
Attr[0] | No Snoop | 1 = Memory access should bypass system caches |
(a) No Snoop
Used by devices performing DMA that shouldn’t pollute CPU cache lines.
Example: Network adapters writing received packets directly to main memory.
(b) Relaxed Ordering
Allows TLPs to bypass strict “producer-consumer” ordering, improving throughput in systems that can tolerate reordering.
(c) ID-Based Ordering
Introduced in later specs to control ordering between independent transactions using unique IDs.
💡 When used carefully, these attributes help balance performance and coherency. Overuse can cause data hazards.
7. Length Field
Defines the number of doublewords (DW) in the payload (0–1024 DWs).
Even when payload is absent (e.g., read requests), Length indicates how much data the requester expects in completion.
Example:
- Memory Read with Length=8 → Completer must send 8 DWs of data in response.
8. Rules for TLPs with Data Payloads
When a TLP includes a payload (e.g., a Memory Write):
- Length field indicates number of DWs.
- First BE / Last BE indicate valid byte ranges.
- Total byte count = (Length × 4) – Unused Bytes (from BE masks).
Posted writes (e.g., Memory Write, Message Write):
- Don’t generate completions.
- Must respect ordering rules when Relaxed Ordering = 0.
Non-posted requests (e.g., Reads, Config Accesses):
- Always generate completions.
- Require unique Tags for matching.
9. Design Insight – Tag and Requester ID Logic
In a PCIe endpoint or Root Complex:
- A Tag allocator generates and tracks outstanding request tags using a free-list or circular counter.
- A Completion Reorder Buffer (CRB) matches completions by (Requester ID, Tag) pair.
- The Transaction Layer Controller enforces ordering constraints when Relaxed Ordering or IDO is disabled.
In verification environments:
- Monitors assert that every request with a Tag eventually receives a completion with the same Tag and Requester ID.
10. Summary
Field | Function |
Requester ID | Identifies the device/function sending the request |
Tag | Tracks outstanding non-posted requests |
TC | Determines priority and routing via Virtual Channels |
Attributes | Control ordering, snooping, and ID-based behavior |
Length | Defines the size of the data payload or expected response |
NOTES
- Descriptor fields ensure PCIe supports parallel, high-throughput, and ordered transactions.
- Requester ID + Tag pairing provides robust matching for read completions.
- Attributes and Traffic Classes allow fine-grained control over data flow and latency.
- Mastering these fields is essential before studying Completions and Message TLPs.