diff options
Diffstat (limited to 'model/riscv_regs.sail')
-rw-r--r-- | model/riscv_regs.sail | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/model/riscv_regs.sail b/model/riscv_regs.sail index cf46390..a085275 100644 --- a/model/riscv_regs.sail +++ b/model/riscv_regs.sail @@ -79,7 +79,8 @@ function rX r = { 28 => x28, 29 => x29, 30 => x30, - 31 => x31 + 31 => x31, + _ => {assert(false, "invalid register number"); zero_reg} }; regval_from_reg(v) } @@ -130,7 +131,8 @@ function wX (r, in_v) = { 28 => x28 = v, 29 => x29 = v, 30 => x30 = v, - 31 => x31 = v + 31 => x31 = v, + _ => assert(false, "invalid register number") }; if (r != 0) then { rvfi_wX(r, in_v); |