Focuses on PCIe Data Link Layer (DLL), DLLPs, flow control, ACK/NAK protocol, and data integrity mechanisms.
1. PCIe Data Link Layer Overview
The Data Link Layer (DLL) sits between the Transaction Layer and Physical Layer:
- Ensures reliable delivery of TLPs
- Implements flow control using DLLPs (Data Link Layer Packets)
- Handles ACK/NAK, sequence numbers, replay, and integrity checks
ASCII DLL Layer Diagram
+--------------------+
| Transaction Layer |
+--------------------+
| Data Link Layer |
| - DLLPs |
| - Flow Control |
| - ACK/NAK/Replay |
+--------------------+
| Physical Layer |
+--------------------+
2. DLLP Types
| DLLP Type | Purpose |
|---|---|
| ACK / NAK | Confirm or request retransmission of TLPs |
| Flow Control Update (FC Update) | Communicates credit availability |
| Message DLLP | For interrupts or sideband messages |
| Vendor-specific DLLP | Optional extensions |
ASCII DLLP Flow Example
TX -> TLP -> RX
RX -> ACK DLLP -> TX confirms delivery
If error -> NAK DLLP -> TX replay
3. Flow Control Initialization Protocol
- Each VC maintains separate flow control credits
- Flow control initializes during link training
- UpdateFC frequency defines how often the RX informs TX of available credits
ASCII Flow Control Example
VC0 Credits: Header=10, Data=20
VC1 Credits: Header=5, Data=15
TX sends TLPs until credits exhausted
RX sends FC DLLP -> TX updates credits -> continues transmission
4. Data Integrity & DLCMSM
- DLCMSM (Data Link Control & Management State Machine) manages:
- Sequence number checking
- ACK/NAK generation
- Replay mechanism
- Error detection using CRC
ASCII DLCMSM Example
TX Seq#: 1,2,3
RX Seq#: 1 OK -> ACK
RX Seq#: 2 Corrupt -> NAK -> TX Replay Flit2
RX Seq#: 3 OK -> ACK
Ensures all TLPs are delivered reliably and in order.
5. ACK/NAK Protocol
- ACK (Acknowledgement): Confirms successful reception
- NAK (Negative Acknowledgement): Requests retransmission
- Works per virtual channel and per TLP sequence number
ASCII ACK/NAK Flow
TX TLP1 -> RX OK -> ACK
TX TLP2 -> RX Error -> NAK -> TX Replay TLP2
TX TLP3 -> RX OK -> ACK
6. UpdateFC Frequency
- UpdateFC DLLPs sent periodically to inform TX about available credits
- Frequency affects link throughput and latency
- Too low = TX stalls, too high = overhead increase
ASCII UpdateFC Flow
RX sends FC DLLP every 16 TLPs
TX adjusts transmission based on available credits
7. Summary – PCIe Data Link Layer
Responsibilities:
- Ensure reliable TLP delivery via DLLPs
- Manage flow control credits per VC
- Implement ACK/NAK and replay mechanism
- Maintain sequence numbers and CRC-based integrity
- Update flow control via UpdateFC DLLPs periodically

