Skip to content

[sw-sysemu]: Erbium ESR registers mapping#30

Merged
vidas merged 5 commits intoaifoundry-org:masterfrom
vidas:esrs-initial
Dec 18, 2025
Merged

[sw-sysemu]: Erbium ESR registers mapping#30
vidas merged 5 commits intoaifoundry-org:masterfrom
vidas:esrs-initial

Conversation

@vidas
Copy link
Copy Markdown
Member

@vidas vidas commented Dec 15, 2025

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.h header file by keeping only public declarations and moving the rest into cpp (although ESRs are implemented as part of System class, 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.

@vidas vidas self-assigned this Dec 15, 2025
@vidas vidas requested review from glguida and tahoma December 15, 2025 12:25
Copy link
Copy Markdown
Member

@tahoma tahoma left a comment

Choose a reason for hiding this comment

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

Other than my one minor stylistic comment, this code generally looks quite good to me.

@deitch
Copy link
Copy Markdown
Member

deitch commented Dec 18, 2025

@vidas now that @glguida fixed that dependency issue with #34 , you might want to try to rebase on latest master and see if it fixes your CI.

Copy link
Copy Markdown
Member

@glguida glguida left a comment

Choose a reason for hiding this comment

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

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.
@vidas vidas merged commit ab7d179 into aifoundry-org:master Dec 18, 2025
1 check passed
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.

4 participants