sta: warn on unrecognised cells only once
authorLofty <dan.ravensloft@gmail.com>
Mon, 6 Jun 2022 14:29:52 +0000 (15:29 +0100)
committerLofty <dan.ravensloft@gmail.com>
Wed, 8 Jun 2022 08:31:49 +0000 (09:31 +0100)
passes/cmds/sta.cc

index 13e1ee13c862fd444741580a479cb7607306790d..4ad0e96be3c5d4f9cc8a665645b4c99bafb56413 100644 (file)
@@ -58,11 +58,14 @@ struct StaWorker
        {
                TimingInfo timing;
 
+               pool<IdString> unrecognised_cells;
+
                for (auto cell : module->cells())
                {
                        Module *inst_module = design->module(cell->type);
                        if (!inst_module) {
-                               log_warning("Cell type '%s' not recognised! Ignoring.\n", log_id(cell->type));
+                               if (unrecognised_cells.insert(cell->type).second)
+                                       log_warning("Cell type '%s' not recognised! Ignoring.\n", log_id(cell->type));
                                continue;
                        }