tum-ei-eda/etiss

CSR MSTATUS for RISCV architecture doens't work -> add it to the VirtualStruct

lasseUrban opened this issue · 1 comments

In etiss/ArchImpl/RISCV/RISCVArchSpecificImp.h are only the following CSRs added to the VirtualStruct:

addCSR(CSR_MISA);
addCSR(CSR_MIE);
addCSR(CSR_MTVEC);
addCSR(CSR_MEPC);
addCSR(CSR_MCAUSE);
addCSR(CSR_MTVAL);

I use Etiss is the fault injection virtual platform FIVP and added all the missing CSRs myself. All the CSRs work and I can read and write them except the mstatus register CSR768 at address 0x300.

Why is this important register not added to the virtualStruct by default?
Additionally, can you check why it is not working? The register is zero during the complete simulation although it should not. I ensured that my test program sets the mstatus register, but when I read it through the virtualStruct, it is always zero.

I solved this issue myself in add missing CSRs to RISCV arch spec #122
Nothing to do for you here except merging. Thank you!