3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-01-18 00:08:59 +00:00
yosys/passes/opt
Natalia 60ac3670cb Fix truncation issue in opt_balance_tree pass
Only allow rebalancing of cells with "natural" output widths (no truncation).
This prevents equivalence failures when moving operands between adders
with different intermediate truncation points.

For each operation type, the natural width is:
- Addition: max(A_WIDTH, B_WIDTH) + 1 (for carry bit)
- Multiplication: A_WIDTH + B_WIDTH
- Logic ops: max(A_WIDTH, B_WIDTH)

Fixes widlarizer's counterexample in YosysHQ/yosys#5605 where an 8-bit
intermediate wire was intentionally truncating adder results, and
rebalancing would change where that truncation occurred.
2026-01-14 13:14:56 -08:00
..
.gitignore pmgen: Move passes out of pmgen folder 2025-01-31 15:18:28 +13:00
Makefile.inc Add opt_balance_tree pass for timing optimization 2026-01-13 14:20:11 -08:00
muxpack.cc rtlil: represent Const strings as std::string 2024-10-14 06:28:12 +02:00
opt.cc Make log_header() use variadic templates. 2025-09-09 15:41:03 +02:00
opt_balance_tree.cc Fix truncation issue in opt_balance_tree pass 2026-01-14 13:14:56 -08:00
opt_clean.cc Avoid calling IdString::c_str() in opt_clean 2025-11-12 11:52:04 +01:00
opt_demorgan.cc opt_demorgan: skip zero width cells 2024-09-24 14:24:59 +01:00
opt_dff.cc Instead of using builtin_ff_cell_types() directly, go through a method Cell::is_builtin_ff() 2025-09-17 03:24:19 +00:00
opt_expr.cc Remove cover() coverage tracking 2025-12-04 16:27:13 +01:00
opt_ffinv.cc Instead of using builtin_ff_cell_types() directly, go through a method Cell::is_builtin_ff() 2025-09-17 03:24:19 +00:00
opt_hier.cc opt_hier: Adjust messages 2025-09-29 12:27:27 +02:00
opt_lut.cc Remove .c_str() from parameters to log_debug() 2025-09-23 19:10:33 +12:00
opt_lut_ins.cc Remove .c_str() from log_cmd_error() and log_file_error() parameters 2025-09-16 22:59:08 +00:00
opt_mem.cc Update passes/opt to avoid bits() 2025-09-16 03:17:23 +00:00
opt_mem_feedback.cc kernel/mem: Introduce transparency masks. 2021-08-11 00:04:16 +02:00
opt_mem_priority.cc opt_mem_priority: Fix non-ascii char in help message. 2021-12-09 00:56:14 +01:00
opt_mem_widen.cc Add opt_mem_widen pass. 2021-08-14 01:06:23 +02:00
opt_merge.cc Parallelize opt_merge. 2026-01-08 04:21:39 +00:00
opt_muxtree.cc Use digit separators for large decimal integers 2026-01-13 16:38:12 +01:00
opt_reduce.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
opt_share.cc opt_share: Fix input confusion with ANDNOT, ORNOT gates 2023-07-20 20:58:52 +01:00
peepopt.cc Add muldiv_c peepopt pass 2025-04-30 08:06:59 -07:00
peepopt_formal_clockgateff.pmg pmgen: Move passes out of pmgen folder 2025-01-31 15:18:28 +13:00
peepopt_muldiv.pmg pmgen: Move passes out of pmgen folder 2025-01-31 15:18:28 +13:00
peepopt_muldiv_c.pmg Add muldiv_c peepopt pass 2025-04-30 08:06:59 -07:00
peepopt_shiftadd.pmg pmgen: Move passes out of pmgen folder 2025-01-31 15:18:28 +13:00
peepopt_shiftmul_left.pmg pmgen: Move passes out of pmgen folder 2025-01-31 15:18:28 +13:00
peepopt_shiftmul_right.pmg pmgen: Move passes out of pmgen folder 2025-01-31 15:18:28 +13:00
pmux2shiftx.cc Update passes/opt to avoid bits() 2025-09-16 03:17:23 +00:00
rmports.cc Remove .c_str() calls from log()/log_error() 2025-09-11 20:59:37 +00:00
share.cc Update passes/opt to avoid bits() 2025-09-16 03:17:23 +00:00
wreduce.cc Update passes/opt to avoid bits() 2025-09-16 03:17:23 +00:00