Credit-Based Traffic Shaping Algorithm - 9.0 English

Tri-Mode Ethernet MAC LogiCORE IP Product Guide (PG051)

Document ID
Release Date
9.0 English

To enforce the bandwidth policing of the AV Traffic, a credit-based shaper algorithm is implemented in the TX Arbiter. The following figure illustrates the basic operation of the algorithm and indicates how the TX Arbiter decides which Ethernet frame to transmit.

Figure 1. Credit-Based Shaper Operation

The previous figure illustrates the key features of the credit-based algorithm, which are:

  • If the algorithm is in credit ( 0), the TX Arbiter schedules queued transmission from the TX AV Traffic Interface. If there is less than 0 credit (not shown in the previous figure , but the credit can sink below 0), the TX Arbiter does not allow AV traffic to be transmitted; legacy traffic is scheduled instead when queued.
  • When no AV traffic is queued, any positive credit is lost and the credit is reset to 0.
  • When AV traffic is queued, and until the time at which the TX Arbiter is able to schedule it (while waiting for an in-progress legacy frame to complete transmission), credit can be gained at a rate defined by the idleSlope.
  • During AV traffic transmission, credit is removed at a rate defined by the sendSlope.
  • The hiLimit and loLimit settings impose a fixed range on the possible values of credit. If the available credit hits one of these limits, it does not exceed but saturates at the magnitude of that limit. These limits are fixed at the Ethernet MAC core level to ensure that the interface is not used incorrectly.

The overall intention of the two settings idleSlope and sendSlope is to spread out the AV traffic transmission as evenly as possible over time, preventing periods of bursty AV transmission surrounded by idle AV transmission periods. No further background information is provided in this document with regard to the credit-based algorithm. The remainder of this section describes the idleSlope and sendSlope variables from the perspective of the TX Arbiter.