Minor code cleanups in liberty front-end
authorClifford Wolf <clifford@clifford.at>
Wed, 17 Oct 2018 10:23:36 +0000 (12:23 +0200)
committerClifford Wolf <clifford@clifford.at>
Wed, 17 Oct 2018 10:23:36 +0000 (12:23 +0200)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
frontends/liberty/liberty.cc

index 0018d6dac58583a382547dc47ba033a0f2fb3373..66db43baf715ffa9e2aa525c7d95cc4bf7f3ecc6 100644 (file)
@@ -634,11 +634,12 @@ struct LibertyFrontend : public Frontend {
                                }
                        }
 
-                       // some liberty files do not put ff/latch at the beginning of a cell
-                       // try to find "ff" or "latch" and create FF/latch before processing all other nodes 
-                       for (auto node : cell->children)
+                       if (!flag_lib)
                        {
-                               if (!flag_lib) {
+                               // some liberty files do not put ff/latch at the beginning of a cell
+                               // try to find "ff" or "latch" and create FF/latch _before_ processing all other nodes
+                               for (auto node : cell->children)
+                               {
                                        if (node->id == "ff" && node->args.size() == 2)
                                                create_ff(module, node);
                                        if (node->id == "latch" && node->args.size() == 2)
@@ -651,18 +652,6 @@ struct LibertyFrontend : public Frontend {
 
                        for (auto node : cell->children)
                        {
-                               /*
-                               if (!flag_lib) {
-                                       if (node->id == "ff" && node->args.size() == 2)
-                                               create_ff(module, node);
-                                       if (node->id == "latch" && node->args.size() == 2)
-                                               if (!create_latch(module, node, flag_ignore_miss_data_latch)) {
-                                                       delete module;
-                                                       goto skip_cell;
-                                               }
-                               }
-                               */
-
                                if (node->id == "pin" && node->args.size() == 1)
                                {
                                        LibertyAst *dir = node->find("direction");