Skip to content

confirm_write() checks the mirror right after the write that set it – of course it agrees

predictor / access-policy / plausible-passUVM · runs take about 2 minutes

SpecPer the register map doc, status_reg packs one byte into two fields

  • cfg: bits [6:0], configuration, RW.
  • lock: bit [7]. “Write 1 to lock permanently prevents further configuration changes until the next reset.”
  • Not settled by that sentence: does locking veto a cfg change in the same write that sets the lock bit, or only later writes? reg_bus_driver, in the support file compiled alongside, is the actual hardware behavior.

confirmer::confirm_write() is what a model writes with confidence to prove a write landed. With auto-prediction on, as the env sets it, r.write() sets the mirror from the data you passed, whatever the hardware did, so reading the mirror back always agrees. Right now it reports confirmed_count=3, flagged_count=0, including the writes that set cfg and lock together and left cfg unchanged.

Fix confirm_write() so it compares expected with a frontdoor read, not the mirror.

Source on GitHub

confirm_write_trusts_the_mirror_not_the_bus.sv