3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-01-18 00:08:59 +00:00
yosys/tests/opt
Natalia d25171806b wreduce: queue traversal and add regression test
Implement iterative queue-based traversal in wreduce pass to propagate
width reductions across dependent cells and wires. Previously, wreduce
would process all cells once, then all wires once. This meant that
reductions couldn't propagate through chains of operations.

The new algorithm maintains work queues for both cells and wires,
processing them iteratively until no more reductions are possible.
When a cell or wire is reduced, dependent cells and wires are added
back to the queues for reprocessing.

Add regression test to verify that width reductions propagate through
a chain of operations: (a + b)[3:0] + c, ensuring the first addition
is reduced from 9 bits to 4 bits.
2026-01-14 00:32:41 -08:00
..
alumacc.ys alumacc: add signed-independent comparison tests 2023-10-09 00:36:22 +08:00
bug1525.ys opt_share: Fix handling of fine cells. 2019-11-27 08:01:07 +01:00
bug1758.ys tests: add opt_expr tests 2020-04-23 15:58:36 -07:00
bug1854.ys Add new helper class for merging FFs into cells, use for memory_dff. 2021-05-23 14:46:59 +02:00
bug2010.ys Add testcase for #2010 2020-05-01 14:07:33 -07:00
bug2221.ys opt_expr: Fix crash on $mul optimization with more zeros removed than Y has. 2020-07-05 06:31:58 +02:00
bug2311.ys opt_expr: Fix handling of $_XNOR_ cells with A = B. 2020-07-29 12:41:43 +02:00
bug2318.ys peepopt.muldiv: Add a signedness check. 2020-08-04 16:30:24 +02:00
bug2623.ys rtlil: Disallow 0-width chunks in SigSpec. 2021-03-15 17:16:24 +01:00
bug2765.ys proc_memwr: Use the v2 memwr cell. 2021-08-11 13:34:10 +02:00
bug2766.ys opt_mem_feedback: Rewrite feedback path finding logic. 2021-05-24 23:20:30 +02:00
bug2824.ys Add regression test for #2824. 2021-06-11 12:06:35 +01:00
bug2920.ys Remove references to ilang 2024-11-05 12:36:31 +13:00
bug3047.ys extract_reduce: Refactor and fix input signal construction. 2021-10-21 04:10:01 +02:00
bug3117.ys memory_share: Fix SAT-based sharing for wide ports. 2021-12-20 18:40:14 +01:00
bug3848.ys opt_share: Fix input confusion with ANDNOT, ORNOT gates 2023-07-20 20:58:52 +01:00
bug3867.ys opt_expr: Fix 'signed X>=0' replacement for wide output ports 2023-08-01 13:50:12 +01:00
bug4413.ys peepopt: avoid shift-amount underflow 2024-06-13 23:30:07 +02:00
bug4610.ys tests: replace read_ilang with read_rtlil 2024-11-20 14:54:23 +01:00
bug5164.ys tests: add test for #5164 opt_dff -sat UAF 2025-06-06 23:46:23 +01:00
bug5398.ys opt_hier: Fix two optimizations conflicting 2025-09-29 12:27:27 +02:00
memory_bmux2rom.ys Remove references to ilang 2024-11-05 12:36:31 +13:00
memory_dff_trans.ys memory_share: Add -nosat and -nowiden options. 2021-08-14 00:09:04 +02:00
memory_map_offset.ys memory_map: Improve start_offset handling. 2021-05-31 17:45:21 +02:00
opt_clean_init.ys opt_clean: Remove init attribute bits together with removed DFFs. 2021-03-15 17:16:53 +01:00
opt_clean_mem.ys proc_memwr: Use the v2 memwr cell. 2021-08-11 13:34:10 +02:00
opt_dff-simplify.il opt_dff: add test 2025-08-14 00:13:23 +03:00
opt_dff-simplify.ys opt_dff: more explicit testing, typo 2025-08-27 11:29:57 +02:00
opt_dff_arst.ys Add opt_dff pass. 2020-07-30 18:27:04 +02:00
opt_dff_clk.ys Add opt_dff pass. 2020-07-30 18:27:04 +02:00
opt_dff_const.ys Add opt_dff pass. 2020-07-30 18:27:04 +02:00
opt_dff_dffmux.ys peepopt: Remove now-redundant dffmux pattern. 2020-08-07 13:21:34 +02:00
opt_dff_en.ys Fix tests for check in equiv_opt 2022-10-07 16:04:51 +02:00
opt_dff_mux.ys Fix tests for check in equiv_opt 2022-10-07 16:04:51 +02:00
opt_dff_qd.ys tests: Remove part of test involving combinational loops 2024-03-11 10:45:36 +01:00
opt_dff_sr.ys Re-enable opt_dff_sr equiv_opt checks 2022-10-07 16:04:51 +02:00
opt_dff_srst.ys Add opt_dff pass. 2020-07-30 18:27:04 +02:00
opt_expr.ys opt_expr: Optimize multiplications with low 0 bits in operands. 2020-04-13 16:52:22 +02:00
opt_expr_alu.ys test: update opt_expr_alu test 2020-05-08 11:12:58 -07:00
opt_expr_and.ys tests: add opt_expr tests 2020-04-23 15:58:36 -07:00
opt_expr_cmp.v opt_expr: improve simplification of comparisons with large constants. 2019-01-02 15:45:28 +00:00
opt_expr_cmp.ys opt_expr: simplify any unsigned comparisons with all-0 and all-1. 2019-01-02 02:45:49 +00:00
opt_expr_combined_assign.ys opt_expr: avoid multiple drivers issue #4792 in combined assign tests 2025-12-19 18:32:56 +01:00
opt_expr_constconn.v opt_expr: Propagate constants to port connections. 2021-07-27 20:44:26 +02:00
opt_expr_constconn.ys opt_expr: Propagate constants to port connections. 2021-07-27 20:44:26 +02:00
opt_expr_consumex.ys tests: opt_expr tests that depend on consumex 2020-05-08 11:07:11 -07:00
opt_expr_more.ys opt_expr: expand test coverage 2025-03-31 19:31:53 +02:00
opt_expr_mux_undef.ys opt_expr: Fix #4590 2025-04-04 12:25:31 +13:00
opt_expr_or.ys tests: add opt_expr tests 2020-04-23 15:58:36 -07:00
opt_expr_shift.ys tests: test opt_expr for 32 bit unsigned shifts 2025-05-26 15:28:44 +01:00
opt_expr_shr_int_max.ys Add test for shifting by INT_MAX 2025-02-14 14:01:27 +13:00
opt_expr_xnor.ys simplemap: Map $xnor to $_XNOR_ cells 2022-11-29 19:06:45 +01:00
opt_expr_xor.ys simplemap: Map $xnor to $_XNOR_ cells 2022-11-29 19:06:45 +01:00
opt_hier.tcl Start opt_hier 2025-07-05 16:45:52 +02:00
opt_hier_simple1.v Start opt_hier 2025-07-05 16:45:52 +02:00
opt_hier_simple2.v Start opt_hier 2025-07-05 16:45:52 +02:00
opt_hier_test1.v Start opt_hier 2025-07-05 16:45:52 +02:00
opt_lut.v opt_lut: new pass, to combine LUTs for tighter packing. 2018-12-05 16:30:37 +00:00
opt_lut.ys Revert "Merge pull request #1280 from YosysHQ/revert-1266-eddie/ice40_full_adder" 2019-08-12 12:06:45 -07:00
opt_lut_elim.il opt_lut: eliminate LUTs evaluating to constants or inputs. 2018-12-31 23:55:40 +00:00
opt_lut_elim.ys Remove references to ilang 2024-11-05 12:36:31 +13:00
opt_lut_ins.ys Remove references to ilang 2024-11-05 12:36:31 +13:00
opt_lut_port.il opt_lut: leave intact LUTs with cascade feeding module outputs. 2018-12-07 17:13:52 +00:00
opt_lut_port.ys Remove references to ilang 2024-11-05 12:36:31 +13:00
opt_mem_feedback.ys Add v2 memory cells. 2021-08-11 13:34:10 +02:00
opt_mem_priority.ys memory_share: Add -nosat and -nowiden options. 2021-08-14 00:09:04 +02:00
opt_merge_basic.ys opt_merge: test more kinds of cells 2025-03-10 13:14:06 +01:00
opt_merge_init.ys opt_merge: Add -keepdc option required for formal verification 2022-04-01 21:03:20 +02:00
opt_merge_keep.ys opt_merge: speedup 2020-03-16 12:43:54 -07:00
opt_merge_properties.ys avoid merging formal properties 2025-12-17 20:25:24 +01:00
opt_pow.ys opt_expr: add test 2025-04-01 21:54:46 +03:00
opt_reduce_andor.ys opt_reduce: add test for constant $reduce_and/or not being zero width 2024-09-25 16:28:41 +01:00
opt_reduce_bmux.ys Remove references to ilang 2024-11-05 12:36:31 +13:00
opt_reduce_demux.ys Remove references to ilang 2024-11-05 12:36:31 +13:00
opt_rmdff.v Fix tests/opt/opt_rmdff 2020-06-09 22:48:26 +02:00
opt_rmdff.ys Add opt_dff pass. 2020-07-30 18:27:04 +02:00
opt_rmdff_sat.v Revert "Merge pull request #1280 from YosysHQ/revert-1266-eddie/ice40_full_adder" 2019-08-12 12:06:45 -07:00
opt_rmdff_sat.ys Add opt_dff pass. 2020-07-30 18:27:04 +02:00
opt_share_add_sub.v Tabs to spaces in opt_share examples 2019-08-03 12:35:46 +02:00
opt_share_add_sub.ys Reimplement opt_share to work on $alu and $pmux 2019-07-28 16:03:54 +02:00
opt_share_bug2334.ys opt_share: Refactor, fix some bugs. 2020-08-17 17:26:36 +02:00
opt_share_bug2335.ys opt_share: Refactor, fix some bugs. 2020-08-17 17:26:36 +02:00
opt_share_bug2336.ys opt_share: Refactor, fix some bugs. 2020-08-17 17:26:36 +02:00
opt_share_bug2538.ys opt_share: Fix X and CO signal width for shifted $alu in opt_share. 2021-01-14 14:54:08 +01:00
opt_share_cat.v Tabs to spaces in opt_share examples 2019-08-03 12:35:46 +02:00
opt_share_cat.ys Reimplement opt_share to work on $alu and $pmux 2019-07-28 16:03:54 +02:00
opt_share_cat_multiuser.v Tabs to spaces in opt_share examples 2019-08-03 12:35:46 +02:00
opt_share_cat_multiuser.ys Reimplement opt_share to work on $alu and $pmux 2019-07-28 16:03:54 +02:00
opt_share_diff_port_widths.v Tabs to spaces in opt_share examples 2019-08-03 12:35:46 +02:00
opt_share_diff_port_widths.ys Reimplement opt_share to work on $alu and $pmux 2019-07-28 16:03:54 +02:00
opt_share_extend.v Tabs to spaces in opt_share examples 2019-08-03 12:35:46 +02:00
opt_share_extend.ys Reimplement opt_share to work on $alu and $pmux 2019-07-28 16:03:54 +02:00
opt_share_large_pmux_cat.v Tabs to spaces in opt_share examples 2019-08-03 12:35:46 +02:00
opt_share_large_pmux_cat.ys Reimplement opt_share to work on $alu and $pmux 2019-07-28 16:03:54 +02:00
opt_share_large_pmux_cat_multipart.v Tabs to spaces in opt_share examples 2019-08-03 12:35:46 +02:00
opt_share_large_pmux_cat_multipart.ys Fix wrong results when opt_share called before opt_clean 2019-08-07 09:30:58 +02:00
opt_share_large_pmux_multipart.v Tabs to spaces in opt_share examples 2019-08-03 12:35:46 +02:00
opt_share_large_pmux_multipart.ys Reimplement opt_share to work on $alu and $pmux 2019-07-28 16:03:54 +02:00
opt_share_large_pmux_part.v Tabs to spaces in opt_share examples 2019-08-03 12:35:46 +02:00
opt_share_large_pmux_part.ys Reimplement opt_share to work on $alu and $pmux 2019-07-28 16:03:54 +02:00
opt_share_mux_tree.v Tabs to spaces in opt_share examples 2019-08-03 12:35:46 +02:00
opt_share_mux_tree.ys Reimplement opt_share to work on $alu and $pmux 2019-07-28 16:03:54 +02:00
run-test.sh Start opt_hier 2025-07-05 16:45:52 +02:00
wreduce_traversal.ys wreduce: queue traversal and add regression test 2026-01-14 00:32:41 -08:00