riscv: add Sdtrig CSRs as raw usize accessors - #413
Open
JurajSadel wants to merge 1 commit into
Open
Conversation
romancardenas
requested changes
Aug 18, 2026
| //! Global control for machine-mode triggers (Sdtrig). Exposed as a raw `usize` | ||
| //! so callers can save and restore the full register value. | ||
|
|
||
| read_write_csr_as_usize!(0x7a5); |
Contributor
There was a problem hiding this comment.
This register comprises a few fields. Can you provide an implementation with field accessors using the macros of the crate?
| //! lower bits depends on the trigger type; this module exposes the register as | ||
| //! a raw `usize` for save/restore and discovery. | ||
|
|
||
| read_write_csr_as_usize!(0x7a1); |
Contributor
There was a problem hiding this comment.
This register comprises a few fields. Can you provide an implementation with field accessors using the macros of the crate?
| //! Second data register of the trigger selected by [`tselect`](crate::register::tselect). For address/data | ||
| //! match triggers this typically holds the compare value. | ||
|
|
||
| read_write_csr_as_usize!(0x7a2); |
Contributor
There was a problem hiding this comment.
Can you add tdata3 as well?
Contributor
Author
There was a problem hiding this comment.
Added and hopefully addressed your other comments
JurajSadel
force-pushed
the
upstream/sdtrig-stubs
branch
from
August 19, 2026 14:08
726cdf7 to
0e13c82
Compare
This file contains hidden or 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
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.
cc #1