Entity round_robin
pub entity round_robin<T, #uint N>(clk: clock, rst: bool, alternatives: [Rv<T>; N]) -> Rv<T>Expand
Round robin arbiter between alternatives.
Internally, this maintains a priority index which is incremented every clock cycle
that a transaction is performed. The alternative with the lowest index which is still
greater than priority is th winner of the arbitration.
This ensures that the bus can be used by anyone even if the most prioritized alternative
is inactive. However, since the priority is incremented for any transaction, an alternative
can “miss” its slot. In the vast majority of cases, this should be no issue, but it could lead
to reduced throughput for a unit which periodically becomes ready with a period of N.