-
Notifications
You must be signed in to change notification settings - Fork 925
Implement mcontrol6.hit #1257
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
Implement mcontrol6.hit #1257
Conversation
The hit is separated into hit0 and hit1, i.e., hit={hit1,hit0}. I need help finding a more elegant implementation for the LSB and MSB operation on the hit field.
|
b06a669
to
3f2e4f9
Compare
The CI fails. I passed the compilation on my PC and need help analyzing the failure. |
CI fails with:
|
This failure mode indicates that a public header is including a private header: |
3f2e4f9
to
62c845d
Compare
There are two methods to avoid reliance on
I choose the second method for simplicity. |
Please hold off on merging this. The debug spec is tweaking this change a bit more. It should not have been merged into the spec yet. (The actual change relative to this PR will be minor, so this code will probably all apply.) |
It seems the debug spec has finalized the mcontrol6.hit. I believe this code of the PR provides the desired behavior. |
62c845d
to
eca9c96
Compare
HIT_FALSE = 0, | ||
HIT_BEFORE = 1, | ||
HIT_AFTER = 2, | ||
HIT_IMMEDIATELY_AFTER = 3 |
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.
HIT_FALSE = 0, | |
HIT_BEFORE = 1, | |
HIT_AFTER = 2, | |
HIT_IMMEDIATELY_AFTER = 3 | |
HIT_FALSE = CSR_MCONTROL6_HIT0_FALSE, | |
HIT_BEFORE = CSR_MCONTROL6_HIT0_BEFORE, | |
HIT_AFTER = CSR_MCONTROL6_HIT0_AFTER, | |
HIT_IMMEDIATELY_AFTER = CSR_MCONTROL6_HIT0_IMMEDIATELY_AFTER |
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.
This requires the debug_defines.h to the triggers.h. The #1257 (comment) wants the triggers.h need not to rely on the debug_defines.h.
@timsifive I personally believe the debug_defines.h is a public header. Should we consider installing the debug_defines.h to the CI platform?
eca9c96
to
0557e5e
Compare
@YenHaoChen Is this ready to merge? You might want to rebase on top of master since almost a year has elapsed. |
0557e5e
to
9a1ad1f
Compare
@aswaterman
I believe this PR is ready to merge. |
I don't see the update to tinfo.version to indicate that mcontrol6 has the new hit0/hit1 fields. |
@rtwfroody Thanks for the note. I overlooked the tinfo.version. Bump the header "debug_defines.h" for the tinfo.version. |
Update CSR_MCONTROL6_HIT to CSR_MCONTROL6_HIT0 Include CSR_TINFO_VERSION* macros
…d mcontrol6_t::hit Add mcontrol_common_t::set_hit()
Avoid using private headers, e.g., debug_defines.h, in triggers.h
a3d37d8
to
7657966
Compare
The debug spec revised the mcontrol6.hit in riscv/riscv-debug-spec#795. This PR implements the revised behavior.