aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-08-18 10:28:50 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2018-08-18 10:28:50 +0200
commit3c510070260593169f84a85e3c10b4e5e22d1951 (patch)
tree64acecc5af10a92ba56375358c997072c7cd5ad7
parent8965922219ea55ffd15ad5f4bbf7641330e03a27 (diff)
downloadnextpnr-3c510070260593169f84a85e3c10b4e5e22d1951.tar.gz
nextpnr-3c510070260593169f84a85e3c10b4e5e22d1951.tar.bz2
nextpnr-3c510070260593169f84a85e3c10b4e5e22d1951.zip
do not break if there are no nets loaded from sym section
-rw-r--r--ice40/bitstream.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/ice40/bitstream.cc b/ice40/bitstream.cc
index ee276e49..4ea91011 100644
--- a/ice40/bitstream.cc
+++ b/ice40/bitstream.cc
@@ -870,10 +870,12 @@ bool read_asc(Context *ctx, std::istream &in)
}
if (isUsed) {
NetInfo *net = ctx->wire_to_net[pi.dst];
- WireId wire;
- wire.index = pi.dst;
- ctx->unbindWire(wire);
- ctx->bindPip(pip, net, STRENGTH_WEAK);
+ if (net!=nullptr) {
+ WireId wire;
+ wire.index = pi.dst;
+ ctx->unbindWire(wire);
+ ctx->bindPip(pip, net, STRENGTH_WEAK);
+ }
}
}
for (auto bel : ctx->getBels()) {