@@ -220,28 +220,34 @@ module wallyTracer import cvw::*; #(parameter cvw_t P) (rvviTrace rvvi);
220220 // Machine Information Registers and Configuration CSRs
221221 `CONNECT_CSR (MISA , 12'h301 , testbench.dut.core.priv.priv.csr.csrm.MISA_REGW );
222222 `CONNECT_CSR (MENVCFG , 12'h30A , testbench.dut.core.priv.priv.csr.csrm.MENVCFG_REGW );
223- `CONNECT_CSR (SENVCFG , 12'h10A , testbench.dut.core.priv.priv.csr.csrs.csrs.SENVCFG_REGW );
224223 `CONNECT_CSR (MSECCFG , 12'h747 , 0 ); // mseccfg
225224 `CONNECT_CSR (MVENDORID , 12'hF11 , 0 ); // mvendorid
226225 `CONNECT_CSR (MARCHID , 12'hF12 , 0 ); // marchid
227226 `CONNECT_CSR (MIMPID , 12'hF13 , {{ P .XLEN - 12 { 1'b0 }} , 12'h100 } ); // mimpid
228227 `CONNECT_CSR (MHARTID , 12'hF14 , testbench.dut.core.priv.priv.csr.csrm.MHARTID_REGW );
229228 `CONNECT_CSR (MCONFIGPTR , 12'hF15 , 0 ); // mconfigptr
230229
230+ // Supervisor Information Registers and Configuration CSRs
231+ if (P .S_SUPPORTED ) begin
232+ `CONNECT_CSR (SENVCFG , 12'h10A , testbench.dut.core.priv.priv.csr.csrs.csrs.SENVCFG_REGW );
233+ end
234+
231235 // Sstc CSRs
232236 if (P .SSTC_SUPPORTED ) begin
233237 `CONNECT_CSR (STIMECMP , 12'h14D , testbench.dut.core.priv.priv.csr.csrs.csrs.STIMECMP_REGW [P .XLEN - 1 : 0 ]);
238+ if (P .XLEN == 32 ) begin
239+ `CONNECT_CSR (STIMECMPH , 12'h15D , testbench.dut.core.priv.priv.csr.csrs.csrs.STIMECMP_REGW [63 : 32 ]);
240+ end
234241 end
235242
236243 // Zkr CSRs
237244 // seed not connected (015)
238245
239- // extra CSRs for RV32
246+ // extra M mode CSRs for RV32
240247 if (P .XLEN == 32 ) begin
241248 `CONNECT_CSR (MSTATUSH , 12'h310 , testbench.dut.core.priv.priv.csr.csrsr.MSTATUSH_REGW );
242249 `CONNECT_CSR (MENVCFGH , 12'h31A , testbench.dut.core.priv.priv.csr.csrm.MENVCFGH_REGW );
243250 `CONNECT_CSR (MSECCFGH , 12'h757 , 0 ); // mseccfgh
244- `CONNECT_CSR (STIMECMPH , 12'h15D , testbench.dut.core.priv.priv.csr.csrs.csrs.STIMECMP_REGW [63 : 32 ]);
245251 end
246252 end
247253
0 commit comments