SerialLite II IP Core User Guide

ID 683179
Date 7/13/2021
Public
Document Table of Contents

2.8.11. Flow Control Operation

The flow control feature in the SerialLite II IP core operates by having the receiving end of the link issue a PAUSE instruction to the transmitting end of the link when threshold of the receiver’s FIFO buffer is breached.

The PAUSE instruction causes the transmitter to cease transmission for specified pause duration. When the pause duration expires, the transmission resumes.

When flow control is used, the FIFO buffer is structured as two sections, threshold and headroom.

Figure 14. FIFO Buffer Structure (Flow Control Enabled)

The threshold value determines if a Flow Control PAUSE is requested. You control the size of this threshold by setting the flow control threshold per port using the SerialLite II parameter editor to fall within the total depth of the FIFO. The value for the flow control threshold signals (ctrl_rr_rdp_fcthresh and ctrl_rr_hpp_fcthresh) must be within the total FIFO depth. The value must also ensure required headroom to compensate for the delays for the flow control request to take effect, and for the remaining data already in the system to be stored in the FIFO.

The total depth of the FIFO (in bytes) is derived by the SerialLite II parameter editor using the following formula:
Total Depth = FIFO SIZE/(TSIZE*RX_NUMBER_LANES)
  • Set FIFO SIZE by selecting a value in the Buffer Size (Receiver) option.
  • Set TSIZE by selecting a number in Transfer Size option.
  • Set RX_NUMBER_LANES by selecting a value for Number of lanes (Receiver Settings)
If in this example, you select a high-priority FIFO SIZE of 1,024 B, and a TSIZE of 2 in a four-lane SerialLite II configuration:
Total Depth = 1024/2*4 = 128
Based on the above result, for this example, you must set the Threshold value in the SerialLite II parameter editor to be less than 128 elements.

When flow control is enabled, the SerialLite II IP core logic monitors the triggering receive FIFO buffer and, when a threshold is reached, issues a pause instruction. It takes some time for the pause instruction to be issued, traverse the connection, and for transmission to be stopped. It takes more time for all the data that has already been transmitted to be stored in the receive FIFO buffer. Therefore, there must be a certain amount of space left in the receive FIFO buffer above the threshold to hold the data that arrives during this delay. This headroom has contributions from the core latency and the wire latency.

Figure 15. Flow Control Operation Example
If the far receive FIFO buffer is still in breach of the threshold when the flow control refresh period timer expires, the far receiver automatically renews the pause to extend the flow control period. This renewal occurs until the fill level of far receive FIFO is no longer greater than the threshold. When the renewed flow control packet reaches the near transmitter before the current pause expires, the pause time is refreshed.
  • This refresh time must be set so that the renewed flow control packets are received by the near transmitter before the current pause time completes. Set the value of Refresh period to be smaller than Pause quantum time in the Priority Packet Settings or Data Packet Settings in the parameter editor.
  • If the refresh period is small, more flow control packets are sent on the link, possibly degrading the performance of an alternate active port. This is a trade off for the link bandwidth performance.
To overcome head-of-line blocking, every port has its own flow control that suspends the flow of data to either the priority port or the regular data port, depending on the FIFO buffer status. For example, if the near transmitter receives a flow control pause request for the priority port, the data on the regular port is transmitted (as long as the regular port is not also being requested to pause).