Skip to content

Commit

Permalink
Sdtrig: Clarify that tinfo.version is a global constant, not per-trigger
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Jan Matyas committed Nov 8, 2024
1 parent bcd05b7 commit c56c4f7
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions xml/hwbp_registers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ same project unless stated otherwise.
</register>

<register name="Trigger Info" short="tinfo" address="0x7a4">
This register provides access to the trigger selected by {csr-tselect}.
The reset values listed here apply to every underlying trigger.
This register provides information about the implemented version of
the Sdtrig extension, and about the trigger types supported by
the trigger selected by {csr-tselect}.

This register is optional if no triggers are implemented, or if
{tdata1-type} is not writable and {tinfo-version} would be 0. In
Expand All @@ -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
Sdtrig extension, and is unaffected by the value of {csr-tselect}.
<value v="0" name="0">
Supports triggers as described in this spec at commit 5a5c078,
made on February 2, 2023.
Expand All @@ -195,9 +198,9 @@ same project unless stated otherwise.
</field>
<field name="0" bits="23:16" access="R" reset="0" />
<field name="info" bits="15:0" access="R" reset="Preset">
One bit for each possible {tdata1-type} enumerated in {csr-tdata1}. Bit N
corresponds to type N. If the bit is set, then that type is
supported by the currently selected trigger.
One bit for each possible {tdata1-type} enumerated in {csr-tdata1}.
Bit N corresponds to type N. If the bit is set, then that type is
supported by the currently selected trigger (by {csr-tselect}).

If the currently selected trigger doesn't exist, this field
contains 1.
Expand Down

0 comments on commit c56c4f7

Please sign in to comment.