From cff3195caa8297f39dd77c1b7842f0a70e938eca Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 14 Nov 2019 15:55:21 +0100 Subject: [PATCH] Improve EDIF lib_cell_ports scan --- backends/edif/edif.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backends/edif/edif.cc b/backends/edif/edif.cc index 04037edcd..00fd7f54e 100644 --- a/backends/edif/edif.cc +++ b/backends/edif/edif.cc @@ -192,6 +192,14 @@ struct EdifBackend : public Backend { for (auto module : design->modules()) { + lib_cell_ports[module->name]; + + for (auto port : module->ports) + { + Wire *wire = module->wire(port); + lib_cell_ports[module->name][port] = std::max(lib_cell_ports[module->name][port], GetSize(wire)); + } + if (module->get_blackbox_attribute()) continue; @@ -208,7 +216,7 @@ struct EdifBackend : public Backend { if (design->module(cell->type) == nullptr || design->module(cell->type)->get_blackbox_attribute()) { lib_cell_ports[cell->type]; for (auto p : cell->connections()) - lib_cell_ports[cell->type][p.first] = GetSize(p.second); + lib_cell_ports[cell->type][p.first] = std::max(lib_cell_ports[cell->type][p.first], GetSize(p.second)); } } }