fix sfence.vma decoder (#921)

This commit is contained in:
Yan 2022-07-08 16:10:37 +08:00 committed by GitHub
parent 4ab5ef93b7
commit 01c89b7606
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -158,7 +158,7 @@ module decoder import ariane_pkg::*; (
if (instr.instr[31:25] == 7'b1001) begin
// check privilege level, SFENCE.VMA can only be executed in M/S mode
// otherwise decode an illegal instruction
illegal_instr = (priv_lvl_i inside {riscv::PRIV_LVL_M, riscv::PRIV_LVL_S}) ? 1'b0 : 1'b1;
illegal_instr = (priv_lvl_i inside {riscv::PRIV_LVL_M, riscv::PRIV_LVL_S}) ? illegal_instr : 1'b1;
instruction_o.op = ariane_pkg::SFENCE_VMA;
// check TVM flag and intercept SFENCE.VMA call if necessary
if (priv_lvl_i == riscv::PRIV_LVL_S && tvm_i)