Skip to content

All trigger registers are optional#431

Merged
Tim Newsome (timsifive) merged 2 commits into
masterfrom
trigger
Feb 21, 2019
Merged

All trigger registers are optional#431
Tim Newsome (timsifive) merged 2 commits into
masterfrom
trigger

Conversation

@timsifive

Copy link
Copy Markdown
Contributor

See #422. This might break software that's not ready for the
possibility, but I believe the privilege spec is already clear that the
Debug CSRs are optional.

See #422. This might break software that's not ready for the
possibility, but I believe the privilege spec is already clear that the
Debug CSRs are optional.
@ernie-sifive

Copy link
Copy Markdown
Collaborator

I wonder if it would be useful to remind readers in the trigger intro section that if the optional trigger registers don't exist, then accessing them will cause an illegal instruction exception. The current sequence described in the intro would fail after step 1 (write 0 to tselect) with an exception.

A related question would be how a debugger is supposed to determine if triggers exist. Is the only way to attempt to write tselect and see if it generates an exception?

@timsifive

Copy link
Copy Markdown
Contributor Author

I wonder if it would be useful to remind readers in the trigger intro section that if the optional trigger registers don't exist, then accessing them will cause an illegal instruction exception. The current sequence described in the intro would fail after step 1 (write 0 to tselect) with an exception.

Good suggestion. I've clarified that.

A related question would be how a debugger is supposed to determine if triggers exist. Is the only way to attempt to write tselect and see if it generates an exception?

That's right. If a debugger only cares about the number of registers, then a binary search should find that relatively quickly.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great, I think that clarifies the discovery process.

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.

2 participants