RTL Design #6 · 2026-09-29 · Arbitration · Medium · about 15 min

A round-robin arbiter that plays favorites

rr_arb4 shares one resource between four requesters. Each cycle it grants at most one of them, combinationally from req:

  • Priority rotates. After requester i is granted, requester i+1 (wrapping from 3 to 0) has top priority on the next cycle, then i+2, and so on.
  • A cycle with no requests grants nothing and leaves the priority where it was.
  • After reset, requester 0 has top priority.

So when every requester keeps asking, grants go 0, 1, 2, 3, 0, … and none of them ever waits more than three cycles. The current design is supposed to do this, but with two requesters asking, one of them never gets a turn. Fix arbiter.sv.

Write and run your answer in the browser. The hidden tests check it, and it’s free.