From 276830ecb679bdf3a4fe1f176bba258008eeca12 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Tue, 16 Aug 2022 09:23:42 +0100 Subject: [PATCH] Fix missing default assignment of i_m in PMP decode --- hdl/hazard3_pmp.v | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hdl/hazard3_pmp.v b/hdl/hazard3_pmp.v index 00c0cdd..c5e14bb 100644 --- a/hdl/hazard3_pmp.v +++ b/hdl/hazard3_pmp.v @@ -253,6 +253,7 @@ always @ (*) begin: check_i_match reg match_hw0, match_hw1; i_match = 1'b0; i_partial_match = 1'b0; + i_m = 1'b0; i_l = 1'b0; i_x = 1'b0; for (i = PMP_REGIONS - 1; i >= 0; i = i - 1) begin @@ -271,7 +272,7 @@ end // ---------------------------------------------------------------------------- // Access rules -// M-mode gets to ignore protections, unless the lock bit is set. +// M-mode gets to ignore protections, unless the lock or M-mode bit is set. assign d_kill = (!d_m_mode || d_l || d_m) && ( (!d_write && !d_r) ||