Skip to content

feat(csr): inherit attrs from aliases #905

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

blazethunderstorm
Copy link

Closes #781

Made CSR field aliases automatically inherit missing attributes like description, type, and reset value from the original field. This avoids duplication and keeps alias definitions cleaner and less error-prone.

@ThinkOpenly
Copy link
Collaborator

Thanks for the efforts here.

The desired solution for #781 is more general, though. It's very likely that the realization will be something like $inherits usage, and this may be worth a try as an explicit solution (rather than something magical in the Ruby code). See examples of usage in the instruction YAML files in spec/std/isa/inst/B. If you can replace the duplicated attributes in the CSR aliases with $inherits and verify it's doing what's expected by generating a "resolved spec" (./do gen:resolved_arch) and looking at the aliased fields, then you're in good shape.

If this doesn't make sense, do ask questions. A learning curve is certainly normal and expected. :-)

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.

Field aliases should inherit attributes
2 participants