[ Team LiB ] Previous Section Next Section

Some More Examples

To demonstrate the reliable TLP delivery capability provided by the ACK/NAK Protocol, the following examples are provided.

Lost TLP

Consider Figure 5-14 on page 245 which shows the ACK/NAK protocol for handling lost TLPs.

  1. Device A transmits TLPs 4094, 4095, 0, 1, and 2.

  2. Device B receives TLPs 4094, 4095, and 0, for which it returns ACK 0. These TLPs are forwarded to the Transaction Layer. NEXT_RCV_SEQ is incremented and the next value of NEXT_RCV_SEQ count is 1. Device B is ready to receive TLP 1.

  3. Seeing ACK 0, Device A purges TLPs 4094, 4095, and 0 from its replay buffer.

  4. TLP 1 is lost en route.

  5. TLP 2 arrives instead. Upon performing a Sequence Number check, Device B realizes that TLP 2's Sequence Number is greater than NEXT_RCV_SEQ count.

  6. Device B discards TLP 2 and schedules NAK 0 (NEXT_RCV_SEQ count - 1).

  7. Upon receipt of NAK 0, Device A replays TLPs 1 and 2.

  8. TLPs 1 and 2 arrive without error at Device B and are forwarded to the Transaction Layer.

Figure 5-14. Lost TLP Handling

graphics/05fig14.jpg

Lost ACK DLLP or ACK DLLP with CRC Error

Consider Figure 5-15 on page 246 which shows the ACK/NAK protocol for handling a lost ACK DLLP.

  1. Device A transmits TLPs 4094, 4095, 0, 1, and 2.

  2. Device B receives TLPs 4094, 4095, and 0, for which it returns ACK 0. These TLPs are forwarded to the Transaction Layer. NEXT_RCV_SEQ is incremented and the next value of NEXT_RCV_SEQ count is set to 1.

  3. ACK 0 is lost en route. TLPs 4094, 4095, and 0 remain in Device A's Replay Buffer.

  4. TLPs 1 and 2 arrive at Device B shortly thereafter. NEXT_RCV_SEQ count increments to 3.

  5. Device B returns ACK 2 and sends TLPs 1 and 2 to the Transaction Layer.

  6. ACK 2 arrives at Device A.

  7. Device A purges its Replay Buffer of TLPs 4094, 4095, 0, 1, and 2.

Figure 5-15. Lost ACK DLLP Handling

graphics/05fig15.jpg

The example would be the same if a CRC error existed in ACK packet 0. Device A would detect the CRC error in ACK 0 and discard it. When received later, ACK 2 would cause the Replay Buffer to purge all TLPs (4094 through 2).

If ACK 2 is also lost or corrupted, and no further ACK or NAK DLLPs are returned to Device A, its REPLAY_TIMER will expire. This results in replay of its entire buffer. Device B receives TLP 4094, 4095, 0, 1 and 2 and detects them as duplicate TLPs because their Sequence Numbers are earlier than NEXT_RCV_SEQ count of 3. These TLPs are discarded and ACK DLLPs with AckNak_Seq_Num[11:0] = 2 are returned to Device A for each duplicate TLP.

Lost ACK DLLP followed by NAK DLLP

Consider Figure 5-16 on page 247 which shows the ACK/NAK protocol for handling a lost ACK DLLP followed by a valid NAK DLLP.

  1. Device A transmits TLPs 4094, 4095, 0, 1, and 2.

  2. Device B receives TLPs 4094, 4095, and 0, for which it returns ACK 0. These TLPs are forwarded to the Transaction Layer. NEXT_RCV_SEQ is incremented and the next value of NEXT_RCV_SEQ count is 1.

  3. ACK 0 is lost en route. TLPs 4094, 4095, and 0 remain in Device A's Replay Buffer.

  4. TLPs 1 and 2 arrive at Device B shortly thereafter. TLP 1 is good and NEXT_RCV_SEQ count increments to 2. TLP 1 is forwarded to the Transaction Layer.

  5. TLP 2 is corrupt. NEXT_RCV_SEQ count remains at 2.

  6. Device B returns a NAK with a Sequence Number of 1 and discards TLP 2.

  7. NAK 1 arrives at Device A.

  8. Device A first purges TLP 4094, 4095, 0 and 1

  9. Device A replays TLP 2.

  10. TLP 2 arrive at Device B. The NEXT_RCV_SEQ count is 2.

  11. Device B accepts good TLP 2 and forwards it to the Transaction Layer. NEXT_RCV_SEQ increments to 3.

  12. Device B may return an ACK with a Sequence Number of 2 if the ACKNAK_LATENCY_TIMER expires.

  13. Upon receipt of ACK 2, Device A purges TLP 2.

Figure 5-16. Lost ACK DLLP Handling

graphics/05fig16.jpg

    [ Team LiB ] Previous Section Next Section