mirror of
https://github.com/YosysHQ/yosys
synced 2026-01-17 07:56:26 +00:00
Refine width check to allow Y_WIDTH >= natural width
Change from equality check to >= to allow cells where output is wider than natural width (zero-extended). Only reject cells with Y_WIDTH < natural width (truncated). This fixes test failures while still preventing the truncation issue identified in widlarizer's feedback.
This commit is contained in:
parent
60ac3670cb
commit
305b6c81d7
1 changed files with 3 additions and 2 deletions
|
|
@ -59,8 +59,9 @@ struct OptBalanceTreeWorker {
|
|||
natural_width = std::max(a_width, b_width);
|
||||
}
|
||||
|
||||
// Only allow cells where Y_WIDTH equals the natural width (no truncation)
|
||||
return y_width == natural_width;
|
||||
// Only allow cells where Y_WIDTH >= natural width (no truncation)
|
||||
// This prevents rebalancing chains where truncation semantics matter
|
||||
return y_width >= natural_width;
|
||||
}
|
||||
|
||||
// Create a balanced binary tree from a vector of source signals
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue