yosys/tests/silimate
tondapusili 643427d9c9 Add negopt pass with comprehensive pattern matching
This commit introduces the negopt pass with pre/post optimization modes
for handling negation patterns in arithmetic circuits.

Pre-optimization patterns (expose for tree balancing):
- manual2sub: (a + ~b) + 1 → a - b
- sub2neg: a - b → a + (-b)
- negexpand: -(a + b) → (-a) + (-b) [with output width fix]
- negneg: -(-a) → a
- negmux: -(s ? a : b) → s ? (-a) : (-b)

Post-optimization patterns (cleanup/rebuild):
- negrebuild: (-a) + (-b) → -(a + b)
- muxneg: s ? (-a) : (-b) → -(s ? a : b)
- neg2sub: a + (-b) → a - b

All patterns use nusers() for fanout checking (standard Yosys style).
Comprehensive test coverage with positive/negative cases and formal
verification via equiv_opt.
2026-02-03 17:21:21 -08:00
..
breakreduce.ys added reduce XNOR test cases 2025-03-28 10:52:56 -07:00
breaksop.ys Fix Silimate tests 2025-04-04 03:21:53 -07:00
fanoutbuf.ys Update fanoutbuf 2025-10-01 20:59:36 -07:00
manual2sub.ys Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
mux_andnot.ys added ornot tests 2025-03-27 15:23:18 -07:00
mux_ornot.ys code cleanup 2025-03-27 15:27:15 -07:00
muxinvprop.ys Add muxmode pass and tests 2025-03-30 17:54:18 -07:00
muxmode.ys Add muxmode pass and tests 2025-03-30 17:54:18 -07:00
muxneg.ys Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
neg2sub.ys Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
negexpand.ys Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
negmux.ys Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
negneg.ys Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
negrebuild.ys Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
opt_expand.ys forgot to add some things to previous commit 2025-03-27 12:40:41 -07:00
run-test.sh splitlarge: new pass to split wide arithmetic operators 2025-05-15 17:45:08 +03:00
splitfanout.ys More minor cleanup 2025-09-28 07:19:53 -07:00
sub2neg.ys Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
wide_op.tcl splitlarge: new pass to split wide arithmetic operators 2025-05-15 17:45:08 +03:00
wide_op.v misc: review feedback, remove MUL vestiges 2025-05-15 18:01:13 +03:00