cv32e40p
cv32e40p copied to clipboard
Wrong PMP CSRs value read/written
Here is an initial issue found after applying OneSpin 360 DV-Verify RVV App on RI5CY:
- Description: reading the associated pmpaddrx CSRs is handled incorrectly and returns always the value zero. - Example: Two consecutive instructions 32’h3b225073 (csrrwi x0, pmp_addr2, 4) and 32’h3b286073 (csrrsi x0, pmp_addr2, 10) write the pmpaddr2 register with the values 32’h4 and 32’h10 (should be 32'h14), respectively. The value zero is always returned for any read of this register regardless of its actual value, as what happens when reading the register pmpaddr2 one cycle after it is written by the first instruction in this scenario. Consequently, the wrong value 32'h10 is written to the register by the second instruction, as it ors the (zero) read data with the immediate. - Bug’s source: Using normal case statement instead of casex in the read logic of the CSRs in case PULP_SECURE parameter is set, as in Line 294/riscv-cs_registers.sv.
Product: OneSpin 360 DV-Verify App: RVV Tool's version: 2019.2.0
Likely the issue has been resolved by now; casex was added and removed again because of explicit CSR address encoding in https://github.com/openhwgroup/cv32e40p/pull/376. Needs to be checked though before closing this issue.