aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-07-30 09:45:23 +0200
committerDavid Shah <davey1576@gmail.com>2018-07-30 09:45:23 +0200
commit593d8e0ddfa884ed9d0d0e11ab7b1eaf577da201 (patch)
tree6d1376c45ca27027621d9ab29ce56e4de04087c9 /common
parentf466ad0faf6d5757d1cb3259486bb7604b9064f2 (diff)
downloadnextpnr-593d8e0ddfa884ed9d0d0e11ab7b1eaf577da201.tar.gz
nextpnr-593d8e0ddfa884ed9d0d0e11ab7b1eaf577da201.tar.bz2
nextpnr-593d8e0ddfa884ed9d0d0e11ab7b1eaf577da201.zip
common: Fix getNetinfoRouteDelay when net has no driver
Signed-off-by: David Shah <davey1576@gmail.com>
Diffstat (limited to 'common')
-rw-r--r--common/nextpnr.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/nextpnr.cc b/common/nextpnr.cc
index 2c50c9a1..cf1b5982 100644
--- a/common/nextpnr.cc
+++ b/common/nextpnr.cc
@@ -91,6 +91,8 @@ WireId Context::getNetinfoSinkWire(NetInfo *net_info, int user_idx) const
delay_t Context::getNetinfoRouteDelay(NetInfo *net_info, int user_idx) const
{
WireId src_wire = getNetinfoSourceWire(net_info);
+ if (src_wire == WireId())
+ return 0;
WireId cursor = getNetinfoSinkWire(net_info, user_idx);
delay_t delay = 0;