From 385380401afb9f2f5cbfef766be30f39c3bbd34b Mon Sep 17 00:00:00 2001 From: David Shah Date: Fri, 15 Nov 2019 11:38:11 +0000 Subject: router2: Deal with some special cases Signed-off-by: David Shah --- common/router2.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'common') diff --git a/common/router2.cc b/common/router2.cc index b6875ef0..152878c6 100644 --- a/common/router2.cc +++ b/common/router2.cc @@ -572,7 +572,17 @@ struct Router2 auto &ad = nd.arcs.at(usr_idx); auto &usr = net->users.at(usr_idx); WireId src = ctx->getNetinfoSourceWire(net); + // Skip routes with no source + if (src == WireId()) + return true; WireId dst = ctx->getNetinfoSinkWire(net, usr); + // Skip routes where the destination is already bound + if (dst == WireId() || ctx->getBoundWireNet(dst) == net) + return true; + // Skip routes where there is no routing (special cases) + if (ad.wires.empty()) + return true; + WireId cursor = dst; std::vector to_bind; -- cgit v1.2.3