Skip to content

Commit 9736c98

Browse files
author
Saad Khalid
committed
only overriding misa.C
1 parent 7fc35ab commit 9736c98

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

dv/cosim/spike_cosim.cc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -712,13 +712,10 @@ void SpikeCosim::fixup_csr(int csr_num, uint32_t csr_val) {
712712
break;
713713
}
714714
case CSR_MISA: {
715-
// For Ibex, misa is hardwired,
716-
// so applying mask to bits other then variable
717-
// bits in different Ibex configs
715+
// For Ibex, misa.C is hardwired
718716

719-
uint32_t misa_and_mask = 0x40901114;
720-
uint32_t misa_or_mask = 0x100004;
721-
reg_t new_val = (csr_val & misa_and_mask) | misa_or_mask;
717+
uint32_t misa_or_mask = 0x4;
718+
reg_t new_val = csr_val | misa_or_mask;
722719
#ifdef OLD_SPIKE
723720
processor->set_csr(csr_num, new_val);
724721
#else

0 commit comments

Comments
 (0)