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
This commit reimplements the (no longer recommended) setuptools based
build system using a standards-based in-tree PEP517 build backend.
The implementation is partially based on
https://codeberg.org/ziglang/zig-pypi/src/branch/main/make_wheels.py
which is licensed under BSD-0-clause.
It also adds a new option `YOSYS_BUILD_PYTHON_ONLY` that is available
only if the binary or the library aren't going to be installed, which
turns off these targets entirely, as well as some dependent ones
(e.g. tests).
Co-authored-by: Mohamed Gaber <me@donn.website>
Rewrite power-of-two indexed word selects to $bmux when the shift
amount already carries the scale as low zero bits.
Keep the rule to non-overlapping selections and bound the generated
mux ways. Add regressions for aligned shifts, padding, signed
extension, and shiftmul handoff cases.
Comes with a set of tests which (currently) pass with `read_verilog` but fail with `verific` based on #5878.
Add `--check-sv`, an alternative to `--prove-sv` with generator defined yosys commands. Helpful for when you want to run the same set of commands on a bunch of sv files.