[rv_core_ibex] Add u-mode performance counters and mcounteren#30135
[rv_core_ibex] Add u-mode performance counters and mcounteren#30135SamuelRiedel wants to merge 3 commits into
mcounteren#30135Conversation
3baeac4 to
a204ac4
Compare
rswarbrick
left a comment
There was a problem hiding this comment.
Should the "Add missing rvfi ports" commit be squashed with the vendoring update? Otherwise, I think we have a (slightly) broken intermediate state of the repository?
| regwen); | ||
|
|
||
| // Since MCOUNTEREN_WRITABLE is True, writes to mcounteren should succeed. | ||
| csr_write_mcounteren(0x5); |
There was a problem hiding this comment.
Why is this using a hex constant instead of a define?
(Maybe the value doesn't really matter? But it still makes sense to stick it in a variable to avoid having to write a magic number in multiple places)
There was a problem hiding this comment.
There is no good reason for this. I added a define now and fixed it.
Yes good point. I will squash the two once we merge the Ibex PR and I vendor in Ibex from the main branch. |
Signed-off-by: Samuel Riedel <sriedel@lowrisc.org>
Update code from upstream repository https://github.com/lowRISC/ibex.git to revision aae4809aea170fc605bdaa64a70a13efd2408829 * [dv] Check u-mode counter alias the correct m-mode counter (Samuel Riedel) * [formal] Exclude u-mode counters from formal verification (Samuel Riedel) * [doc] Document the newly added performance counters (Samuel Riedel) * [dv] Add directed test for mcounteren lock signal (Samuel Riedel) * [dv] Add `mcounteren` directed test (Samuel Riedel) * [dv] Fix ordering in `directed_testlist.yml` (Samuel Riedel) * [dv] Implement Ibex-specific mcounteren behavior in cosim (Samuel Riedel) * [rtl] Add input to lock mcounteren (Samuel Riedel) * [rtl] Add unpriviledged counter/timers (Samuel Riedel) * [rtl] Add register for `mcounteren` (Samuel Riedel) * [rtl] Fix incrementing `minstret` after setting it (Samuel Riedel) * [rtl] Fix speculative increment of `minstret` (Samuel Riedel) * [syn] Fix scripts for new vendored lowrisc_ip (Harry Callahan) * [syn] Add nix devShell for example synthesis flow (Harry Callahan) * [dv] Fixup explicit static lifetime on initializer by seperating decl from assign. (Harry Callahan) * [vendor/google_riscv-dv] Add VCS -Xcflags to suppress build warnings (Harry Callahan) * [vendor/google_riscv-dv] use env bash and non-absolute bash paths (Harry Callahan) * [rtl] Explicitly define mapping to `prim_generic` for linter targets (Samuel Riedel) * [rtl] Fix prim_generic mapping in ibex_top (Samuel Riedel) * [rtl] Move prim_generic dependency to ibex_top (Samuel Riedel) * [doc] Ibex Concierge updated (Marno van der Maas) Signed-off-by: Samuel Riedel <sriedel@lowrisc.org>
Signed-off-by: Samuel Riedel <sriedel@lowrisc.org>
mcounterenCSR to control which u-mode counters are accessiblemcounterenCSR can be locked through an input signal to prevent modifying it even in m-modemcounteren_writableregister inrv_core_ibexdriving the above signal. This register is lockable with themcounteren_writable_regwenregister.ToDo:
mcounterenregister in Ibexmcounterenregister ibex#2403 is merged