Skip to content
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

⚠️ Rework hardware performance monitor (HPM) events #811

Merged
merged 6 commits into from
Feb 17, 2024
Merged

Conversation

stnolting
Copy link
Owner

The current HPM events are partially redundant and perhaps difficult to understand. This Pr tries to fix that by cleaning up the available HPM events.

This is the list of new and reworked HPM events with (hopefully) improved description:

ID Name [C] R/W Event Description
0 HPMCNT_EVENT_CY r/w active clock cycle (CPU not in sleep mode)
1 HPMCNT_EVENT_TM r/- not implemented, hardwired to zero
2 HPMCNT_EVENT_IR r/w any executed instruction (16-bit/compressed or 32-bit/uncompressed)
3 HPMCNT_EVENT_COMPR r/w any executed 16-bit/compressed (C ISA extension) instruction
4 HPMCNT_EVENT_WAIT_DIS r/w instruction dispatch wait cycle (wait for instruction prefetch-buffer (IPB) refill; caused by a fence instruction, a control flow transfer or a instruction fetch bus wait cycle)
5 HPMCNT_EVENT_WAIT_ALU r/w any delay/wait cycle caused by a multi-cycle ALU operation
6 HPMCNT_EVENT_BRANCH r/w any executed branch instruction (unconditional, conditional-taken or conditional-not-taken)
7 HPMCNT_EVENT_BRANCHED r/w any control transfer operation (unconditional jump, taken conditional branch or trap entry/exit)
8 HPMCNT_EVENT_LOAD r/w any executed load operation (including atomic memory operations, A ISA extension)
9 HPMCNT_EVENT_STORE r/w any executed store operation (including atomic memory operations, A ISA extension)
10 HPMCNT_EVENT_WAIT_LSU r/w any memory/bus/cache/etc. delay/wait cycle while executing any load or store operation (caused by a data bus wait cycle))
11 HPMCNT_EVENT_TRAP r/w starting processing of any trap

@stnolting stnolting added the HW hardware-related label Feb 17, 2024
@stnolting stnolting self-assigned this Feb 17, 2024
@stnolting stnolting marked this pull request as ready for review February 17, 2024 20:28
@stnolting stnolting merged commit d375493 into main Feb 17, 2024
8 checks passed
@stnolting stnolting deleted the rework_hpm branch February 17, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HW hardware-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant