frontend: Make the reg-frontend config-bus CPUIF selectable#148
Merged
Conversation
PeakRDL regblock --cpuif becomes the IDMA_REG_CPUIF make variable (default apb4-flat). The wrapper packs the reg_top's flat CPUIF signals into the matching req/rsp struct: apb, obi, and axi4-lite. The reg_to_apb shim is dropped and register_interface with it (its sole consumer); the launch-stall moves to the protocol-agnostic rd_ack gate. desc64 stays apb-native (static wrappers).
This was referenced Jul 8, 2026
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
The register frontend (
idma_reg32_*/idma_reg64_*) config bus becomes a selectable PeakRDL CPUIF viaIDMA_REG_CPUIF(defaultapb4-flat) instead of a hardcoded protocol. Supported today:apb4-flat(default),obi-flat,axi4-lite-flat.Supersedes #131 (which made the reg frontend APB-only): the default
apb4-flatreproduces #131 exactly, while OBI / AXI-Lite come for free.Why
Since the SystemRDL/PeakRDL migration (#73) the generated
idma_*_reg_topis a peakrdl-regblock block, so the CPU interface is a generation-time choice. Hardcoding APB would force an OBI/reg_bus bridge in Snitch/Cheshire-style SoCs — the opposite of what removing thereg_to_apbshim is meant to save. OBI is a native CPUIF inpeakrdl>=1.5.0, so this needs no new dependency.How
IDMA_REG_CPUIF ?= apb4-flat(idma.mk) threads into bothpeakrdl regblock --cpuifand the wrapper generation (gen_idma.py/frontend.py).idma_reg.sv.tplgains a per-CPUIF branch that packs the reg_top flat CPUIF signals into the matching req/rsp struct (apb_req_t/obi_req_t/axi_lite_req_t).reg_to_apbshim is removed andregister_interfacedropped (it was its sole consumer); the launch-stall rides the protocol-agnosticrd_ack & arb_readygate.apb4-flat.Verification
All three CPUIFs regenerate cleanly and elaborate (Verilator, real
apb_req_t/obi_req_t/axi_lite_req_tplus an NDdma_req_t) with zero width/pin errors on the CPUIF connections. The OBI branch overrides the reg_topID_WIDTHsos_obi_aid/s_obi_ridare not truncated for OBIIdWidth>1.Breaking (0.7.0)
Downstream reg_bus integrators must now wire APB (or select
obi-flat/axi4-lite-flat) — the same port-type break as #131. There are no in-repo instantiation sites (the reg frontend is a library module).