Added placeholder check to dfflibmap and cleaned up some other placeholder checks
authorClifford Wolf <clifford@clifford.at>
Thu, 31 Oct 2013 11:27:07 +0000 (12:27 +0100)
committerClifford Wolf <clifford@clifford.at>
Thu, 31 Oct 2013 11:27:07 +0000 (12:27 +0100)
backends/blif/blif.cc
passes/cmds/show.cc
passes/techmap/dfflibmap.cc

index 747ba17d33236e9d5f84ab8fde92b18bfcb833f6..e8909b91a030a4e92c41ae19d22b9b68648547b4 100644 (file)
@@ -298,7 +298,7 @@ struct BlifBackend : public Backend {
                for (auto module_it : design->modules)
                {
                        RTLIL::Module *module = module_it.second;
-                       if ((module->get_bool_attribute("\\placeholder")) > 0)
+                       if (module->get_bool_attribute("\\placeholder"))
                                continue;
 
                        if (module->processes.size() != 0)
index 0721d4fdf0b574bc4ba48704ecec166e0f4273fe..583b8da9a95a1c6195e56ab642a70e1ac0191cb3 100644 (file)
@@ -477,7 +477,7 @@ struct ShowWorker
                        if (!design->selected_module(module->name))
                                continue;
                        if (design->selected_whole_module(module->name)) {
-                               if (module->get_bool_attribute("\\placeholder") > 0) {
+                               if (module->get_bool_attribute("\\placeholder")) {
                                        log("Skipping placeholder module %s.\n", id2cstr(module->name));
                                        continue;
                                } else
@@ -617,7 +617,7 @@ struct ShowPass : public Pass {
                if (format != "ps") {
                        int modcount = 0;
                        for (auto &mod_it : design->modules) {
-                               if (mod_it.second->get_bool_attribute("\\placeholder") > 0)
+                               if (mod_it.second->get_bool_attribute("\\placeholder"))
                                        continue;
                                if (mod_it.second->cells.empty() && mod_it.second->connections.empty())
                                        continue;
index 111f2f91926361bd66e844c0343427b1105e6012..bebf7ce6350e08e689ce45b3413e33bfee0012a6 100644 (file)
@@ -498,7 +498,7 @@ struct DfflibmapPass : public Pass {
                logmap_all();
 
                for (auto &it : design->modules)
-                       if (design->selected(it.second))
+                       if (design->selected(it.second) && !it.second->get_bool_attribute("\\placeholder"))
                                dfflibmap(design, it.second);
 
                cell_mappings.clear();