[sw-sysemu]: Erbium ESR registers mapping#30
Merged
vidas merged 5 commits intoaifoundry-org:masterfrom Dec 18, 2025
Merged
Conversation
tahoma
reviewed
Dec 16, 2025
tahoma
approved these changes
Dec 16, 2025
Member
tahoma
left a comment
There was a problem hiding this comment.
Other than my one minor stylistic comment, this code generally looks quite good to me.
glguida
reviewed
Dec 16, 2025
Member
glguida
approved these changes
Dec 18, 2025
Member
glguida
left a comment
There was a problem hiding this comment.
Approve, with note for future refactoring of ESRs.
Separate ESR interface declarations from internally used definitions by moving them from the header into cpp file.
Implement `esr_read` for Erbium ESRs. Implement other functions declared in esrs.h - either dummy versions or copied from ET-SOC-1 version.
Implement `esr_write` for Erbium ESRs.
Set Erbium ESR defaults on reset.
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.
Implement ESR register reading/writing interfaces according to spec (issue #26). First of a few PRs for this ticket.
Derived from ET-SOC-1 ESR registers with different addressing, removals (only hart-debug, shire and neighborhood registers kept) and different field mappings (masks).
Set new register defaults on reset.
The decision to implement all ESR registers for Erbium separate from ET-SOC-1 version is not a perfect compromise, but the option with shared ESR code and plentiful
#ifs became almost unreadable.Additionally refactor
esrs.hheader file by keeping only public declarations and moving the rest into cpp (although ESRs are implemented as part ofSystemclass, not a separate entity).Not included in this PR - actual implementations of new registers (timer that used to live in peripherals (PU) shire, monitoring (SM)) and changes to the register behavior.