aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2020-10-22 16:43:10 +0100
committerDavid Shah <dave@ds0.me>2020-11-30 08:45:28 +0000
commit5e90086d4f02910a973b743a42d8ae1853599ac1 (patch)
tree1e33dd89091a274d8a6f284a3c39e11113af75b6 /common
parentf8dca82a713d2d90d29c70357c5c276bed5d7862 (diff)
downloadnextpnr-5e90086d4f02910a973b743a42d8ae1853599ac1.tar.gz
nextpnr-5e90086d4f02910a973b743a42d8ae1853599ac1.tar.bz2
nextpnr-5e90086d4f02910a973b743a42d8ae1853599ac1.zip
router2: Fix case where src and dst are the same
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'common')
-rw-r--r--common/router2.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/router2.cc b/common/router2.cc
index 4dfd868b..15c97e52 100644
--- a/common/router2.cc
+++ b/common/router2.cc
@@ -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;