Register frontend: C header generation - #158
Open
da-gazzi wants to merge 2 commits into
Open
Conversation
- This target generates C headers in `target/sw` with both the `raw-header` and `c-header` PeakRDL plugins - Also added to `deploy` CI job
da-gazzi
requested review from
DanielKellerM,
micprog and
thommythomaso
as code owners
July 13, 2026 08:13
- the PeakRDL `c-header` plugin generates structs with `__attribute__((__packed__))` which ensures proper packing of fields but can also cause the compiler to emit byte loads/stores to access 32-bit registers, which is definitely not what we want. The `unpacked` version of the C header has the attribute removed. - The `idma_sw_clean` target had a typo and didn't actually clean anything, this is fixed now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
maketargetidma_sw_allto generatetarget/sw/idma_reg{32,64}_${N}d_[raw_]regs.hfor each generated register frontend.rawin the name uses the PeakRDLc-headerplugin to create a struct-based header, the one withrawis generated with theraw-headerplugin. Therawversion is (with the current version ofraw-header) somewhat incomplete as the masks for sub-register bitfields have to be generated/hardcoded externally.deployCI job calls this target anddeploy.pyis amended to edit the appropriate.gitignore; C headers are also checked intodeploybranchesuv.lockandpyproject.tomlamended so thec-headerplugin is part of the environment