Skip to content
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

Sdtrig: Clarify that tinfo.version is a global constant, not per-trigger #1081

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JanMatCodasip
Copy link
Contributor

The purpose of "tinfo.version" field is apparently to describe the version of the whole Sdtrig implementation. That is, it is a constant unaffected by the current value of tselect CSR. Judging form the original commit that introduced it (0374fd6) and from the related mailing list discussion
(https://lists.riscv.org/g/tech-debug/topic/96888390).

However, the sentences

This register provides access to the trigger selected by tselect.
The reset values listed here apply to every underlying trigger.

leave certain room for interpretation that "tinfo.version" is a per-trigger constant, not a global one, and could therefore change depending on "tselect".

Remove this ambiguity by rewording the description of "tinfo" CSR and "tinfo.version" field.

Copy link
Contributor

@en-sc en-sc left a comment

Choose a reason for hiding this comment

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

I believe this to be a valuable clarification. Tnanks!

@@ -176,7 +177,9 @@ same project unless stated otherwise.

<field name="0" bits="XLEN-1:32" access="R" reset="0" />
<field name="version" bits="31:24" access="R" reset="Preset">
Contains the version of the Sdtrig extension implemented.
Contains the version of the Sdtrig extension implemented. The read-only
value of this field is refers to the implemented version of the whole
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
value of this field is refers to the implemented version of the whole
value of this field refers to the implemented version of the whole

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, fixed.

@pdonahue-ventana
Copy link
Collaborator

The confusion is that "the version of the Sdtrig extension implemented" might change dynamically because part of the trigger module might support 0.13 and another part supports 1.0?

The purpose of "tinfo.version" field is apparently to describe the version
of the whole Sdtrig implementation. That is, it is a constant unaffected by
the current value of tselect CSR. Judging form the original commit that
introduced it (0374fd6) and from the
related mailing list discussion
(https://lists.riscv.org/g/tech-debug/topic/96888390).

However, the sentences

`This register provides access to the trigger
selected by tselect. The reset values listed here apply to
every underlying trigger.`

leave certain room for interpretation that "tinfo.version" is
a per-trigger constant, not a global one, and could therefore
change depending on "tselect".

Remove this ambiguity by rewording the description of "tinfo" CSR
and "tinfo.version" field.
@JanMatCodasip
Copy link
Contributor Author

JanMatCodasip commented Nov 11, 2024

Yes. The sentence This register [tinfo] provides access to the trigger selected by tselect. may lead the reader to believe that tinfo.version may differ for individual triggers. That would mean that some triggers follow the implementation prior to spec revision 5a5c078 whereas others follow the spec after this commit.

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.

3 participants