From be05dc32d49b0d4a8c4edc05e5edc2ad6546f284 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Thu, 11 Aug 2022 20:46:32 +0100 Subject: [PATCH] Oops, typo in update of new pmpcfg_m field --- hdl/hazard3_pmp.v | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hdl/hazard3_pmp.v b/hdl/hazard3_pmp.v index 6ad3610..00c0cdd 100644 --- a/hdl/hazard3_pmp.v +++ b/hdl/hazard3_pmp.v @@ -83,7 +83,6 @@ always @ (posedge clk or negedge rst_n) begin: cfg_update pmpcfg_w[i] <= PMP_HARDWIRED_CFG[8 * i + 1]; pmpcfg_x[i] <= PMP_HARDWIRED_CFG[8 * i + 0]; pmpaddr[i] <= PMP_HARDWIRED_ADDR[32 * i +: 30]; - pmpcfgm[i] <= 1'b0; end else begin pmpcfg_l[i] <= cfg_wdata[i % 4 * 8 + 7]; pmpcfg_r[i] <= cfg_wdata[i % 4 * 8 + 2]; @@ -105,7 +104,7 @@ always @ (posedge clk or negedge rst_n) begin: cfg_update end end if (cfg_addr == PMPCFGM0) begin - pmpcfg_m <= cfg_wdata[PMP_REGIONS-1:0]; + pmpcfg_m <= cfg_wdata[PMP_REGIONS-1:0] & ~PMP_HARDWIRED; end end end