Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip code generation for fields marked "reserved"
The goal is to correct the documentation generated for the CCM CCGR fields. Based on how the combiner works, these fields are generally considered combine-able across all chips. So when we generate code for the 1061 CCM, we're permitted to use the fields from the 1011 CCM. The 1011 CCM has many more reserved gates than the 1062 CCM, so those end up leaking into the documentation. This commit drops the fields that are marked "reserved" in their human-readable description. It's not clear why these are provided in the SVD. By dropping these reserved fields, we change the "field plurality" heuristic that the combiner uses to understand equivalent fieldsets. Notice how the CCGR documentation corrects itself in the 1061 CCM. We also generate less code, and less chance for humans to poke at reserved registers. I'm not a fan of hard-coding this behavior into the SVD importer. But it was easy to prototype. I might consider a transform that does this across all document-able items. I didn't use a 'contains("reserved")' predicate for the field skip. There are some fields that are documented with "all other values are reserved," so that larger-reaching predicate would incorrectly remove those fields. I briefly scanned these changes to make sure removals seemed appropriate.
- Loading branch information