diff options
author | gatecat <gatecat@ds0.me> | 2023-04-11 11:16:40 +0200 |
---|---|---|
committer | myrtle <gatecat@ds0.me> | 2023-04-12 06:56:59 +0200 |
commit | 7557d33dc670f0863c5a085e1d755ff693e05fbf (patch) | |
tree | 8cd1ce9e6a79fe97640906823b583510dd0b1b33 | |
parent | 6455b5dd2661fd76bccc32a42577fecd4e43752d (diff) | |
download | nextpnr-7557d33dc670f0863c5a085e1d755ff693e05fbf.tar.gz nextpnr-7557d33dc670f0863c5a085e1d755ff693e05fbf.tar.bz2 nextpnr-7557d33dc670f0863c5a085e1d755ff693e05fbf.zip |
ecp5: Fix invalid accesses during certain IO packing cases
Signed-off-by: gatecat <gatecat@ds0.me>
-rw-r--r-- | ecp5/pack.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ecp5/pack.cc b/ecp5/pack.cc index d605b4a3..3b56daa9 100644 --- a/ecp5/pack.cc +++ b/ecp5/pack.cc @@ -552,11 +552,13 @@ class Ecp5Packer if (ionet != nullptr) { ctx->nets.erase(ionet->name); tp.cell->ports.at(tp.port).net = nullptr; + ci->ports.at(ci->type == ctx->id("$nextpnr_obuf") ? id_I : id_O).net = nullptr; } if (ci->type == ctx->id("$nextpnr_iobuf")) { NetInfo *net2 = ci->ports.at(id_I).net; if (net2 != nullptr) { ctx->nets.erase(net2->name); + ci->ports.at(id_I).net = nullptr; } } } else { |