Closed AyoubJalali closed 1 month ago
The zihpm
is not enabled as far as I know, we should enable it in spike if we want it
The Zicnt and Zihpm are not supported by 65x, but the CSRs referenced by @AyoubJalali are MHPMEVENT and MPPMCOUNTERS/H at 0xC** addresses (there are not part of the previous listed extensions).
As far as I can tell from reading the RTL, the Zihpm
extension is implemented: I see both MHPMCOUNTERn CSRs (range 0xB03..0xB9F) and those without the leading M (range 0xC03..0xC9F), cf. https://github.com/openhwgroup/cva6/blob/master/core/csr_regfile.sv#L669 and ff.
The privilege check on the 0xC.. CSRs says 'no violation' if the privilege mode is M (https://github.com/openhwgroup/cva6/blob/master/core/csr_regfile.sv#L2125).
Zihpm does not correpond to 0xB03..0xB9F and range 0x323..0x33f !! But to 0xC.. addresses. So Zihpm is not supported by 65x. Please @zchamski confirm it.
The Zicnt and Zihpm are not supported by 65x, but the CSRs referenced by @AyoubJalali are MHPMEVENT and MPPMCOUNTERS/H at 0xC** addresses (there are not part of the previous listed extensions).
Just to confirm spike support MHPMEVENT and MPPMCOUNTERS/H, i'm issue talk about hpmcounter[n]3-31h form 0xC03 to 0xC1F and from 0xC83 to 0xC9F
Spike seems aligned with 65x specification, but RTL is not aligned. RTL implements Zihpm, but i should not. RTL need to be fixed.
so this is an RTL issue @JeanRochCoulon you can confirm this to create an issue in the CVA6 and close this
Spike seems aligned with 65x specification, but RTL is not aligned. RTL implements Zihpm, but i should not. RTL need to be fixed.
need to add a new extension to condition the RTL Zihpm
This gihub issue is superseeded by #2201
Is there an existing CVA6 bug for this?
Bug Description
Hello, Spike raise exception on reading from hpmcounter3-31h , these CSRs are implemented in CV32A65X and it's RO-ZERO CSRs.