aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-11-15 11:38:11 +0000
committerDavid Shah <dave@ds0.me>2020-02-03 11:38:30 +0000
commit385380401afb9f2f5cbfef766be30f39c3bbd34b (patch)
treec74330292b5f6028c1ef2ae8dfb98cc1d9dcee64
parentfa217a50a5aa9b1a915728bea035e368a376ceee (diff)
downloadnextpnr-385380401afb9f2f5cbfef766be30f39c3bbd34b.tar.gz
nextpnr-385380401afb9f2f5cbfef766be30f39c3bbd34b.tar.bz2
nextpnr-385380401afb9f2f5cbfef766be30f39c3bbd34b.zip
router2: Deal with some special cases
Signed-off-by: David Shah <dave@ds0.me>
-rw-r--r--common/router2.cc10
1 files changed, 10 insertions, 0 deletions
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<PipId> to_bind;