Focuses on advanced Data Link Layer features: DLLPs, flow control, ACK/NAK, DLCMSM, and data integrity.
1. Advanced Data Link Layer (DLL) Overview
The Data Link Layer (DLL) ensures reliable delivery of TLPs by:
- Managing flow control via credits
- Sending DLLPs (Data Link Layer Packets)
- Handling ACK/NAK responses
- Supporting replay mechanisms
- Maintaining data integrity across the link
ASCII Layer Diagram
+--------------------+
| Transaction Layer | <- TLPs
+--------------------+
| Data Link Layer | <- DLLPs (ACK/NAK, Flow Control)
+--------------------+
| Physical Layer | <- Electrical lane signals
+--------------------+
2. DLLPs (Data Link Layer Packets)
2.1 Types of DLLPs
| DLLP Type | Purpose |
|---|---|
| ACK | Confirms TLP received correctly |
| NAK | Indicates TLP error or lost packet |
| Flow Control Update (FC) | Updates credit counts for header/data buffers |
| Sequence Number Update | Synchronizes flit sequence numbers |
ASCII Example: ACK Flow
[TX Buffer] -> TLP -> [RX Buffer]
|
DLL Layer
|
ACK DLLP -> TX removes from replay buffer
3. Flow Control Mechanism
PCIe uses credit-based flow control to ensure no buffer overflows:
- Header Credits: Track available header buffer space
- Data Credits: Track available data buffer space
- Posted / Non-Posted Credits: Separate for write vs read operations
Flow Control Update DLLP (FC Update)
[RX Device] -> sends FC Update DLLP -> [TX Device]
TX Device updates credits:
Header Credits
Posted Data Credits
Non-Posted Data Credits
Transmission only proceeds if sufficient credits are available.
4. DLCMSM – Data Link Control and Status Machine
DLCMSM manages:
- DLLP transmission/reception
- Flow control updates
- Error recovery and replay buffer management
- Sequence number tracking
ASCII DLCMSM Example
[TX DLCMSM] <---> [RX DLCMSM]
Tracks:
- Sent TLPs
- Sequence numbers
- ACK/NAK feedback
- Credit availability
5. ACK/NAK Protocol
| Signal | Action |
|---|---|
| ACK | Remove TLP from replay buffer |
| NAK | Re-transmit TLP from replay buffer |
| Discard | Drop invalid TLP after multiple retries |
Replay Flow (ASCII)
TX Buffer: [TLP1][TLP2][TLP3]
RX: Receives TLP1, TLP3 (TLP2 corrupted)
RX sends NAK for TLP2
TX resends TLP2 -> RX receives correctly -> sends ACK
Ensures lossless delivery at high speeds.
6. Flow Control Initialization
- At link startup, devices exchange FC credits
- DLCMSM initializes buffers, sequence numbers, and thresholds
- Periodic UpdateFC DLLPs ensure continuous credit synchronization
ASCII Initialization Example
[TX DLCMSM] --send--> INIT FC DLLP --> [RX DLCMSM]
[RX DLCMSM] --reply--> FC ACK DLLP --> [TX DLCMSM]
7. Data Integrity Mechanisms
- CRC in TLP and DLLP: Detects errors during transmission
- Replay Buffers: Store TLPs until ACK received
- Sequence Numbers: Ensure correct order of packets
- FEC (Gen6): Forward Error Correction adds redundancy for error recovery
ASCII Data Integrity Example
[TX TLP] -> [Physical Layer] -> [RX DLL]
CRC Check
| \
OK Error -> NAK + Replay
8. DLLP Timing and Frequency
- UpdateFC Frequency: How often FC DLLPs are sent
- Must match traffic rate to avoid stalling the link
- High-speed Gen5/Gen6 links require tight timing control
9. Summary – Advanced Data Link Layer
Responsibilities:
- Transmit/receive DLLPs (ACK/NAK/Flow Control)
- Initialize and track credit buffers
- Manage DLCMSM for error handling and sequence numbers
- Maintain data integrity using CRC, replay buffers, FEC
- Ensure continuous flow control updates and link reliability

