From 6f71bc280b17805ee7687cad6dfdcdcb504d01d1 Mon Sep 17 00:00:00 2001 From: Robb Walters <2687775+rjwalters@users.noreply.github.com> Date: Fri, 2 Oct 2026 22:49:15 -0700 Subject: [PATCH] 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) --- common/route/router2.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/route/router2.cc b/common/route/router2.cc index 3d7ca2f8..f5a84de3 100644 --- a/common/route/router2.cc +++ b/common/route/router2.cc @@ -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",