diff options
Diffstat (limited to 'model/riscv_insts_zicsr.sail')
-rw-r--r-- | model/riscv_insts_zicsr.sail | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/model/riscv_insts_zicsr.sail b/model/riscv_insts_zicsr.sail index dd8a4a0..056f537 100644 --- a/model/riscv_insts_zicsr.sail +++ b/model/riscv_insts_zicsr.sail @@ -179,6 +179,8 @@ function clause execute CSR(csr, rs1, rd, is_imm, op) = { }; if ~ (check_CSR(csr, cur_privilege, isWrite)) then { handle_illegal(); RETIRE_FAIL } + else if ~ (ext_check_CSR(csr, cur_privilege, isWrite)) + then { ext_check_CSR_fail(); RETIRE_FAIL } else { let csr_val = readCSR(csr); /* could have side-effects, so technically shouldn't perform for CSRW[I] with rd == 0 */ if isWrite then { |