mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-15 19:55:41 +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> |
||
|---|---|---|
| .. | ||
| cmds | ||
| equiv | ||
| fsm | ||
| hierarchy | ||
| memory | ||
| opt | ||
| pmgen | ||
| proc | ||
| sat | ||
| silimate | ||
| techmap | ||
| tests | ||
| CMakeLists.txt | ||