Verification #55 · 2026-11-17 · UVM scoreboard · Medium · about 30 min

Build the testbench for a round-robin arbiter

arb4.sv is a 4-requester round-robin arbiter. Each clock, req[3:0] holds the requests and gnt[3:0] shows the grant for that same clock (combinational): at most one bit, and 0000 when req is 0000. The winner is the first requester found going upward from the one after the last winner, wrapping from 3 to 0. After reset the last winner is requester 3, so requester 0 is first in line. The last winner changes only on a clock where something is granted; an idle clock leaves it alone.

Write the verification components in components.sv. The monitor and environment in env.sv are provided, and they use your four classes by name. The monitor sends one item for every clock after reset, idle ones included, carrying req and gnt as they were during that clock.

  • arb_item: random req. Idle clocks (0000), all four requesting, each requester alone, and mixed patterns must all be common.
  • arb_seq: sends count random items.
  • arb_driver: waits out reset, then presents each item's req for exactly one clock, with the pins back at 0 afterwards. Items go back to back.
  • arb_scoreboard: keeps its own model of the last winner. For each item it works out the expected gnt, compares, and then updates the model. Count every item in checked and every mismatch in errors; report the first few with uvm_error.

Run uses tb.sv: 50 random items into the correct arbiter. Submit runs your testbench against the correct arbiter and against five faulty ones. Your scoreboard must stay quiet on the first and catch each of the others.

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