Fix the failing regression test: the single-fanout passthrough removal was
shorting out a cone's only real gate (e.g. a lone $_NOT_ driving an output),
replacing it with a bare wire. That drops the gate entirely (nothing left to
characterize) and, for an inverter, silently drops the inversion, making the
carved cell inequivalent to the RTL. Only short a redundant re-driver whose
input is driven by another in-cone cell; keep a passthrough that reads a
primary input (the cell-under-test's boundary gate).
Also address Greptile review comments:
- fix swapped log_warning arguments in the split-boundary-port diagnostic.
- error out (instead of silently overwriting) when two cell groups rename to
the same carved module name (e.g. slow_<enc> and fast_<enc> -> <enc>).
- derive pq_speed from the explicit "fast_" base prefix.
Co-authored-by: Cursor <cursoragent@cursor.com>
Address review feedback on the fixpoint loop:
- Scope the per-sweep cleanup to the module under rewrite via
Pass::call_on_module(..., "clean -purge") instead of running clean over
the whole design selection. This avoids O(N^2) work across modules and
keeps untouched modules' dangling cells until their own sweep, matching
the original single-call behavior.
- Emit a log_warning if a module fails to reach a fixpoint within
max_sweeps, so silent truncation of compaction is visible.
Co-authored-by: Cursor <cursoragent@cursor.com>
- pack_lanes: assert elem_w < 32 and pack the full element width instead
of silently dropping bits >= 31.
- Remove the dead `cell` struct member and its unused assignment in run()
(every emit helper shadows it with its own local `cell`).
- Decorrelate the pseudo-random bc bits from en (independent mix) so they
no longer share an LFSR bit (e.g. en[7]/bc[0] for n=8).
- Add purpose comments to fingerprint_dsel and lane_of_bit.
Declined the std::stoi/std::stoll arg-parsing suggestion: it matches the
established convention in sibling passes (opt_argmax, opt_priority_onehot).
Co-authored-by: Cursor <cursoragent@cursor.com>
The tests/silimate suite (which aborted the Run tests CI job) exposed two
issues in the generalized passes:
- opt_compact_prefix: the forward dense pack regressions at 64 and 128 bits
no longer rewrote. The ConstEval fingerprint was uint64_t-based (capped at
62 bits) and the per-cone cell cap (max_width*96) was below the O(width^2)
cell count of a wide pack. The fingerprint now drives whole-width Const
bit patterns (no width cap) and the cone cap scales quadratically; total
work stays bounded by the shared walk/eval budgets.
- opt_priority_onehot: the "max-width below lane count" negative test set
max_width=8 on a 16-lane design expecting no rewrite, but the generalized
matcher legitimately (and equivalence-provably) rewrites the 8-lane
sub-region. The test now uses max_width=3 (below min_width 4) to verify
the width gate suppresses all matching.
Co-authored-by: Cursor <cursoragent@cursor.com>
- update CMakeLists.txt to load two new files:
- SilimateConfig.cmake: sets Silimate configuration options and defaults
- SilimateVerific.cmake: compiles Verific library, optionally with Silimate modifications
- include silimate tests in test Makefile