mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-23 21:57:11 -04:00
This commit is contained in:
parent
f332688fc0
commit
1474395869
1 changed files with 2 additions and 1 deletions
|
@ -221,8 +221,9 @@ module decoder
|
|||
default: begin
|
||||
if (instr.instr[31:25] == 7'b1001) begin
|
||||
// check privilege level, SFENCE.VMA can only be executed in M/S mode
|
||||
// only if S mode is supported
|
||||
// otherwise decode an illegal instruction
|
||||
illegal_instr = (((CVA6Cfg.RVS && priv_lvl_i == riscv::PRIV_LVL_S) || ((!CVA6Cfg.RVS && !CVA6Cfg.RVU) || priv_lvl_i == riscv::PRIV_LVL_M)) && instr.itype.rd == '0) ? 1'b0 : 1'b1;
|
||||
illegal_instr = (CVA6Cfg.RVS && (priv_lvl_i inside {riscv::PRIV_LVL_M, riscv::PRIV_LVL_S}) && instr.itype.rd == '0) ? 1'b0 : 1'b1;
|
||||
instruction_o.op = ariane_pkg::SFENCE_VMA;
|
||||
// check TVM flag and intercept SFENCE.VMA call if necessary
|
||||
if (CVA6Cfg.RVS && priv_lvl_i == riscv::PRIV_LVL_S && tvm_i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue