mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-16 12:15:52 +00:00
The round-robin (and PE/CLZ/CTZ) fingerprints pin candidate request/ start/select signals as free ConstEval inputs and evaluate the encoder output cone. ConstEval::eval() re-computes and re-set()s the FULL output of every combinational cell it needs. If a pinned bit is a combinational cell output and a sibling output bit of that same cell is pulled into the cone, evaluating the sibling re-sets the pinned bit to the cell's real value, contradicting the free value we pinned and tripping the assertion `current_val[i].wire != NULL || current_val[i] == value[i]` in kernel/consteval.h. The earlier clean_set_signals() guard only rejected constant/aliased bits; it did not ensure the pinned signals form a valid cut. Candidates are gathered purely by width, so an internal combinational wire (e.g. a slice of a wider arithmetic result) can be pinned, which is exactly what crashed on veer_speed1/picorv32/murax/raygentop. Add is_valid_consteval_cut(): a pinned bit is a safe leaf when it is a primary input, sequential-cell output or undriven (absent from bit_to_driver, which holds combinational drivers only); a combinational output is safe only if that cell's entire output lies within the pinned cut. Apply it in both fingerprint() and fingerprint_rr(). Declining an unclean cut only forgoes a possible rewrite, never yields a wrong one, and the intended arbiter inputs (request ports, idx_last flop outputs) remain valid cuts so real round-robin patterns still rewrite. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|---|---|---|
| .. | ||
| opt_clean | ||
| CMakeLists.txt | ||
| cut_region.h | ||
| muxpack.cc | ||
| opt.cc | ||
| opt_addcin.cc | ||
| opt_andor_pmux.cc | ||
| opt_argmax.cc | ||
| opt_balance_tree.cc | ||
| opt_demorgan.cc | ||
| opt_dff.cc | ||
| opt_expr.cc | ||
| opt_ffinv.cc | ||
| opt_first_fit_alloc.cc | ||
| opt_hier.cc | ||
| opt_lut.cc | ||
| opt_lut_ins.cc | ||
| opt_mem.cc | ||
| opt_mem_feedback.cc | ||
| opt_mem_priority.cc | ||
| opt_mem_widen.cc | ||
| opt_merge.cc | ||
| opt_muxtree.cc | ||
| opt_parallel_prefix.cc | ||
| opt_prienc.cc | ||
| opt_priokey.cc | ||
| opt_priority_onehot.cc | ||
| opt_reduce.cc | ||
| opt_share.cc | ||
| peepopt.cc | ||
| peepopt_addsub_c.pmg | ||
| peepopt_formal_clockgateff.pmg | ||
| peepopt_modshr_onehot.pmg | ||
| peepopt_muldiv.pmg | ||
| peepopt_muldiv_c.pmg | ||
| peepopt_muxorder.pmg | ||
| peepopt_shiftadd.pmg | ||
| peepopt_shiftmul_left.pmg | ||
| peepopt_shiftmul_right.pmg | ||
| peepopt_shiftpow2.pmg | ||
| peepopt_sub_neg.pmg | ||
| pmux2shiftx.cc | ||
| rmports.cc | ||
| share.cc | ||
| wreduce.cc | ||