From 1ec11dc03df9530ce1d442137e88edaf4a6460e2 Mon Sep 17 00:00:00 2001 From: Dolu1990 Date: Mon, 25 Mar 2019 11:47:56 +0100 Subject: [PATCH] Fix mprv --- src/main/scala/vexriscv/plugin/MmuPlugin.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/vexriscv/plugin/MmuPlugin.scala b/src/main/scala/vexriscv/plugin/MmuPlugin.scala index 682ab74..cc98e10 100644 --- a/src/main/scala/vexriscv/plugin/MmuPlugin.scala +++ b/src/main/scala/vexriscv/plugin/MmuPlugin.scala @@ -110,7 +110,7 @@ class MmuPlugin(virtualRange : UInt => Bool, val requireMmuLockup = virtualRange(port.bus.cmd.virtualAddress) && !port.bus.cmd.bypassTranslation && csr.satp.mode if(!allowMachineModeMmu) { requireMmuLockup clearWhen(!csr.status.mprv && privilegeService.isMachine()) - if(port.priority == MmuPort.PRIORITY_DATA) requireMmuLockup clearWhen(csr.status.mprv && pipeline(config.MPP) === 3) + if(port.priority != MmuPort.PRIORITY_DATA) requireMmuLockup clearWhen(csr.status.mprv && pipeline(config.MPP) === 3) } when(requireMmuLockup) {