-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HPM Questions #265
Comments
Thanks for the question! First of all, any suggestions to clarify the documentation is always helpful. Sorry it didn't help to much in this case.
Here are the snippets of code that define the events. riscv-boom/src/main/scala/exu/core.scala Lines 190 to 195 in f4968d7
riscv-boom/src/main/scala/exu/core.scala Lines 221 to 228 in f4968d7
riscv-boom/src/main/scala/exu/core.scala Lines 245 to 251 in f4968d7
They tracks things such as branch prediction, ROB flushes, I/D$ misses, etc. As for the numbering/ordering of the events, we reference the U54 manual as an example on how to access events (if I remember correctly they map to the Rocket code). The events that they have (and what Rocket has) will be different from BOOM. You need to look at the Note: If you want to track your own event, feel free to modify the source and add your own.
We use the same infrastructure to support counters as Rocket. So if I am not mistaken we support 32 (including cycle, time, instret counters).
What I end up using for my own projects is this repository: https://github.com/abejgonzalez/riscv-code-constructor. It includes a header file https://github.com/abejgonzalez/riscv-code-constructor/blob/master/inc/hpm-util.h and example on how to use it https://github.com/abejgonzalez/riscv-code-constructor/blob/master/src/hpmCounters.c. Otherwise, Finally, Chris Celio created a program to help reading counters also: https://github.com/ccelio/riscv-hpmcounters Otherwise, as far as I know, there is no "de-facto" standard for reading out counters. So you have to hack something together or use the code found in one of these sources (or somewhere else that I don't know of). Please let me know if you have any other questions! I can also update the docs with this information if that was unclear. |
Thanks for the pointers to software examples. So the mapping is like this ? mhpeventX[7:0] = 0
mhpeventX[7:0] = 1
mhpeventX[7:0] = 2
Could you please describe what exactly "Flush" and "I$ blocked" means ? I assume that at unspecified bit positions( e.g. with mhpeventX[7:0] = 1 at position 14) nothing happens, i.e. the counters will not increment. Regarding the number of counters, I just stumbled over |
Yup those mappings look right to me. Flush goes high whenever the ROB is flushed due to things such as exceptions, pipeline replays, and mem. ordering failures. Its used to redirect the frontend of the pipeline through the Fetch Target Queue. For reference: riscv-boom/src/main/scala/ifu/fetch-target-queue.scala Lines 174 to 194 in 317b137
I$ blocked: riscv-boom/src/main/scala/exu/core.scala Line 258 in 317b137
It checks if there is a valid Fetch Packet coming from the Frontend. As for the My main hesitation about adding a specific list of HPM/E's that BOOM support is that it could cause future divergence if the docs are not up to date. That's why I just point to the |
@heiner-bauer Any other questions on HPM's or is this issue resolved? |
Yes, you can close this issue. |
Great. Let us know if you have any more questions! |
Bump SHA-3 accelerator for tutorial enhancements
Moving the question from #152 about HPMs to here
Adapted from @heiner-bauer s question:
After reading chapter 12 of the documentation I have several questions regarding HPMs / HPEs:
The text was updated successfully, but these errors were encountered: