Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
82e900e
move synthesis naming to a common naming utility so all synthesizers …
desmonddak Apr 17, 2026
85f88ce
dart 3.11 parameter_assignments pickiness
desmonddak Apr 17, 2026
b1de1e5
Merge branch 'main' into central_naming
desmonddak Apr 17, 2026
b7087c4
conflict resolved and dart format . works
desmonddak Apr 17, 2026
4a55214
properly assign naming spaces for instances vs signals
desmonddak Apr 18, 2026
ed7be36
format issue
desmonddak Apr 18, 2026
ab09aed
Controllable enforcement of signal vs instance name uniqueness.
desmonddak Apr 19, 2026
520d280
Refactored to Namer class. No external API changes for ROHD
desmonddak Apr 19, 2026
61d0319
signal registry
desmonddak Apr 20, 2026
becdb36
module context name uniquification instead of signal/instance split
desmonddak May 1, 2026
a86f80c
Merge branch 'main' into central_naming
desmonddak May 3, 2026
d5904a6
cleanup of port vs signal name assumptions, constant merging and sign…
desmonddak May 3, 2026
6dfe0f9
simplified forModule, improved code doc
desmonddak May 12, 2026
3c90e5d
more coverage for Namer
desmonddak May 12, 2026
3e103f9
Add ModuleServices singleton and SvService
desmonddak May 6, 2026
674f518
fix: use tearoff for tearDown (unnecessary_lambdas)
desmonddak May 12, 2026
6d80b8e
Merge branch 'central_naming' into module_services
desmonddak May 21, 2026
99474ca
dart v3.12 analysis
desmonddak May 21, 2026
42fba62
canonical names at last, even in the comments
desmonddak Jun 12, 2026
6a41f8d
pesky override rule surfaced again on tutorials file
desmonddak Jun 12, 2026
139280f
new keyring-based installation for dart in codespaces
desmonddak Jun 12, 2026
62e4a2c
new keyring-based installation for dart in codespaces
desmonddak Jun 12, 2026
caecb02
keyring-style dart installation rather than holding keys
desmonddak Jun 14, 2026
089faf8
new dart analyzer failure with bad override
desmonddak Jun 14, 2026
e015889
Merge branch 'override-bug' into new-dart
desmonddak Jun 14, 2026
1232afb
Potential fix for pull request finding
desmonddak Jun 15, 2026
e558a4d
Orthogonalize: simplify Namer by removing instance name caching
desmonddak Jun 17, 2026
82663d8
Merge updated central_naming with simplified Namer
desmonddak Jun 17, 2026
8ef6820
Fix orthogonalized Namer: remove stale instanceNameOf method
desmonddak Jun 17, 2026
d019f42
Fix orthogonalized Namer: remove stale instanceNameOf method
desmonddak Jun 17, 2026
f75950d
cleanup of SvService
desmonddak Jun 17, 2026
7720b14
cleaner SvService maintaining backward compat
desmonddak Jun 17, 2026
93dfdcd
simplify services with direct options
desmonddak Jun 18, 2026
973300c
Formalize module service inspection contracts
desmonddak Jun 20, 2026
1225df1
Clean DevTools extension analysis and formatting
desmonddak Jun 20, 2026
6284152
Clean DevTools extension analysis
desmonddak Jun 20, 2026
cc64482
Keep DevTools extension changes on owning branches
desmonddak Jun 20, 2026
c8440c4
Keep DevTools extension changes on owning branches
desmonddak Jun 20, 2026
f3e039a
Merge branch 'central_naming' into module_services
desmonddak Jun 20, 2026
02f1426
Restore stable instance name caching
desmonddak Jun 20, 2026
a87fa5c
added back pubkeys, and made a wget a fallback solution with loud war…
desmonddak Jun 21, 2026
7aa1178
trailing comma reduction
desmonddak Jun 22, 2026
d2760eb
Merge branch 'new-dart' into central_naming
desmonddak Jun 22, 2026
f12c3a9
Merge branch 'new-dart' into module_services
desmonddak Jun 22, 2026
f30baf7
Restrict module_services_test to VM platform
desmonddak Jun 22, 2026
b7e46c0
Add instanceNameOf to Namer: cached instance-name lookup
desmonddak Jun 22, 2026
0f13c7b
Move instanceNameOf stability test to central_naming
desmonddak Jun 22, 2026
3677153
Remove duplicate instanceNameOf and stability test: now in central_na…
desmonddak Jun 22, 2026
319706b
Wire pickName through instanceNameOf for stable instance names
desmonddak Jun 22, 2026
11bc2cd
Add instance-signal namespace collision stability tests
desmonddak Jun 22, 2026
3b8a8a8
consistency in naming
desmonddak Jun 22, 2026
887e541
Slim ModuleServices to a type-keyed service registry
desmonddak Jun 23, 2026
5eb94a8
Keep generateSynth as a non-deprecated facade over SvService
desmonddak Jun 23, 2026
249b210
Clean up Namer allocation API
desmonddak Jun 24, 2026
c0f9a08
Clean up Namer allocation API
desmonddak Jun 24, 2026
e35373a
Stabilize naming around collapsible synth objects
desmonddak Jun 24, 2026
ddd96f1
heuristic to mark potentially collapsed nodes for lower priority naming
desmonddak Jun 24, 2026
dd07852
bias collapsible Logics for weak naming
desmonddak Jun 24, 2026
9bf137e
update naming heuristic pickNames comment
desmonddak Jun 24, 2026
efdf60b
pana error on getter
desmonddak Jun 24, 2026
a783956
small change to reduce conflicts
desmonddak Jun 25, 2026
fa05887
small change to reduce conflicts2
desmonddak Jun 25, 2026
5edbfde
small change to reduce conflicts3
desmonddak Jun 25, 2026
afec985
small change to reduce conflicts4
desmonddak Jun 25, 2026
2e933cd
small change to reduce conflicts5
desmonddak Jun 25, 2026
dd41918
Merge branch 'central_naming' into module_services
desmonddak Jun 25, 2026
fc18495
Clean up synth module definition helpers
desmonddak Jun 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ You can also open this repository in a GitHub Codespace to run the example in yo
- Easy **IP integration** and **interfaces**; using an IP is as easy as an import. Reduces tedious, redundant, and error prone aspects of integration
- **Simple and fast build**, free of complex build systems and EDA vendor tools
- Can use the excellent pub.dev **package manager** and all the packages it has to offer
- Built-in event-based **fast simulator** with **4-value** (0, 1, X, and Z) support and a **waveform dumper** to .vcd file format
- Conversion of modules to equivalent, human-readable, structurally similar **SystemVerilog** for integration or downstream tool consumption
- Built-in event-based **fast simulator** with **4-value** (0, 1, X, and Z) support and a **waveform capture service** to .vcd file format
- Conversion of modules to equivalent, human-readable, structurally similar **SystemVerilog** for integration or downstream tool consumption via **SvService**
- **Run-time dynamic** module port definitions (numbers, names, widths, etc.) and internal module logic, including recursive module contents
- Leverage the [ROHD Hardware Component Library (ROHD-HCL)](https://github.com/intel/rohd-hcl) with reusable and configurable design and verification components.
- Simple, free, **open source tool stack** without any headaches from library dependencies, file ordering, elaboration/analysis options, +defines, etc.
Expand Down
2 changes: 1 addition & 1 deletion benchmark/many_submodules_benchmark.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ManySubmodulesBenchmark extends AsyncBenchmarkBase {
Future<void> run() async {
final dut = ManySubmodulesModule(Logic(), numSubModules: 10000);
await dut.build();
dut.generateSynth();
SvService(dut).synthOutput;
}
}

Expand Down
2 changes: 1 addition & 1 deletion benchmark/wave_dump_benchmark.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class WaveDumpBenchmark extends AsyncBenchmarkBase {
_mod = _ModuleToDump(Logic(), _clk);
await _mod.build();

WaveDumper(_mod, outputPath: _vcdTemporaryPath);
WaveformService(_mod, outputPath: _vcdTemporaryPath);

await Simulator.run();

Expand Down
3 changes: 2 additions & 1 deletion doc/tutorials/chapter_2/helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import 'package:rohd/rohd.dart';

Future<void> displaySystemVerilog(Module mod) async {
await mod.build();
print('\nYour System Verilog Equivalent Code: \n ${mod.generateSynth()}');
print('\nYour System Verilog Equivalent Code: \n'
'${SvService(mod).synthOutput}');
}

class LogicInitialization extends Module {
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/chapter_3/answers/exercise_sv.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void main() async {
await fSub.build();

// ignore: avoid_print
print(fSub.generateSynth());
print(SvService(fSub).synthOutput);

test('should return 0 when a and b equal 1', () async {
a.put(1);
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/chapter_3/full_adder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ void main() async {
final mod = FullAdderModule(a, b, cIn, faOps);
await mod.build();

print(mod.generateSynth());
print(SvService(mod).synthOutput);
}
2 changes: 1 addition & 1 deletion doc/tutorials/chapter_4/answers/exercise_1_sv.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void main() async {
final mod = NBitAdder(a, b);
await mod.build();

print(mod.generateSynth());
print(SvService(mod).synthOutput);

test('should return 255 when both inputs are added', () {
a.put(127);
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/chapter_4/answers/exercise_2_sv.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ void main() async {

final mod = NBitSubtractor(a, b);
await mod.build();
print(mod.generateSynth());
print(SvService(mod).synthOutput);

test('should return 5 when a is 25 and b is 20', () {
a.put(25);
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/chapter_4/basic_generation_sv.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void main() async {

await nbitAdder.build();

print(nbitAdder.generateSynth());
print(SvService(nbitAdder).synthOutput);

test('should return 10 when both inputs are 5.', () async {
a.put(5);
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/chapter_5/answers/full_adder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void main() async {
final mod = FullAdder(a: a, b: b, carryIn: cIn);
await mod.build();

print(mod.generateSynth());
print(SvService(mod).synthOutput);

test('should return true if result sum similar to truth table.', () async {
for (var i = 0; i <= 1; i++) {
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/chapter_5/answers/full_subtractor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Future<void> main() async {

await diff.build();

print(diff.generateSynth());
print(SvService(diff).synthOutput);

test('should return true if results matched truth table', () async {
for (var i = 0; i <= 1; i++) {
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/chapter_5/answers/n_bit_subtractor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Future<void> main() async {
final mod = NBitFullSubtractor(a, b);
await mod.build();

print(mod.generateSynth());
print(SvService(mod).synthOutput);

test('should return 1 when a is 8 and b is 7.', () {
a.put(8);
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/chapter_5/n_bit_adder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void main() async {

await nbitAdder.build();

// print(nbitAdder.generateSynth());
// print(SvService(nbitAdder).synthOutput);

test('should return 20 when A and B perform add.', () async {
a.put(15);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import '../../chapter_3/answers/helper.dart';
import '../../chapter_5/answers/full_subtractor.dart';

class FullSubtractorComb extends FullSubtractor {
@override
FullSubtractorComb(super.a, super.b, super.borrowIn) {
// Declare input and output
final a = input('a');
Expand Down
4 changes: 2 additions & 2 deletions doc/tutorials/chapter_7/answers/exercise_1_d_flip_flop.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Future<void> main() async {
final dff = DFlipFlop(data, reset, clk);
await dff.build();

print(dff.generateSynth());
print(SvService(dff).synthOutput);

data.inject(1);
reset.inject(1);
Expand All @@ -60,7 +60,7 @@ Future<void> main() async {

unawaited(Simulator.run());

WaveDumper(dff,
WaveformService(dff,
outputPath: 'doc/tutorials/chapter_7/answers/d_flip_flop.vcd');

printFlop('Before');
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/chapter_7/shift_register.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void main() async {
// kick-off the simulator, but we don't want to wait
unawaited(Simulator.run());

WaveDumper(shiftReg,
WaveformService(shiftReg,
outputPath: 'doc/tutorials/chapter_7/shift_register.vcd');

printFlop('Before');
Expand Down
4 changes: 2 additions & 2 deletions doc/tutorials/chapter_8/answers/exercise_1_spi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void main() async {

await tb.build();

print(tb.generateSynth());
print(SvService(tb).synthOutput);

testInterface.cs.inject(0);
testInterface.sdi.inject(0);
Expand All @@ -163,7 +163,7 @@ void main() async {
Simulator.setMaxSimTime(100);
unawaited(Simulator.run());

WaveDumper(peri, outputPath: 'doc/tutorials/chapter_8/spi-new.vcd');
WaveformService(peri, outputPath: 'doc/tutorials/chapter_8/spi-new.vcd');

await drive(LogicValue.ofString('01010101'));
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ Future<void> main(List<String> args) async {
final toyCap = ToyCapsuleFSM(clk, reset, dispenseBtn, coin);
await toyCap.build();

print(toyCap.generateSynth());
print(SvService(toyCap).synthOutput);

toyCap.toyCapsuleStateMachine.generateDiagram();

reset.inject(1);

WaveDumper(toyCap, outputPath: 'toyCapsuleFSM.vcd');
WaveformService(toyCap, outputPath: 'toyCapsuleFSM.vcd');

Simulator.setMaxSimTime(100);
Simulator.registerAction(25, () {
Expand Down
4 changes: 2 additions & 2 deletions doc/tutorials/chapter_8/answers/exercise_3_pipeline.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ void main(List<String> args) async {
final pipe = Pipeline4Stages(clk, reset, a);
await pipe.build();

// print(pipe.generateSynth());
// print(SvService(pipe).synthOutput);

a.inject(5);
reset.inject(1);

Simulator.registerAction(10, () => reset.put(0));

WaveDumper(pipe, outputPath: 'answer_1.vcd');
WaveformService(pipe, outputPath: 'answer_1.vcd');

Simulator.registerAction(50, () async {
// stage 4 / result: 30 + (30 * 3) = 120
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/chapter_8/carry_save_multiplier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void main() async {
reset.inject(1);

// Attach a waveform dumper so we can see what happens.
WaveDumper(csm, outputPath: 'csm.vcd');
WaveformService(csm, outputPath: 'csm.vcd');

Simulator.registerAction(10, () {
reset.inject(0);
Expand Down
4 changes: 2 additions & 2 deletions doc/tutorials/chapter_8/counter_interface.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ Future<void> main() async {

await counter.build();

print(counter.generateSynth());
print(SvService(counter).synthOutput);

WaveDumper(counter,
WaveformService(counter,
outputPath: 'doc/tutorials/chapter_8/counter_interface.vcd');
Simulator.registerAction(25, () {
intf.en.put(1);
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/chapter_8/oven_fsm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ Future<void> main({bool noPrint = false}) async {

// Attach a waveform dumper so we can see what happens.
if (!noPrint) {
WaveDumper(oven, outputPath: 'doc/tutorials/chapter_8/oven.vcd');
WaveformService(oven, outputPath: 'doc/tutorials/chapter_8/oven.vcd');
}

if (!noPrint) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ Future<void> main({Level loggerLevel = Level.FINER}) async {
await tb.counter.build();

// dump wave here
WaveDumper(tb.counter);
WaveformService(tb.counter);

// Set a maximum simulation time so it doesn't run forever
Simulator.setMaxSimTime(300);
Expand Down
8 changes: 6 additions & 2 deletions doc/tutorials/chapter_9/rohd_vf_example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ environment:

# Add regular dependencies here.
dependencies:
rohd: ^0.4.2
rohd_vf: ^0.4.1
rohd: ^0.6.0
rohd_vf: ^0.6.0
logging: ^1.0.1

dependency_overrides:
rohd:
path: ../../../../

dev_dependencies:
lints: ^2.0.0
test: ^1.21.0
4 changes: 2 additions & 2 deletions example/example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Future<void> main({bool noPrint = false}) async {

// Let's see what this module looks like as SystemVerilog, so we can pass it
// to other tools.
final systemVerilogCode = counter.generateSynth();
final systemVerilogCode = SvService(counter).synthOutput;
if (!noPrint) {
print(systemVerilogCode);
}
Expand All @@ -70,7 +70,7 @@ Future<void> main({bool noPrint = false}) async {

// Attach a waveform dumper so we can see what happens.
if (!noPrint) {
WaveDumper(counter);
WaveformService(counter);
}

// Let's also print a message every time the value on the counter changes,
Expand Down
4 changes: 2 additions & 2 deletions example/fir_filter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Future<void> main({bool noPrint = false}) async {
await firFilter.build();

// Generate SystemVerilog code.
final systemVerilogCode = firFilter.generateSynth();
final systemVerilogCode = SvService(firFilter).synthOutput;
if (!noPrint) {
// Print SystemVerilog code to console.
print(systemVerilogCode);
Expand All @@ -108,7 +108,7 @@ Future<void> main({bool noPrint = false}) async {

// Attach a waveform dumper.
if (!noPrint) {
WaveDumper(firFilter);
WaveformService(firFilter);
}

// Let's set the initial setting.
Expand Down
4 changes: 2 additions & 2 deletions example/logic_array.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ Future<void> main({bool noPrint = false}) async {
// Build the module
await logicArrayExample.build();

final systemVerilogCode = logicArrayExample.generateSynth();
final systemVerilogCode = SvService(logicArrayExample).synthOutput;
if (!noPrint) {
print(systemVerilogCode);
}

// Simulate the module
if (!noPrint) {
WaveDumper(logicArrayExample);
WaveformService(logicArrayExample);
}

// Set the input values
Expand Down
2 changes: 1 addition & 1 deletion example/oven_fsm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ Future<void> main({bool noPrint = false}) async {

// Attach a waveform dumper so we can see what happens.
if (!noPrint) {
WaveDumper(oven, outputPath: 'oven.vcd');
WaveformService(oven, outputPath: 'oven.vcd');
}

// Kick off the simulation.
Expand Down
2 changes: 1 addition & 1 deletion example/tree.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Future<void> main({bool noPrint = false}) async {

// Below will generate an output of the ROHD-generated SystemVerilog:
await tree.build();
final generatedSystemVerilog = tree.generateSynth();
final generatedSystemVerilog = SvService(tree).synthOutput;
if (!noPrint) {
print(generatedSystemVerilog);
}
Expand Down
4 changes: 4 additions & 0 deletions lib/rohd.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright (C) 2021-2023 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause

export 'src/diagnostics/module_service.dart';
export 'src/diagnostics/module_services.dart';
export 'src/diagnostics/waveform_service.dart';
export 'src/exceptions/exceptions.dart';
export 'src/external.dart';
export 'src/finite_state_machine.dart';
Expand All @@ -12,6 +15,7 @@ export 'src/signals/signals.dart';
export 'src/simulator.dart';
export 'src/swizzle.dart';
export 'src/synthesizers/synthesizers.dart';
export 'src/synthesizers/systemverilog/sv_service.dart';
export 'src/utilities/naming.dart';
export 'src/values/values.dart';
export 'src/wave_dumper.dart';
Loading
Loading