Merge pull request #394 from harshinisrinath1001/main

Improved testing of csri with priv.S!
This commit is contained in:
David Harris 2023-08-24 19:16:50 -07:00 committed by GitHub
commit c45fbe1ffe
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ module csri import cvw::*; #(parameter cvw_t P) (
// SSIP is writable in SIP if S mode exists
if (P.S_SUPPORTED) begin:mask
if (P.SSTC_SUPPORTED) begin
assign MIP_WRITE_MASK = 12'h202; // SEIP and SSIP are writable, but STIP is not writable when STIMECMP is implemented (see SSTC spec)
assign MIP_WRITE_MASK = ENVCFG_STCE ? 12'h202 : 12'h222; // SEIP and SSIP are writable, but STIP is not writable when STIMECMP is implemented (see SSTC spec)
assign STIP = ENVCFG_STCE ? STimerInt : MIP_REGW_writeable[5];
end else begin
assign MIP_WRITE_MASK = 12'h222; // SEIP, STIP, SSIP are writeable in MIP (20210108-draft 3.1.9)

View File

@ -72,7 +72,7 @@ sretdone:
li a0, 3
ecall # in M-mode
li t0, 32
csrs sip, t0
csrs mip, t0
li a0, 1
ecall # in S-mode and expects stimer interrupt to occur
li a0, 3