yosys/passes/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
..
.gitignore More minor cleanup 2025-09-28 07:19:53 -07:00
Makefile.inc Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
activity.cc Cleanup 2025-02-14 08:48:27 -08:00
annotate_cell_fanout.cc Fix annotate_cell_fanout issue by double uniquifying... hopefully should fix the issue? 2025-06-25 22:09:43 -07:00
breakreduce.cc Breakreduce pass (still needs testing) 2025-03-17 04:10:08 -07:00
breaksop.cc Cleanup 2025-02-14 08:48:27 -08:00
bus_rebuild.cc Fix bus_rebuild 2025-11-12 09:46:07 -08:00
fanoutbuf.cc Changed fanoutbuf.cc to include src attributes on buffers connected to input and output wires 2026-01-28 15:33:13 -08:00
l2j_frontend.cc chore: switch out json11 for nlohmann json in read_liberty2json 2025-12-31 12:10:35 +02:00
muxmode.cc Add muxmode pass and tests 2025-03-30 17:54:18 -07:00
muxpacker.cc Add muxpacker draft 2025-04-03 21:38:16 -07:00
negopt.cc Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
obs_clean.cc Help 2025-02-27 11:09:27 -08:00
opt_expand.cc opt_expand peepopt (still needs testing) 2025-03-17 04:12:06 -07:00
peepopt_expand.pmg opt_expand peepopt (still needs testing) 2025-03-17 04:12:06 -07:00
peepopt_manual2sub.pmg Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
peepopt_muxinvprop.pmg Add muxmode pass and tests 2025-03-30 17:54:18 -07:00
peepopt_muxmode.pmg Robustness fixes 2025-03-30 22:23:21 -07:00
peepopt_muxneg.pmg Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
peepopt_neg2sub.pmg Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
peepopt_negexpand.pmg Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
peepopt_negmux.pmg Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
peepopt_negneg.pmg Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
peepopt_negrebuild.pmg Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
peepopt_sub2neg.pmg Add negopt pass with comprehensive pattern matching 2026-02-03 17:21:21 -08:00
reg_rename.cc reduce verbosity 2026-01-28 18:05:21 -08:00
segv.cc Move segv and reenable loops.v test 2025-02-14 10:02:30 -08:00
splitfanout.cc Reduce verbosity of splitfanout 2025-03-09 22:07:30 -07:00
splitlarge.cc misc: review feedback, remove MUL vestiges 2025-05-15 18:01:13 +03:00
splitnetlist.cc One more fix for splitnetlist 2025-11-12 10:46:48 -08:00