ecp5: Fix handling of missing ports in LUT permutation Fixes #310 Signed-off-by: David Shah <dave@ds0.me>
diff --git a/ecp5/arch_place.cc b/ecp5/arch_place.cc index 18374c0..d5c345a 100644 --- a/ecp5/arch_place.cc +++ b/ecp5/arch_place.cc
@@ -140,6 +140,10 @@ std::vector<NetInfo *> orig_nets; for (int i = 0; i < 4; i++) { + if (!ci->ports.count(port_names.at(i))) { + ci->ports[port_names.at(i)].name = port_names.at(i); + ci->ports[port_names.at(i)].type = PORT_IN; + } auto &port = ci->ports.at(port_names.at(i)); float crit = 0; if (port.net != nullptr && nc.count(port.net->name)) {