Skip to content

Cleanup module port and parameter lists#311

Merged
phsauter merged 4 commits into
v2-devfrom
interface-cleanup
Jun 3, 2026
Merged

Cleanup module port and parameter lists#311
phsauter merged 4 commits into
v2-devfrom
interface-cleanup

Conversation

@colluca
Copy link
Copy Markdown
Contributor

@colluca colluca commented May 31, 2026

Only stylistic changes in this one, mostly aligned with the LowRisc style guide.

  • Add _i/_o suffixes to all module ports
  • Convert all "modifiable" or "derived" module parameters from ALL_CAPS to UpperCamelCase. Type parameters are excluded, and addressed in the next point. This point includes:
    • Module parameter port lists (parameters and dependent localparams)
    • Module body localparams derived from module parameters
    • All instantiation sites using named parameter binding
    • Comments and string literals that referenced old names
  • Align all type parameter names to the *_t convention (e.g. T, dtype, type_t, DataType, DATA_T are all converted to data_t)
  • Replace all string parameters with enumerated types, defined in cc_pkg.sv

TODO

@colluca colluca added the v2 label Jun 1, 2026
@colluca colluca marked this pull request as ready for review June 1, 2026 07:01
@colluca colluca requested a review from phsauter June 1, 2026 07:01
@colluca colluca force-pushed the interface-cleanup branch from 0c23baa to 0dddb5a Compare June 1, 2026 07:04
Base automatically changed from int-params to v2-dev June 2, 2026 17:13
colluca and others added 4 commits June 2, 2026 19:26
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This includes:
- Module parameter port lists (parameters and dependent localparams)
- Module body localparams derived from module parameters
- All instantiation sites using named parameter binding
- Comments and string literals that referenced old names
- Both RTL source modules and testbench modules

Hardcoded architectural constants (e.g. WIDTH = 16 in cc_exp_backoff)
that do not depend on any module parameter are left in ALL_CAPS.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rename every parameter type declaration that did not follow the *_t
naming convention:
  T        → data_t  (all CDC, stream, spill-register, read modules)
  dtype    → data_t  (cc_fifo, cc_shift_register, cc_shift_register_gated)
  type_t   → data_t  (cc_stream_fifo_optimal_wrap, cc_passthrough_stream_fifo)
  DataType → data_t  (cc_rr_arb_tree)
  DATA_T   → data_t  (cc_stream_mux, cc_stream_arbiter, cc_stream_arbiter_flushable)

Parameters already following the convention (addr_t, idx_t, rule_t,
data_t, payload_t, mem_req_t, mem_resp_t, …) are left untouched.

All instantiation sites using named parameter binding (.T, .dtype, …)
and all internal body uses (port declarations, signal types, type casts)
are updated consistently.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The ARBITER parameter in cc_stream_arbiter and cc_stream_arbiter_flushable
previously used ad-hoc string values ("rr", "prio") to select the
arbitration scheme. Replace it with an enum defined in cc_pkg.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@phsauter phsauter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This took a while to get through but it looks good, I don't think any bug was introduced or something was missed.

@phsauter phsauter merged commit 468fdf5 into v2-dev Jun 3, 2026
7 checks passed
@phsauter phsauter deleted the interface-cleanup branch June 3, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants