Verification #27 · 2026-10-20 · Assertions · Medium · about 15 min

The grant checker that fires on an idle bus

A 4-line arbiter is combinational: gnt answers req in the same cycle. Write the checker in checker.sv so that, in every cycle outside reset, it enforces:

  1. At most one bit of gnt is high.
  2. gnt only ever grants a line that is requesting in that same cycle.
  3. If any line is requesting, some line is granted.

The assertions are sampled on posedge clk and disabled while rst_n is low. Fix checker.sv.

The traffic in tb.sv contains exactly one violation, so a correct checker fires once when you press Run. Grading uses four more scenarios.

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