Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various deficiencies around type sharing and types with conflicting reset overrides. #266

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

nathanaelhuffman
Copy link
Collaborator

@nathanaelhuffman nathanaelhuffman commented Jan 24, 2025

We had various deficiencies around sharing and overriding reset values on registers that share types. This provides the groundwork for better functioning here and provides error messages when the user asks for something we don't support. We also added new reset_0s and reset_1s functions to all register types so long as they don't have enumerated types. This provides some additional easy knobs to get alternate reset values for your register types.

This isn't at totally generic, full solve but provides some additional tools like the reset_1s, reset_0s functions and at least error messages when things are done that aren't supported currently vs silently doing the unexpected/wrong thing. We will also elide generating the rec_reset function if a reset value was not set for a given register type.

Fixes #265

@nathanaelhuffman nathanaelhuffman force-pushed the rdl-reset-sharing branch 5 times, most recently from 13bf4dd to 6dc13da Compare January 24, 2025 15:27
Copy link
Collaborator

@Aaron-Hartwig Aaron-Hartwig left a comment

Choose a reason for hiding this comment

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

One naming suggestion and a question, otherwise this looks good!

tools/site_cobble/rdl_pkg/listeners.py Outdated Show resolved Hide resolved
tools/site_cobble/rdl_pkg/listeners.py Outdated Show resolved Hide resolved
tools/site_cobble/rdl_pkg/models.py Show resolved Hide resolved
tools/site_cobble/rdl_pkg/templates/regpkg_vhdl.jinja2 Outdated Show resolved Hide resolved
tools/site_cobble/rdl_pkg/templates/regpkg_vhdl.jinja2 Outdated Show resolved Hide resolved
…s on

registers that share types. This provides the groundwork for better functioning
here and provides error messages when the user asks for something we don't support.
We also added new reset_0s and reset_1s functions to all register types so long
as they don't have enumerated types. This provides some additional easy knobs to
get alternate reset values for your register types.
@nathanaelhuffman nathanaelhuffman merged commit 8e3d3c0 into main Jan 24, 2025
8 checks passed
@nathanaelhuffman nathanaelhuffman deleted the rdl-reset-sharing branch January 24, 2025 16:47
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.

conflicting reset values for registers that share a type behave unexpectedly
2 participants