diff --git a/src/privileged/csrs.sv b/src/privileged/csrs.sv index 84a4d0a4b..a15be83e6 100644 --- a/src/privileged/csrs.sv +++ b/src/privileged/csrs.sv @@ -157,7 +157,7 @@ module csrs import cvw::*; #(parameter cvw_t P) ( IllegalCSRSAccessM = 1; end STIMECMPH: if (STCE) - CSRSReadValM[31:0] = STIMECMP_REGW[63:32]; + CSRSReadValM = {{(P.XLEN-32){1'b0}}, STIMECMP_REGW[63:32]}; else begin // not supported for RV64 CSRSReadValM = 0; IllegalCSRSAccessM = 1; @@ -168,4 +168,4 @@ module csrs import cvw::*; #(parameter cvw_t P) ( end endcase end -endmodule \ No newline at end of file +endmodule