Open
Conversation
hiddemoll
reviewed
Mar 12, 2026
Contributor
hiddemoll
left a comment
There was a problem hiding this comment.
Lucas and I shortly discussed this change in the office. Going from the smallest configuration to all seems like a big change to me. We compared the synthesis reports and in terms of added logic it adds little.
This is not really my cup of tea, so I'd like @hydrolarus to look at this PR as well.
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.
What (what did you do)
Enable all CSR options in Vexriscv.
Why (context, issues, etc.)
Previously when the CPU trapped, it would not populate the
mepcregister (Machine Exception Program Counter) which indicates at which instruction the exception was thrown. We can trigger on such events and read out these registers as can be seen in this example https://github.com/bittide/bittide-hardware/blob/main/firmware-binaries/examples/smoltcp_client/src/main.rs#L195-L207 (copied for convenience):Without this change, both
mepcandmtvalare 0, so we get:After this change, we get for example:
Which tells us where the CPU trapped and gives some context dependent info (in this case which address it tried to access).
Dear reviewer (anything you'd like the reviewer to pay close attention to?)
Are there any options we should not enable? It builds and runs fine.