-
Notifications
You must be signed in to change notification settings - Fork 58
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
hw: Improve performance counters for bring-up #155
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fischeti
force-pushed
the
improve-perf-cnt
branch
from
July 16, 2024 11:37
abf0c06
to
8689e7c
Compare
fischeti
force-pushed
the
improve-perf-cnt
branch
3 times, most recently
from
July 19, 2024 12:31
95df68a
to
e955201
Compare
fischeti
requested review from
colluca,
viv-eth,
paulsc96 and
lucabertaccini
as code owners
July 19, 2024 13:45
fischeti
force-pushed
the
improve-perf-cnt
branch
2 times, most recently
from
August 1, 2024 19:10
54ee85c
to
44d22f7
Compare
colluca
requested changes
Aug 2, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution Tim! Mostly LGTM, just a few comments following.
hw/snitch_cluster/src/snitch_cluster_peripheral/snitch_cluster_peripheral.sv
Outdated
Show resolved
Hide resolved
hw/snitch_cluster/src/snitch_cluster_peripheral/snitch_cluster_peripheral_reg.hjson
Outdated
Show resolved
Hide resolved
hw/snitch_cluster/src/snitch_cluster_peripheral/snitch_cluster_peripheral_reg.hjson
Outdated
Show resolved
Hide resolved
hw/snitch_cluster/src/snitch_cluster_peripheral/snitch_cluster_peripheral_reg.hjson
Outdated
Show resolved
Hide resolved
…d set Performance Counters to track Retired Instructions during Boot Procedure.
…oot procedure and generated scratch within auto-generated logic.
Before, SW was able to write a value to the performance counters which is not really a use case
Previously, the test did not even return errors
fischeti
force-pushed
the
improve-perf-cnt
branch
from
August 6, 2024 14:00
5cfdd2f
to
505e070
Compare
This reverts commit 0d28797.
colluca
approved these changes
Aug 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
viv-eth
pushed a commit
that referenced
this pull request
Aug 9, 2024
Co-authored-by: Milos Hirsl <[email protected]> Co-authored-by: Luca Colagrande <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds improvements to the performance counters for bring-up, and restructures the performance counter implementation:
Changed
After reset, performance counters immediately start tracking, which allows checking from outside if the cores, icache, etc., are alive. The metrics that are currently tracked are:
snitch_cluster/hw/snitch_cluster/src/snitch_cluster_peripheral/snitch_cluster_peripheral.sv
Lines 103 to 111 in 333ee0d
The configuration registers are refactored for a more sensible encoding of the metrics that can be tracked. Further, the configuration of the metric/hart and the enable are now separate registers, which should make it a bit faster resp. more accurate to enable/disable performance counters. This means the interface for the performance counter API changed slightly, but makes more sense now.
The previous
perf_cnt
test was adapted to the new performance counter API interface, and now actually checks for error. Previously, it served mostly as an example on how to set up the performance counters and always returned zero.TODO
Revert container references in CI tomain
when deemed ready to merge