From 195e7c1a9c6baf2ade54c7baa956fd48ec961539 Mon Sep 17 00:00:00 2001 From: David Harris Date: Tue, 7 Feb 2023 06:55:42 -0800 Subject: [PATCH] Moved STATUS_FS_INT write to if statement to properly prioritize --- src/privileged/csrsr.sv | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/privileged/csrsr.sv b/src/privileged/csrsr.sv index 92f0f504..1fa1fe8e 100644 --- a/src/privileged/csrsr.sv +++ b/src/privileged/csrsr.sv @@ -156,8 +156,6 @@ module csrsr ( STATUS_SBE <= #1 0; STATUS_UBE <= #1 0; end else if (~StallW) begin - if (FRegWriteM | WriteFRMM | WriteFFLAGSM) STATUS_FS_INT <= #1 2'b11; // mark Float State dirty *** this should happen in M stage, be part of if/else; - if (TrapM) begin // Update interrupt enables per Privileged Spec p. 21 // y = PrivilegeModeW @@ -211,6 +209,6 @@ module csrsr ( STATUS_SPIE <= #1 `S_SUPPORTED & CSRWriteValM[5]; STATUS_SIE <= #1 `S_SUPPORTED & CSRWriteValM[1]; STATUS_UBE <= #1 CSRWriteValM[6] & `U_SUPPORTED & `BIGENDIAN_SUPPORTED; - end + end else if (FRegWriteM | WriteFRMM | WriteFFLAGSM) STATUS_FS_INT <= #1 2'b11; end endmodule