mirror of
https://github.com/YosysHQ/yosys
synced 2026-04-29 07:13:43 +00:00
Add opt_balance_tree pass for timing optimization
This pass converts cascaded chains of arithmetic and logic cells ($add, $mul, $and, $or, $xor) into balanced binary trees to improve timing performance in hardware synthesis. The optimization uses a breadth-first search approach to identify chains of compatible cells, then recursively constructs balanced trees that reduce the critical path depth. Features: - Supports arithmetic cells: $add, $mul - Supports logic cells: $and, $or, $xor - Command-line options: -arith (arithmetic only), -logic (logic only) - Preserves signed/unsigned semantics - Comprehensive test suite with 30 test cases Original implementation by Akash Levy <akash@silimate.com> for Silimate. Upstreamed from https://github.com/Silimate/yosys
This commit is contained in:
parent
71feb2a2a1
commit
8b6925c5b0
3 changed files with 1712 additions and 0 deletions
1356
tests/opt/opt_balance_tree.ys
Normal file
1356
tests/opt/opt_balance_tree.ys
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue