fixes wrong array size which led to unintended CSR definitions

This commit is contained in:
eyck committed 2023-03-15 14:16:08 +01:00
1 parent fedbff5971
commit a943dd3bdf
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -375,7 +375,7 @@ riscv_hart_m_p<BASE, FEAT>::riscv_hart_m_p(feature_config cfg)
//csr_wr_cb[addr] = &this_class::write_csr_reg;
}
// common regs
const std::array<unsigned, 9> addrs{{
const std::array<unsigned, 8> addrs{{
misa, mvendorid, marchid, mimpid,
mepc, mtvec, mscratch, mtval
}};
+1 -1
View File
@@ -393,7 +393,7 @@ riscv_hart_mu_p<BASE, FEAT>::riscv_hart_mu_p(feature_config cfg)
//csr_wr_cb[addr] = &this_class::write_csr_reg;
}
// common regs
const std::array<unsigned, 14> addrs{{
const std::array<unsigned, 12> addrs{{
misa, mvendorid, marchid, mimpid,
mepc, mtvec, mscratch, mtval,
uepc, utvec, uscratch, utval,