router2: skip RESERVED_UNAVAILABLE wires when reserving sink paths

setup_wires() marks wires bound above STRENGTH_PLACER (e.g. ECP5 global
clocks pre-routed at STRENGTH_LOCKED) with the RESERVED_UNAVAILABLE (-2)
sentinel. reserve_driver_wires_for_arc() already stops at that sentinel
(6b58ca1376), but reserve_sink_wires_for_arc() did not: it read -2 as a
reservation by another net, took the log_error branch, and
nets_by_udata.at(-2) threw std::out_of_range, aborting router2.

Mirror the driver-side guard on the sink walk.

Fixes #1823

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Robb Walters
2026-10-05 09:39:31 +02:00
committed by myrtle
co-authored by Claude Opus 5.5
parent e2fe86b3ce
commit 6f71bc280b
+2
View File
@@ -660,6 +660,8 @@ struct Router2
auto &wd = wire_data(cursor);
if (ctx->debug)
log(" %s (sink input)\n", ctx->nameOfWire(cursor));
if (wd.reserved_net == PerWireData::RESERVED_UNAVAILABLE)
break;
did_something |= (wd.reserved_net != net->udata);
if (wd.reserved_net != -1 && wd.reserved_net != net->udata)
log_error("attempting to reserve sink input path wire '%s' for nets '%s' and '%s'\n",