Tx rate limiting – Achronix Speedster22i Interlaken User Manual
Page 48
TX Rate Limiting
The IIPC rate limiter can be used to reduce the overall Data Word transmission rate. This is
achieved by transmitting Idle Control Words in between packet segments to limit the effective
data transfer rate. The purpose of transmitter rate limiting is to reduce buffering requirements by
the receiving device and reduce the amount of flow control stalling that may otherwise be
required.
Rate limiting is not a substitute for flow-control but something that should be used in conjunction
with flow-control when a receiver cannot continuously accept Data Words at the full rate. The
rate limiter uses a token bucket scheme. A token represents a single byte. When the token bucket
contains at least ctl_tx_burstmax number of tokens, up to ctl_tx_burstmax bytes are sent. Once
that has completed, the transmitter waits until there are at least ctl_tx_burstmax x number of
tokens in the bucket again before sending more data. The token count will go negative if it is
necessary to send a burst of data that cannot be interrupted.
The token bucket is refilled at a specified interval with some number of tokens. This interval is
specified in terms of Local bus clock cycles.
During each Local bus clock cycle, eight tokens are drained for each Interlaken Data Word that is
forwarded. This is true even for EOP Data Words that contain less than eight valid bytes.
A description of parameters that set the characteristics of the rate limiter is given below. All
signals are synchronous with the rising-edge of clk.
ctl_tx_rlim_enable
When this input is a value of 1, the rate limiter is enabled. When this input is a value of 0, the rate
limiter is disabled.
This input should only be changed from a 0 to a 1 after appropriate values have been put on
ctl_tx_rlim_enable, ctl_tx_rlim_max, ctl_tx_rlim_delta, ctl_tx_rlim_intv.
ctl_tx_rlim_max[11:0]
This input defines the maximum number of tokens in the bucket in terms of bytes (a value of 1,
means 1 byte). The number of tokens in the bucket will never exceed this value. This value must
be at least ctl_tx_burstmax. (For example, if ctl_tx_burstmax is set for 256 bytes, then this value
should be at least 256).
The value of this input should not be changed when ctl_tx_rlim_enable is a value of 1.
Note: The rates closest to the expected rates have been observed to be when ctl_tx_rlim_max is
set to a value between 1 and 2 times the value of BurstMax.
ctl_tx_rlim_delta[7:0]
This input specifies the update interval: the number of Local bus clock cycle between additions to
the token bucket. The value of this input should not be changed when ctl_tx_rlim_enable is a
value of 1.
Note: Values between 8 and 32 are recommended for this.
UG032, May 15, 2014
48