Regs: Single-source the compute_op encoding in SystemRDL - #176
Merged
Conversation
Declare the compute op encoding as an RDL enum (encode= on compute_cfg.compute_op) instead of listing the values in the field desc. The encoding becomes machine- readable: peakrdl raw-header emits it into the C header (COMPUTE_OP__MXQUANT ...) and the SV addrmap pkg (compute_op_e), so SW integrators derive the op codes from the reg contract instead of hand-mirroring idma_pkg::compute_op_e. The regblock hwif is unchanged (compute_op.value stays logic [3:0]).
DanielKellerM
force-pushed
the
regs/compute-op-enum
branch
from
August 12, 2026 11:57
9ef3e43 to
e9b9f86
Compare
The compute op encoding now has one source: the compute_op encode enum in idma_reg.rdl. util/gen_compute_svh.py renders it into target/rtl/include/idma/compute.svh (member descs become comments, enum width from the field width), which idma_pkg.sv includes in place of the hand-written enum. Generated alongside tracer.svh and checked in on deploy branches.
DanielKellerM
force-pushed
the
regs/compute-op-enum
branch
from
August 12, 2026 11:58
e9b9f86 to
f3feaa9
Compare
This was referenced Aug 12, 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.
The compute op encoding now has exactly one source: the
compute_opencode enum inidma_reg.rdl(member descs carry the byte-ratio documentation).Everything else derives from it:
idma_pkg::compute_op_e—util/gen_compute_svh.pyrenders the enum intotarget/rtl/include/idma/compute.svh(width taken from the 4-bit field, descs become member comments), whichidma_pkg.svincludes in place of the hand-written enum. Generated alongsidetracer.svh, checked in on deploy branches.peakrdl raw-headeremitsCOMPUTE_OP__MXQUANT... into the C header andcompute_op_einto the SV addrmap pkg, so integrators derive the op codes instead of hand-mirroring them.The regblock hwif is unchanged (
compute_op.valuestayslogic [3:0]). Validated on the regenerated RTL:tb_idma_reg_frontendpasses in all three configs,tb_idma_mxquantALL PASS at every DataWidth. Follow-up to #170.