From 80fc851332f888d6a40a213995625c52f1fb3b4b Mon Sep 17 00:00:00 2001 From: David Harris Date: Wed, 22 Mar 2023 04:41:57 -0700 Subject: [PATCH] Fix Issue #142: SCOUNTEREN powers up at 1 instead of 0 --- src/privileged/csrs.sv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/privileged/csrs.sv b/src/privileged/csrs.sv index 1795f72c8..1a5906653 100644 --- a/src/privileged/csrs.sv +++ b/src/privileged/csrs.sv @@ -99,7 +99,7 @@ module csrs #(parameter flopenr #(`XLEN) SATPreg(clk, reset, WriteSATPM, CSRWriteValM, SATP_REGW); else assign SATP_REGW = 0; // hardwire to zero if virtual memory not supported - flopens #(32) SCOUNTERENreg(clk, reset, WriteSCOUNTERENM, CSRWriteValM[31:0], SCOUNTEREN_REGW); + flopenr #(32) SCOUNTERENreg(clk, reset, WriteSCOUNTERENM, CSRWriteValM[31:0], SCOUNTEREN_REGW); if (`SSTC_SUPPORTED) begin if (`XLEN == 64) flopenl #(`XLEN) STIMECMPreg(clk, reset, WriteSTIMECMPM, CSRWriteValM, 64'hFFFFFFFFFFFFFFFF, STIMECMP_REGW);