aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2020-11-23 14:37:15 +0000
committerDavid Shah <dave@ds0.me>2020-11-30 08:45:28 +0000
commitf84850064fc6747ea13faf41e4bae8b85be0ae5f (patch)
tree7afc0afd279b2c6417722a71e7b86905e057cceb
parentdf3c6dfe3ec3740007d4dbd8ae6347e2af345c79 (diff)
downloadnextpnr-f84850064fc6747ea13faf41e4bae8b85be0ae5f.tar.gz
nextpnr-f84850064fc6747ea13faf41e4bae8b85be0ae5f.tar.bz2
nextpnr-f84850064fc6747ea13faf41e4bae8b85be0ae5f.zip
nexus: Improve error handling in global router
Signed-off-by: David Shah <dave@ds0.me>
-rw-r--r--nexus/global.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/nexus/global.cc b/nexus/global.cc
index 2d183e95..f7abb399 100644
--- a/nexus/global.cc
+++ b/nexus/global.cc
@@ -55,6 +55,14 @@ struct NexusGlobalRouter
WireId src = ctx->getNetinfoSourceWire(net);
WireId dst = ctx->getNetinfoSinkWire(net, net->users.at(user_idx));
+ if (src == WireId())
+ log_error("Net '%s' has an invalid source port %s.%s\n", ctx->nameOf(net), ctx->nameOf(net->driver.cell),
+ ctx->nameOf(net->driver.port));
+
+ if (dst == WireId())
+ log_error("Net '%s' has an invalid sink port %s.%s\n", ctx->nameOf(net),
+ ctx->nameOf(net->users.at(user_idx).cell), ctx->nameOf(net->users.at(user_idx).port));
+
if (ctx->getBoundWireNet(src) != net)
ctx->bindWire(src, net, STRENGTH_LOCKED);