With auto-prediction on (configured in the test), uvm_reg::write() calls do_predict() when the bus transaction completes, and do_predict() only checks the status was UVM_IS_OK. A write the hardware silently drops but completes cleanly (a stuck write-enable, say) is predicted as a success, and the mirror takes the value you meant to write.
RequirementsFor write_verifier::verify_write(uvm_reg r, uvm_reg_map map, bit [7:0] data)
r.get_mirrored_value(), which already holds the intended value.confirmed_count; a mismatch increments dropped_count.Right nowconfirmed_count=0, want 3. The stub checks nothing.
Done whenOf the four registers written in the test, register 2 has a stuck write-enable, so confirmed_count is 3 and dropped_count is 1. Checking the mirror instead gives confirmed_count=4, dropped_count=0.
One working answer: brokenbench's own fix for this exercise. Try a few runs first.
What changes, against the code you started with:
docker run --pull always --rm -p 127.0.0.1:8787:8787 ghcr.io/adibis/brokenbench-runnerLooking for a runner on this computer…
The first start downloads about 250 MB; after that it starts in seconds and only downloads again when there's an update. Your code goes to the runner on your computer, not to chipdv.io.