You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to enable performance counters in the Rocket core. I don't see the implementation of mhpmevent3, mhpmevent4, mhpmcounter3, mhpmcounter4 in the RTL of the defaultConfig. I see that following parameter is set to true by default but none of the mentioned counters does not get generated in the defaultConfig.
Can someone please explain how to enable these basic performance counters in Rocket?
I tried increasing nPerfCounters: Int = 0 to 8 and using following code to configure and read hpmcounter3. But counter never changed, it had a random value in each run.
addi x14, zero, 0x04
slli x14, x14, 8
addi x14, x14, 2
csrrw zero, mhpmevent3, x14
...
csrr x28, mhpmcounter3 #Read counters in two different places
...
csrr x28, mhpmcounter3
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to enable performance counters in the Rocket core. I don't see the implementation of mhpmevent3, mhpmevent4, mhpmcounter3, mhpmcounter4 in the RTL of the defaultConfig. I see that following parameter is set to true by default but none of the mentioned counters does not get generated in the defaultConfig.
haveBasicCounters: Boolean = true
rocket-chip/src/main/scala/rocket/RocketCore.scala
Line 37 in b503f8a
Can someone please explain how to enable these basic performance counters in Rocket?
I tried increasing nPerfCounters: Int = 0 to 8 and using following code to configure and read hpmcounter3. But counter never changed, it had a random value in each run.
I am using the configuration mentioned in #1343 (comment)
Beta Was this translation helpful? Give feedback.
All reactions