I am trying to use the built-in HPM Events and Counters in the BOOM core to get statistics about the branch prediction and cache units. Before I do that, I am trying to understand exactly how they are supposed to be set up and used, and I have pasted my code below. I have followed Listings 4 and 5 in the
Micro-architectural Event Tracking section in the documentation, however my LargeBoomV3Config output for both of the example counters are 0. What am I doing wrong, and how should I properly set up the counters I need (including the ones in core.scala)?
hpm-test.c:

LargeBoomV3Config output:
