router2: Fix case where src and dst are the same

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2020-10-22 16:43:10 +01:00
parent f8dca82a71
commit 5e90086d4f

View File

@ -774,8 +774,11 @@ struct Router2
if (dst == WireId() || ctx->getBoundWireNet(dst) == net)
return true;
// Skip routes where there is no routing (special cases)
if (!ad.routed)
if (!ad.routed) {
if ((src == dst) && ctx->getBoundWireNet(dst) != net)
ctx->bindWire(src, net, STRENGTH_WEAK);
return true;
}
WireId cursor = dst;