From f0abbc71b56a54e1de0a5e775f77a1d14dfea681 Mon Sep 17 00:00:00 2001 From: David Shah Date: Thu, 8 Aug 2019 21:24:01 +0100 Subject: ecp5: Fix handling of missing ports in LUT permutation Fixes #310 Signed-off-by: David Shah --- ecp5/arch_place.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ecp5/arch_place.cc') diff --git a/ecp5/arch_place.cc b/ecp5/arch_place.cc index 18374c07..d5c345af 100644 --- a/ecp5/arch_place.cc +++ b/ecp5/arch_place.cc @@ -140,6 +140,10 @@ void Arch::permute_luts() std::vector 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)) { -- cgit v1.2.3