Skip to content

Module services - #669

Draft
desmonddak wants to merge 99 commits into
intel:mainfrom
desmonddak:module_services
Draft

Module services#669
desmonddak wants to merge 99 commits into
intel:mainfrom
desmonddak:module_services

Conversation

@desmonddak

Copy link
Copy Markdown
Contributor

Description & Motivation

This is a new API for dealing with services after a module has been built. Rather than adding more methods to Module, we create services that can operate on a built Module, like writing out waveforms, or synthesizing outputs like SystemVerilog.

So instead of 'module.generateSynth(outputPath: 'build/${module.definitionName}.sv') for outputing SystemVerilog and WaveDumper(module, outputPath: 'build/${module.definitionName}.vcd') for outputing Waveforms, we use:

  final sv = SvService(module, outputPath: 'build/${module.definitionName}');
  final waves = WaveformService(module, outputPath: 'build/${module.definitionName}.vcd');

As we add more services, this is a more consistent API with fewer surprises.

Related Issue(s)

None

Testing

Tests are converted to the new Service apis and run through.

Backwards-compatibility

Is this a breaking change that will not be backwards-compatible? If yes, how so?

No. But eventually, we would like to deprecate existing methods in favor of a services model.

Documentation

Does the change require any updates to documentation? If so, where? Are they included?

Small changes in the README.md and throughout the tutorial and tests.

desmonddak and others added 30 commits April 17, 2026 08:30
Clarify comment

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This aligns central_naming with the simplified naming approach already
adopted by all downstream branches (module_services, netlist, source_debug,
systemc_trace, fst-writer).

Changes:
- Remove Namer._instanceNames cache field
- Remove Namer.instanceNameOf(Module) method
- Update synthesizers to use Namer.allocateName(String) directly
- Remove destination tracking from _BusSubsetForStructSlice

Benefit: Eliminates duplication across 5+ branches, making each branch
truly orthogonal and mergeable without conflicts.

Trade-off: Instance names no longer cached across synthesis passes, but all
downstreams already use this simpler approach.
# Conflicts:
#	tool/gh_codespaces/install_dart.sh
instanceNameOf(Module) allocates a collision-free instance name on the
first call and returns the cached result thereafter.  The _instanceNames
Map is keyed by Module.instanceNameKey so repeated synthesis passes over
the same hierarchy always produce stable names.

This method belongs in central_naming because it is pure naming
infrastructure with no dependency on any feature branch.
- Update comment: 'allocateName' → 'instanceNameOf'
- Add 'submodule instance names are stable across repeated definitions'
  test (the canonical 'run synthesis twice, same names' regression test)

Both belong here since they directly exercise Namer.instanceNameOf,
which is now defined in central_naming.
desmonddak and others added 19 commits August 7, 2026 17:24
Moved from Options to Configuration nomenclature.
Dependency on rohd_hierarchy so we can use Occurrence classes
Leverage Namer and eliminate residual naming functionality.
Remove warnings and move to just throw on error.
Exact cumulative tree from original branch 7412bd260ddd235b6005d54ae7dadba372fad0b3 in the netlist-first merge order.
Exact cumulative tree from original branch a6e3a10b7d2693691fe99cac541614f028a9f8fb in the netlist-first merge order.
Rebase Agent and others added 6 commits August 24, 2026 14:35
Exact cumulative tree from original branch 66a3353fc069018312982b94666735add2f81eb6 in the netlist-first merge order.
Exact cumulative tree from original branch 40652d1b2381cb39dff8c754f1ef1a43309615f9 in the netlist-first merge order.
Exact cumulative tree from original branch f61b48ae8deb1d65500df6174faeb47bd5adfceb in the netlist-first merge order.
Exact cumulative tree from original branch 4549040e58a47eb4f1518598537e0baed210a4fc in the netlist-first merge order.
Exact cumulative tree from original branch b110bbc4bf543a7f3d1ca7a705f237489f65732d in the netlist-first merge order.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants