Skip to content

Permit duplicate "reserved" fields.#93

Merged
Dirbaio merged 4 commits intoembassy-rs:mainfrom
inferiorhumanorgans:iho/duplicate-reserved-fields
Apr 12, 2026
Merged

Permit duplicate "reserved" fields.#93
Dirbaio merged 4 commits intoembassy-rs:mainfrom
inferiorhumanorgans:iho/duplicate-reserved-fields

Conversation

@inferiorhumanorgans
Copy link
Copy Markdown

Renesas uses multiple fields named Reserved within the same register in a few different places in e.g. the RA4M1 SVD. This would preserve the existing behavior of forbidding duplicate field names except where it appears to be deliberate.

Alternatively should duplicate field names be allowed and then deduplicated in the sanitize transform?

Renesas uses multiple fields named `Reserved` within the same register
in a few different places in e.g. the RA4M1 SVD.  This would preserve
the existing behavior of forbidding duplicate field names except where
it appears to be deliberate.

Alternatively should duplicate field names be allowed and then
deduplicated in the sanitize transform?
@Wassasin
Copy link
Copy Markdown
Contributor

Wassasin commented Feb 27, 2026

I think duplicate field names automagically transforming to fields with a number suffix is fine. Emitting an error seems redundant. Chiptool generally does not require to fix the SVD itself. Rather we fix the defs afterwards in transforms. Hence the SVD parser should be maximally generous.

I would say remove the "eserved" section and its good. Currently your PR does it both in sanitize and in the conversion. Only the latter would be sufficient.

Alex Zepeda added 3 commits April 11, 2026 22:48
- Remove deduplication logic from sanitize
- Allow duplicate names for any value, not just 'reserved'
@Dirbaio Dirbaio merged commit be1bff3 into embassy-rs:main Apr 12, 2026
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.

3 participants