Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 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
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
8ef6820
Fix orthogonalized Namer: remove stale instanceNameOf method
desmonddak Jun 17, 2026
1225df1
Clean DevTools extension analysis and formatting
desmonddak Jun 20, 2026
c8440c4
Keep DevTools extension changes on owning branches
desmonddak Jun 20, 2026
a87fa5c
added back pubkeys, and made a wget a fallback solution with loud war…
desmonddak Jun 21, 2026
d2760eb
Merge branch 'new-dart' into central_naming
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
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
249b210
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
1f5ef48
cleaned up redundant code
desmonddak Jun 25, 2026
ecec474
stick with Set<SynthNet> ordering
desmonddak Jun 25, 2026
d27c867
fix: restore _BusSubsetForStructSlice._destination for stable instanc…
desmonddak Jun 27, 2026
da6c140
test: struct-slice instance names stable across repeated synth passes
desmonddak Jun 27, 2026
5130601
chore: remove stale moduleOrder signal tests from naming_consistency_…
desmonddak Jun 27, 2026
7fc952d
feat(Namer): expose public signalNameOf for wave-dumper and tests
desmonddak Jun 27, 2026
526e05c
Add Namer.sourceLogicOf reverse name-source map
desmonddak Jun 29, 2026
ea3c759
cleanup copyright / signalNameOf export
desmonddak Jul 1, 2026
32055a9
copyright and make method private
desmonddak Jul 1, 2026
666d211
remove _nameSources backward map, relocate to FLC production
desmonddak Jul 1, 2026
f8979b2
Split netlist compute layer
desmonddak Jul 2, 2026
e6fc88a
formatted
desmonddak Jul 2, 2026
a9b7ada
Merge branch 'main' into netlist_pre
desmonddak Jul 6, 2026
f73526d
Refactor netlist synthesis helpers
desmonddak Jul 10, 2026
179fea0
Fix netlist top marker selection
desmonddak Jul 10, 2026
9199a40
cleanup formatting tail commas
desmonddak Jul 10, 2026
0baf624
filter bank cleanup
desmonddak Jul 10, 2026
8c48a81
Move filter bank example modules out of lib
desmonddak Jul 10, 2026
1c7cd05
major bug fixes for LogicArray and LogicStruct
desmonddak Jul 15, 2026
cbda4eb
conflict resolved, sv_gen test fix
desmonddak Jul 17, 2026
57fc237
inout fix
desmonddak Jul 17, 2026
5a8a25f
attempt with better VS links
desmonddak Jul 17, 2026
8ac1936
bump copyright
desmonddak Jul 17, 2026
2001f47
major cleanup from PR comments -- complete at this point
desmonddak Jul 24, 2026
d43f406
much better testing of netlist passes
desmonddak Jul 30, 2026
ded32ed
Merge branch 'main' into netlist_pre
desmonddak Jul 30, 2026
5f7999a
false positive on validation fixed
desmonddak Aug 4, 2026
1cb81d9
handle inouts properly
desmonddak Aug 8, 2026
cbc2b2a
Merge remote-tracking branch 'origin/main' into netlist_pre
desmonddak Aug 18, 2026
9f0081b
Hid generateNetlist until we have services available.
desmonddak Aug 19, 2026
3721610
point to local rohd_hierarchy package, not pub
desmonddak Aug 19, 2026
39c6a84
use publish_to: none for local package
desmonddak Aug 19, 2026
0fc4cc9
Merge remote-tracking branch 'origin/main' into netlist_pre
desmonddak Aug 19, 2026
5045b93
Merge remote-tracking branch 'upstream/main' into netlist_pre
desmonddak Aug 19, 2026
043837d
compressBitRanges is an optimization test feature
desmonddak Aug 20, 2026
8a1a1ed
fixes for full gate library, synth cell naming
desmonddak Aug 20, 2026
2a2f614
fix authorship
desmonddak Aug 20, 2026
a195eac
gate catalog can be vm only
desmonddak Aug 21, 2026
d4e23ef
feedback fixes and prepare for merge
desmonddak Aug 24, 2026
cf62d8a
exhaustive gate fixture changed.
desmonddak Aug 24, 2026
c6e7860
performance optimizations as well as review changes related to leaf c…
desmonddak Aug 24, 2026
437623e
create a structured management system for synthesized cells
desmonddak Aug 24, 2026
080019b
do not store gate catalog
desmonddak Aug 24, 2026
b482344
preserve Logic with reserved and renameable, but allow mergeable to b…
desmonddak Aug 25, 2026
6ce5fdd
Stack feature/signal-value-format-registry after netlist_pre
Aug 23, 2026
aee9e9c
Stack module_services_api after feature/logic-array-of
Aug 23, 2026
6497009
format issue
desmonddak Aug 24, 2026
df9aae1
clean up service model
desmonddak Aug 24, 2026
60eddfa
Snapshot cleaned netlist files without branch history
desmonddak Aug 24, 2026
de4e6eb
link fragment fix
desmonddak Aug 24, 2026
8de743f
format changed
desmonddak Aug 24, 2026
4a0bb02
Merge main into module_services_api
desmonddak Aug 25, 2026
44fc0ed
Preserve legacy synthesis behavior
desmonddak Aug 25, 2026
ab7b398
Remove unrelated branch churn
desmonddak Aug 25, 2026
5885e68
Add shared signal value format registry
desmonddak Aug 25, 2026
fcb68e6
merge value format registry branch
desmonddak Aug 25, 2026
a61c6a0
align dumpSystemVerilog/dumpWaves with generateSynth/WaveDumper APIs
desmonddak Aug 26, 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
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## Next Release

- Added the `ModuleService` API for module-scoped generation, capture, and
inspection services. `ModuleServices` registers and looks up services for a
built module hierarchy, and `hierarchyJson` exposes its hierarchy as JSON.
- Added `ArtifactProducingService` and `ModuleServiceArtifact` for
transport-neutral output. Artifact-producing services default
`outputDirectory` to the current directory and `outputBaseName` to the
module definition name, and expose named, media-typed byte streams without
requiring filesystem output.
- Added `SystemVerilogService` for configured SystemVerilog synthesis,
in-memory source output, artifact inspection, and explicit directory writes.
Added `WaveformService` for in-memory waveform capture with optional file
writing through `writeToFile`.
- Added legacy-compatible `Module.dumpSystemVerilog` and `Module.dumpWaves`
convenience methods. `dumpSystemVerilog()` returns simple in-memory output;
`dumpWaves()` provides standard VCD capture as the replacement for
`WaveDumper`. `WaveDumper` and `generateSynth` are deprecated in favor of
these `Module` methods.

## 0.6.10

- Improved `Logic.replicate(1)` and same-width `signExtend` to return the original signal, eliminating redundant replication modules and generated SystemVerilog (<https://github.com/intel/rohd/pull/689>).
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Anyone interested in participating in ROHD is more than welcome to help!

## Code of Conduct

ROHD adopts the [Contributor Covenant](https://www.contributor-covenant.org/) v2.1 for the code of conduct. It can be accessed [here](CODE_OF_CONDUCT.md).
ROHD adopts the [Contributor Covenant](https://www.contributor-covenant.org/) v2.1 for the [Code of Conduct](CODE_OF_CONDUCT.md).

## Getting Help

Expand Down Expand Up @@ -124,7 +124,7 @@ Please include the SPDX tag near the top of any new files you create:
Here is an example of a recommended file header template:

```dart
// Copyright (C) 2021-2023 Intel Corporation
// Copyright (C) 2021-2026 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// example.dart
Expand Down
4 changes: 2 additions & 2 deletions benchmark/many_submodules_benchmark.dart
Comment thread
desmonddak marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2024 Intel Corporation
// Copyright (C) 2024-2026 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// many_submodules_benchmark.dart
Expand Down 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();
dut.dumpSystemVerilog();
}
}

Expand Down
4 changes: 2 additions & 2 deletions benchmark/wave_dump_benchmark.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2023 Intel Corporation
// Copyright (C) 2023-2026 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// wave_dump_benchmark.dart
Expand Down Expand Up @@ -56,7 +56,7 @@ class WaveDumpBenchmark extends AsyncBenchmarkBase {
_mod = _ModuleToDump(Logic(), _clk);
await _mod.build();

WaveDumper(_mod, outputPath: _vcdTemporaryPath);
_mod.dumpWaves(outputPath: _vcdTemporaryPath);

await Simulator.run();

Expand Down
4 changes: 2 additions & 2 deletions doc/tutorials/chapter_1/01_setup_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,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 = counter.dumpSystemVerilog().output;
if (!noPrint) {
print(systemVerilogCode);
}
Expand All @@ -175,7 +175,7 @@ Future<void> main({bool noPrint = false}) async {
// Attach a waveform dumper so we can see what happens.
if (!noPrint) {
WaveDumper(counter);
counter.dumpWaves();
}
// Drop reset at time 25.
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 '
'${mod.dumpSystemVerilog()}');
}

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 - tutorial
print(fSub.generateSynth());
print(fSub.dumpSystemVerilog());

test('should return 0 when a and b equal 1', () {
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 @@ -76,5 +76,5 @@ void main() async {
final mod = FullAdderModule(a, b, cIn, faOps);
await mod.build();

print(mod.generateSynth());
print(mod.dumpSystemVerilog());
}
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(mod.dumpSystemVerilog());

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(mod.dumpSystemVerilog());

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(nbitAdder.dumpSystemVerilog());

test('should return 10 when both inputs are 5.', () {
a.put(5);
Expand Down
7 changes: 4 additions & 3 deletions doc/tutorials/chapter_5/00_basic_modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Do note that the `build()` method returns a `Future<void>`, not just `void`. Thi

## Converting ROHD Module to System Verilog RTL

Next, we can see how extending your `Logic` to `Module` enables the generation of system Verilog code. Building on the previous example, we've made some slight modifications by adding `simModule.build()` and `simModule.generateSynth()`.
Next, we can see how extending your `Logic` to `Module` enables the generation of system Verilog code. Building on the previous example, we've made some slight modifications by adding `simModule.build()` and `simModule.dumpSystemVerilog().output`.

```dart
void main() async {
Expand All @@ -106,15 +106,16 @@ void main() async {
await simModule.build();

// Print out system verilog code
print(simModule.generateSynth());
print(simModule.dumpSystemVerilog().output);

test('should return input value.',
() => expect(simModule.out.value.toInt(), equals(1)));

// Add this to test on generate system verilog code
test(
'should generate system verilog code.',
() => expect(simModule.generateSynth(), contains('module SimpleModule(')));
() => expect(simModule.dumpSystemVerilog().output,
contains('module SimpleModule(')));
}
```

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(mod.dumpSystemVerilog());

test('should return true if result sum similar to truth table.', () {
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(diff.dumpSystemVerilog());

test('should return true if results matched truth table', () {
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(mod.dumpSystemVerilog());

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(nbitAdder.dumpSystemVerilog());

test('should return 20 when A and B perform add.', () {
a.put(15);
Expand Down
16 changes: 8 additions & 8 deletions doc/tutorials/chapter_7/00_sequential_logic.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- [Shift Register](#shift-register)
- [ROHD Simulator](#rohd-simulator)
- [Unit Test in Sequential Logic](#unit-test-in-sequential-logic)
- [Wave Dumper](#wave-dumper)
- [Waveform Dumping](#waveform-dumping)
- [Exercise](#exercise)

## Learning Outcome
Expand Down Expand Up @@ -44,7 +44,7 @@ class ShiftRegister extends Module {
void main() async {
final shiftReg = ShiftRegister();
await shiftReg.build();
print(shiftReg.generateSynth());
print(shiftReg.dumpSystemVerilog().output);
}
```

Expand Down Expand Up @@ -196,7 +196,7 @@ void main() async {

final shiftReg = ShiftRegister(clk, reset, sin);
await shiftReg.build();
print(shiftReg.generateSynth());
print(shiftReg.dumpSystemVerilog().output);

// Inject 1 to reset and 0 to shift in
reset.inject(1);
Expand All @@ -217,9 +217,9 @@ void main() async {
}
```

## Wave Dumper
## Waveform Dumping

Let also add `WaveDumper` to view the waveform of the Simulation results.
Let also call `dumpWaves` to view the waveform of the Simulation results.

```dart
void main() async {
Expand All @@ -242,8 +242,8 @@ void main() async {
// Run the simulator but don't wait for it
unawaited(Simulator.run());

// Output the simulation waveform using WaveDumper
WaveDumper(shiftReg,
// Output the simulation waveform
shiftReg.dumpWaves(
outputPath: 'doc/tutorials/chapter_7/shift_register.vcd');
}
```
Expand All @@ -252,7 +252,7 @@ Now, let print the flop before the first clock Positive edge. We can just call t

```dart
...
WaveDumper(shiftReg,
shiftReg.dumpWaves(
outputPath: 'doc/tutorials/chapter_7/shift_register.vcd');
printFlop('Before');
```
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(dff.dumpSystemVerilog());

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

unawaited(Simulator.run());

WaveDumper(dff,
dff.dumpWaves(
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() {
// kick-off the simulator, but we don't want to wait
unawaited(Simulator.run());

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

printFlop('Before');
Expand Down
4 changes: 2 additions & 2 deletions doc/tutorials/chapter_8/01_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ Future<void> main() async {
counterInterface.en.inject(0);
counterInterface.reset.inject(1);
print(counter.generateSynth());
print(counter.dumpSystemVerilog().output);
WaveDumper(counter,
counter.dumpWaves(
outputPath: 'doc/tutorials/chapter_8/counter_interface.vcd');
Simulator.registerAction(25, () {
counterInterface.en.put(1);
Expand Down
4 changes: 2 additions & 2 deletions doc/tutorials/chapter_8/02_finite_state_machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,11 @@ await oven.build();
reset.inject(1);
```

Let also attach a `WaveDumper` to preview what is the waveform and what happened during the Simulation.
Let also call `dumpWaves` to preview the waveform and what happened during the Simulation.

```dart
if (!noPrint) {
WaveDumper(oven, outputPath: 'oven.vcd');
oven.dumpWaves(outputPath: 'oven.vcd');
Comment thread
desmonddak marked this conversation as resolved.
}
```

Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/chapter_8/03_pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ void main() async {
reset.inject(1);
// Attach a waveform dumper so we can see what happens.
WaveDumper(csm, outputPath: 'csm.vcd');
csm.dumpWaves(outputPath: 'csm.vcd');
Simulator.registerAction(10, () {
reset.inject(0);
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(tb.dumpSystemVerilog());

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');
peri.dumpWaves(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(toyCap.dumpSystemVerilog());

toyCap.toyCapsuleStateMachine.generateDiagram();

reset.inject(1);

WaveDumper(toyCap, outputPath: 'toyCapsuleFSM.vcd');
toyCap.dumpWaves(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) {
final pipe = Pipeline4Stages(clk, reset, a);
await pipe.build();

// print(pipe.generateSynth());
// print(pipe.dumpSystemVerilog());

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

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

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

Simulator.registerAction(50, () {
// 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');
csm.dumpWaves(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(counter.dumpSystemVerilog());

WaveDumper(counter,
counter.dumpWaves(
outputPath: 'doc/tutorials/chapter_8/counter_interface.vcd');
Simulator.registerAction(25, () {
intf.en.put(1);
Expand Down
Loading
Loading