Fix WARL behavior of MPP (#2283)

Related to #2274
This commit is contained in:
Moritz Schneider 2024-06-21 14:38:57 +02:00 committed by GitHub
parent 21733e55d7
commit fe1a19fca7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1074,7 +1074,7 @@ module csr_regfile
// If h-extension is not enabled, priv level HS is reserved
if (!CVA6Cfg.RVH) begin
if (mstatus_d.mpp == riscv::PRIV_LVL_HS) begin
mstatus_d.mpp = riscv::PRIV_LVL_U;
mstatus_d.mpp = mstatus_q.mpp;
end
end
// this instruction has side-effects