build(sw): derive iDMA register header from PeakRDL c-header#281
Draft
DanielKellerM wants to merge 1 commit into
Draft
build(sw): derive iDMA register header from PeakRDL c-header#281DanielKellerM wants to merge 1 commit into
DanielKellerM wants to merge 1 commit into
Conversation
00c042c to
116badf
Compare
iDMA dropped the hjson register flow in its SystemRDL/PeakRDL migration, so regtool can no longer generate regs/idma.h. Consume iDMA's generated PeakRDL c-header instead and port dma.h off the regtool macro names to offsetof() on the generated struct plus the PeakRDL bit-position macros. Requires an iDMA version that ships the c-header target (pulp-platform/iDMA#144).
116badf to
90f414f
Compare
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.
What
Adapts Cheshire SW to iDMA's SystemRDL/PeakRDL register flow:
sw.mk: drop theregtool --cdefinesrule on the (now removed)idma_reg64_2d.hjson. Generateregs/idma.hwith PeakRDL c-header directly from iDMA's RDL source ($(IDMA_ROOT)/src/frontend/reg/idma_reg.rdl), exactly like Cheshire already generatescheshire.hfrom its own RDL.dma.h: port off the regtool macro names (*_REG_OFFSET,*_BIT) tooffsetof()on the generatedidma_reg64_2d_tstruct plus the PeakRDL bit-position macros (*_bp).Why
iDMA removed the hjson register description in its SystemRDL migration, so
regtoolcan no longer generateregs/idma.h. Rather than copying a pre-generated header, this leverages Cheshire's existing PeakRDL flow — consistent withcheshire.hand the rest of the SystemRDL-based register generation.Verified end-to-end
Real Cheshire make + RISC-V toolchain against an RDL-era iDMA:
makegeneratessw/include/regs/idma.hfrom iDMA's RDL (idma_reg64_2d_tstruct +IDMA_REG64_2D__*_bpmacros).dma_1d.spm.elf,dma_2d.spm.elf,dma_slink.spm.elfall compile and link.Depends on / TODO before merge
idmaBender dependency to any RDL-era iDMA (post-SystemRDL; e.g. thecommon-cells-v2branch for Gwaihir). Only iDMA's RDL source is needed — no special iDMA build target.sw/include/regs/idma.hafter the bump.