From 3c510070260593169f84a85e3c10b4e5e22d1951 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 18 Aug 2018 10:28:50 +0200 Subject: do not break if there are no nets loaded from sym section --- ice40/bitstream.cc | 10 ++++++---- 1 file 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()) { -- cgit v1.2.3