Open mykola-mmm opened 3 years ago
Upd: I have just realized that handlers I have mentioned are not used in my code so they are not the problem. However, csr operation with 0x340 appears inside the main func:
main: beq t5, t4, 5f lui a1, 335156 srai t2, a0, 18 remu a1, s9, a2 csrrwi t2, 0x340, 23
Hi everyone,
The version I'm working with:
commit 5a79a54f8330c904eae98e51be55bbb55ac30c82
Here is my riscv_core_setting.sv:And here is base_testlist.yaml with my custom test:
However, the generated code has csrr and csrw operaions with the 0x340 (MSCRATCH) register which I have disabled. Also, csrr and csrw operations with the 0x340 register present inside the body of most handlers:
Is it a normal result? I am not sure that this is a bug but in my opinion, disabled CSRs should not appear inside the body of the program.