openhwgroup / cv32e40s

4 stage, in-order, secure RISC-V core based on the CV32E40P
https://docs.openhwgroup.org/projects/cv32e40s-user-manual/en/latest/
Other
126 stars 21 forks source link

Unwarranted PMP Fault? #464

Closed silabs-robin closed 1 year ago

silabs-robin commented 1 year ago

Component

Component:RTL: For issues in the RTL (e.g. for files in the rtl directory)

Steps to Reproduce

  1. My core-v-verif fork/branch: https://github.com/silabs-robin/core-v-verif/tree/pmprvfi_fix3
  2. 668b73952c4186934165922614c862ff61de0473
  3. Run formal
  4. Check a_rvfi_mem_allowed_generalinstr (Bound 14, -engine_mode B)

Description

Two rvfi_valids occur, the latter with a PMP fault exception. But, investigating the signals show that the instr-side PMP check for both fetches seems fine.

image

silabs-robin commented 1 year ago

@silabs-oivind ref discussion last Friday.

silabs-oivind commented 1 year ago

Hi, This is a table jump, where the table jump instruction passes PMP checks, but the table jump target address fails PMP checks. It seems like the design and RVFI behaves according to spec.

I'm not sure if you have enough information on rvfi to recognize and properly check this scenario. We might need to add some extra rvfi signals for this.

silabs-robin commented 1 year ago

Understood. I will update the assert accordingly, and request additional RVFI signals if needed. Closing this issue as it seems the RTL/RVFI is doing the right thing.