1
0
mirror of synced 2026-01-26 04:11:35 +00:00
Files
YosysHQ.yosys/passes
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
..
2025-11-06 23:29:47 +02:00
2025-10-15 09:42:47 +13:00