[otbn,dv] Improve error message on unknown encoding
This shouldn't ever happen, but a more helpful error message made
debugging things rather easier.
Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
diff --git a/hw/ip/otbn/dv/uvm/env/otbn_env_cov.sv b/hw/ip/otbn/dv/uvm/env/otbn_env_cov.sv
index 96ff69e..f0e0ba7 100644
--- a/hw/ip/otbn/dv/uvm/env/otbn_env_cov.sv
+++ b/hw/ip/otbn/dv/uvm/env/otbn_env_cov.sv
@@ -911,8 +911,8 @@
enc_u_cg.sample(mnem, insn_data);
"wcsr":
enc_wcsr_cg.sample(mnem, insn_data);
- default:
- `DV_CHECK_FATAL(0, "Unknown encoding")
+ default: `dv_fatal($sformatf("Unknown encoding (%0s) for instruction `%0s'", encoding, mnem),
+ `gfn)
endcase
endfunction