Skip to content

[rv_core_ibex] Add u-mode performance counters and mcounteren#30135

Open
SamuelRiedel wants to merge 4 commits into
lowRISC:masterfrom
SamuelRiedel:mcounteren
Open

[rv_core_ibex] Add u-mode performance counters and mcounteren#30135
SamuelRiedel wants to merge 4 commits into
lowRISC:masterfrom
SamuelRiedel:mcounteren

Conversation

@SamuelRiedel
Copy link
Copy Markdown
Contributor

@SamuelRiedel SamuelRiedel commented May 18, 2026

  • Update Ibex to contain the u-mode performance counter aliases
  • Ibex also implements the mcounteren CSR to control which u-mode counters are accessible
  • The mcounteren CSR can be locked through an input signal to prevent modifying it even in m-mode
  • Add a mcounteren_writable register in rv_core_ibex driving the above signal. This register is lockable with the mcounteren_writable_regwen register.

ToDo:

  • Add sofware test to ensure the newly added registers are writable, lockable, and correctly lock the mcounteren register in Ibex
  • Use consistent MuBi encoding between Ibex and OT.
  • Update Ibex once Add mcounteren register ibex#2403 is merged

Signed-off-by: Samuel Riedel <sriedel@lowrisc.org>
Update code from upstream repository
https://github.com/samuelriedel/ibex.git to revision
fe789273413593e25df6ff29c75927da92f298ac

Signed-off-by: Samuel Riedel <sriedel@lowrisc.org>
Signed-off-by: Samuel Riedel <sriedel@lowrisc.org>
Signed-off-by: Samuel Riedel <sriedel@lowrisc.org>
@SamuelRiedel SamuelRiedel marked this pull request as ready for review May 29, 2026 16:22
@SamuelRiedel SamuelRiedel requested review from a team as code owners May 29, 2026 16:22
@SamuelRiedel SamuelRiedel requested review from gautschimi, rswarbrick and timothytrippel and removed request for a team May 29, 2026 16:22
Copy link
Copy Markdown
Contributor

@gautschimi gautschimi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all good.

changes in this PR are approved. But the vendor-in commit needs to be updated once the ibex PR has been merged.

edit: commit messages could be a bit longer:)

edit: and the CI jobs need to be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants