From 9eafdbe349028cc342033da28d43b2aef00d60d3 Mon Sep 17 00:00:00 2001 From: Teo Ene Date: Fri, 29 Jan 2021 15:23:28 -0600 Subject: [PATCH 2/2] - Removed latch on CSRCReadValM in csrc.sv - Changed top level to wallypipelinedhart --- wally-pipelined/src/csrc.sv | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/wally-pipelined/src/csrc.sv b/wally-pipelined/src/csrc.sv index 678bdc22..6e369785 100644 --- a/wally-pipelined/src/csrc.sv +++ b/wally-pipelined/src/csrc.sv @@ -182,7 +182,11 @@ module csrc #(parameter IllegalCSRCAccessM = 1; end endcase - end else IllegalCSRCAccessM = 1; // no privileges for this coute + end else + begin + IllegalCSRCAccessM = 1; // no privileges for this coute + CSRCReadValM = 0; + end else // 32-bit counter reads always_comb if (PrivilegeModeW == `M_MODE || @@ -216,7 +220,11 @@ module csrc #(parameter IllegalCSRCAccessM = 1; end endcase - end else IllegalCSRCAccessM = 1; + end else + begin + IllegalCSRCAccessM = 1; // no privileges for this coute + CSRCReadValM = 0; + end end else begin assign CSRCReadValM = 0; assign IllegalCSRCAccessM = 1;