Hardware interview practice
Schedule weighted round-robin service
Design an N-requester weighted round-robin arbiter. A requester with weight 3 should receive three service beats per round while continuously active, versus one beat for weight 1. Include checks suitable for saturated fairness testing.
Reviewed example
Work through one case
Input
N=2; weights=[3,1]; both requests stay asserted through eight accepted grantsExpected output
grants repeat [port0,port0,port0,port1] twiceEach saturated round consumes three units of port0's quantum and one of port1's, giving the configured 3:1 service ratio without starvation.
What to cover
Requirements
- Treat weight zero as disabled and produce at most one grant each cycle.
- Skip inactive requesters without consuming their quota.
- Avoid unsigned credit underflow, overflow-driven priority, and fixed-index tie bias.
- Under continuously asserted requests, measured grant ratios must converge to configured weight ratios.
- If a runtime weight change invalidates the current quantum, expire that quantum and resume from the rotating pointer.
