aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2020-04-24 16:11:53 +0200
committerSylvain Munaut <tnt@246tNt.com>2020-04-24 16:13:07 +0200
commit3573fcca80669c390b002c17ede911fb73c8bbbf (patch)
treef5627eed5d6c6b430bc6ed4acf152cd60cf0e200 /common
parent5cc8fe6c18bfa71a56c7e0da8098ac2bca907826 (diff)
downloadnextpnr-3573fcca80669c390b002c17ede911fb73c8bbbf.tar.gz
nextpnr-3573fcca80669c390b002c17ede911fb73c8bbbf.tar.bz2
nextpnr-3573fcca80669c390b002c17ede911fb73c8bbbf.zip
design_utils: Set port.net to null when disconnecting
Without this the python bindings can't actually connect anything else to a disconnected port since the assert in connect_ports will think it's still connected Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'common')
-rw-r--r--common/design_utils.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/design_utils.cc b/common/design_utils.cc
index 10212a03..dd866758 100644
--- a/common/design_utils.cc
+++ b/common/design_utils.cc
@@ -111,6 +111,7 @@ void disconnect_port(const Context *ctx, CellInfo *cell, IdString port_name)
port.net->users.end());
if (port.net->driver.cell == cell && port.net->driver.port == port_name)
port.net->driver.cell = nullptr;
+ port.net = nullptr;
}
}