Hardware interview practice
Arbitrate fairly between two requesters
Design a two-requester round-robin arbiter and a requester BFM. When both requests remain asserted, grants must alternate; when only one requests, it may be granted every cycle.
Reviewed example
Work through one case
Input
req0=req1=1 for four completed service cycles; reset priority starts at requester 0Expected output
grants=01,10,01,10Both active requesters alternate, and priority rotates only after each grant is sampled as completed service.
What to cover
Requirements
- Produce at most one grant per cycle and never grant an inactive requester.
- Update priority only after a grant represents a completed unit of service.
- A continuously asserted requester must not starve.
- The BFM must hold request until its grant is sampled, then release it cleanly.
