Fix rvfi exception decoding#3245
Conversation
| - test: M_RW_CSR | ||
| iterations: 1 | ||
| <<: *common_test_config | ||
| # Prerequisite: install riscv-arch-test (== run 'cva6/regress/install-riscv-arch-test.sh') first. |
There was a problem hiding this comment.
To my mind, the asm tests does not depend on riscv-arch-test. I you agree, could you remove these comments ?
| @@ -0,0 +1,91 @@ | |||
| ## // Copyright 2023 Thales | |||
There was a problem hiding this comment.
Great to get this yaml testlist file, but what is the relation with the rvfi_tracer modification ?
There was a problem hiding this comment.
Hi @JeanRochCoulon, sorry for the confusion! I accidentally branched off my local fix for #3223 instead of a clean master.
I just force-pushed to clean up the history. This PR is now strictly just the rvfi_tracer.sv changes for #3239.
(Note: I also removed that riscv-arch-test comment you mentioned over in PR #3229 where that YAML file actually belongs).
Resolves openhwgroup#3239 by adding missing exception decodings (Sv39 page faults and U/S-mode ecalls) mapped to their standard strings for better simulation logging.
e96f00e to
aa15019
Compare
|
Thanks @DymShanks |
|
❌ failed run, report available here. |
This PR addresses the missing Sv39 page-fault cause decodings in the RVFI tracer reported in #3239.
While implementing the fix, I audited the
casestatement against the RISC-V Privileged Architecture Specification and noticed that the U-mode and S-mode Environment Calls were also missing. I have added them alongside the page faults to ensure the tracer's logging is comprehensive.Changes Made in
corev_apu/tb/rvfi_tracer.sv:INSTR_PAGE_FAULT(0xc),LOAD_PAGE_FAULT(0xd), andSTORE_PAGE_FAULT(0xf).ENV_CALL_UMODE(0x8) andENV_CALL_SMODE(0x9).Related Issue
Fixes #3239 (Thanks to @sjo99-kr for the catch!)