Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 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
15e4ed5
Stack feature/signal-value-format-registry after netlist_pre
Aug 23, 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
3 changes: 3 additions & 0 deletions dart_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tags:
benchmark:
timeout: 2x
118 changes: 118 additions & 0 deletions example/filter_bank.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
// Copyright (C) 2025-2026 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// filter_bank.dart
// A polyphase FIR filter bank design example exercising:
// - Deep hierarchy with shared sub-module definitions
// - Interface (FilterDataInterface)
// - LogicStructure (FilterSample)
// - LogicArray (coefficient storage)
// - Pipeline (pipelined MAC accumulation)
// - FiniteStateMachine (FilterController)
//
// The filter bank has two channels that share an identical MacUnit definition.
// A controller FSM sequences: idle → loading → running → draining → done.
//
// 2026 March 26
// Author: Desmond Kirkpatrick <desmond.a.kirkpatrick@intel.com>

import 'dart:async';

import 'package:rohd/rohd.dart';

// Import module definitions.
import 'filter_bank/filter_bank_modules.dart';

// Re-export so downstream consumers (e.g. devtools loopback) can use.
export 'filter_bank/filter_bank_modules.dart';

// ──────────────────────────────────────────────────────────────────
// Standalone simulation entry point
// ──────────────────────────────────────────────────────────────────

Future<void> main({bool noPrint = false}) async {
const dataWidth = 16;
const numTaps = 3;

// Low-pass-ish coefficients (scaled integers)
const coeffs0 = [1, 2, 1]; // channel 0: symmetric LPF kernel
const coeffs1 = [1, -2, 1]; // channel 1: high-pass kernel

final clk = SimpleClockGenerator(10).clk;
final reset = Logic(name: 'reset');
final start = Logic(name: 'start');
final samples = List.generate(2, (ch) => FilterSample(name: 'sample$ch'));
final inputDone = Logic(name: 'inputDone');

final dut = FilterBank(
clk,
reset,
start,
samples,
inputDone,
numTaps: numTaps,
dataWidth: dataWidth,
coefficients: [coeffs0, coeffs1],
);

// Before we can simulate or generate code, we need to build it.
await dut.build();

// Set a maximum time for the simulation so it doesn't keep running forever.
Simulator.setMaxSimTime(500);

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

// Kick off the simulation.
unawaited(Simulator.run());

// ── Reset ──
reset.inject(1);
start.inject(0);
samples[0].data.inject(0);
samples[0].valid.inject(0);
samples[1].data.inject(0);
samples[1].valid.inject(0);
inputDone.inject(0);

await clk.nextPosedge;
await clk.nextPosedge;
reset.inject(0);

// ── Start filtering ──
await clk.nextPosedge;
start.inject(1);
await clk.nextPosedge;
start.inject(0);
samples[0].valid.inject(1);
samples[1].valid.inject(1);

// ── Feed sample stream: impulse response test ──
// Send a single '1' followed by zeros to get the impulse response
samples[0].data.inject(1);
samples[1].data.inject(1);
await clk.nextPosedge;

for (var i = 0; i < 8; i++) {
samples[0].data.inject(0);
samples[1].data.inject(0);
await clk.nextPosedge;
}

// ── Signal end of input ──
samples[0].valid.inject(0);
samples[1].valid.inject(0);
inputDone.inject(1);
await clk.nextPosedge;
inputDone.inject(0);

// ── Wait for drain ──
for (var i = 0; i < 15; i++) {
await clk.nextPosedge;
}

await Simulator.endSimulation();
}
62 changes: 62 additions & 0 deletions example/filter_bank/coeff_bank.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright (C) 2025-2026 Intel Corporation
// SPDX-License-Identifier: BSD-3-Clause
//
// coeff_bank.dart
// Coefficient storage module for the polyphase FIR filter bank example.
//
// 2025 March 26
// Author: Desmond Kirkpatrick <desmond.a.kirkpatrick@intel.com>

import 'package:meta/meta.dart';
import 'package:rohd/rohd.dart';

/// A coefficient storage module backed by a [LogicArray] input port.
///
/// Accepts a [LogicArray] of per-tap coefficients via [addInputArray]
/// and a tap index, then mux-selects the corresponding coefficient.
class CoeffBank extends Module {
/// The coefficient value at the selected index.
Logic get coeffOut => output('coeffOut');

/// The per-tap coefficient array (registered input port).
@protected
LogicArray get coeffArray => input('coeffArray') as LogicArray;

/// The tap index input.
@protected
Logic get tapIndex => input('tapIndex');

/// Number of taps.
final int numTaps;

/// Data width.
final int dataWidth;

/// Creates a [CoeffBank] with [numTaps] taps at [dataWidth] bits.
///
/// [coefficients] is a [LogicArray] with one element per tap —
/// registered as an input port via [addInputArray].
/// [tapIndex] selects the active coefficient.
CoeffBank(Logic tapIndex, LogicArray coefficients,
{required this.numTaps,
required this.dataWidth,
super.name = 'CoeffBank'})
: super(definitionName: 'CoeffBank_T${numTaps}_W$dataWidth') {
// Register ports
tapIndex = addInput('tapIndex', tapIndex, width: tapIndex.width);
final coeffArray = addInputArray('coeffArray', coefficients,
dimensions: [numTaps], elementWidth: dataWidth);
final coeffOut = addOutput('coeffOut', width: dataWidth);

// Mux-chain ROM: priority-select coefficient by tap index.
Logic selected = Const(0, width: dataWidth);
for (var i = numTaps - 1; i >= 0; i--) {
selected = mux(
tapIndex.eq(Const(i, width: tapIndex.width)).named('tapMatch$i'),
coeffArray.elements[i],
selected,
);
}
coeffOut <= selected;
}
}
Loading
Loading