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

[Question] Split bit ranges #11

Open
rmsyn opened this issue Mar 10, 2024 · 0 comments
Open

[Question] Split bit ranges #11

rmsyn opened this issue Mar 10, 2024 · 0 comments
Assignees
Labels
question Further information is requested

Comments

@rmsyn
Copy link

rmsyn commented Mar 10, 2024

In certain hardware descriptions, bit fields can be split across multiple ranges with significant bits in between.

An example I've recently come across: https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h#L275,

Is there a current part of the SVD specification for working with fields defined in this way? I would like to be able to use something like enumeratedValues combined with a bitmask for ignoring irrelevant bits on reads, and not clobbering those bits on writes.

As a work-around, it's obviously possible to just split the field into separate field definitions, and document their relation. However, I would like to be able to define this using the type system in the generated code.

If this capability is not currently in the specification, would it be desirable/possible to add it in a future version?

I would be happy to contribute time/effort in design and development work.

@jkrech jkrech added the question Further information is requested label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants