ecp5: Fix invalid accesses during certain IO packing cases
Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
6455b5dd26
commit
7557d33dc6
@ -552,11 +552,13 @@ class Ecp5Packer
|
|||||||
if (ionet != nullptr) {
|
if (ionet != nullptr) {
|
||||||
ctx->nets.erase(ionet->name);
|
ctx->nets.erase(ionet->name);
|
||||||
tp.cell->ports.at(tp.port).net = nullptr;
|
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")) {
|
if (ci->type == ctx->id("$nextpnr_iobuf")) {
|
||||||
NetInfo *net2 = ci->ports.at(id_I).net;
|
NetInfo *net2 = ci->ports.at(id_I).net;
|
||||||
if (net2 != nullptr) {
|
if (net2 != nullptr) {
|
||||||
ctx->nets.erase(net2->name);
|
ctx->nets.erase(net2->name);
|
||||||
|
ci->ports.at(id_I).net = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user