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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user