diff --git a/incl/iss/arch/riscv_hart_mu_p.h b/incl/iss/arch/riscv_hart_mu_p.h
index 2a05997..8d01c3f 100644
--- a/incl/iss/arch/riscv_hart_mu_p.h
+++ b/incl/iss/arch/riscv_hart_mu_p.h
@@ -600,7 +600,7 @@ iss::status riscv_hart_mu_p::read(const address_type type, const acc
if(!pmp_check(access, addr, length) && (access&access_type::DEBUG) != access_type::DEBUG) {
fault_data = addr;
if (access && iss::access_type::DEBUG) throw trap_access(0, addr);
- this->reg.trap_state = (1 << 31) | (1 << 16); // issue trap 1
+ this->reg.trap_state = (1 << 31) | ((access==access_type::FETCH?1:5) << 16); // issue trap 1
return iss::Err;
}
}
@@ -695,7 +695,7 @@ iss::status riscv_hart_mu_p::write(const address_type type, const ac
if(!pmp_check(access, addr, length) && (access&access_type::DEBUG) != access_type::DEBUG) {
fault_data = addr;
if (access && iss::access_type::DEBUG) throw trap_access(0, addr);
- this->reg.trap_state = (1 << 31) | (1 << 16); // issue trap 1
+ this->reg.trap_state = (1 << 31) | (7 << 16); // issue trap 1
return iss::Err;
}
}