attributes.count() -> get_bool_attribute()
authorEddie Hung <eddie@fpgeh.com>
Wed, 1 Jan 2020 06:54:56 +0000 (22:54 -0800)
committerEddie Hung <eddie@fpgeh.com>
Wed, 1 Jan 2020 16:33:32 +0000 (08:33 -0800)
backends/aiger/xaiger.cc
passes/techmap/abc9.cc

index be900f0e78fa1ba1a6e61248aeb3aa49398ea0d4..77659b4d8a5a84be0a7c062fc2b724a32c66f5de 100644 (file)
@@ -284,7 +284,7 @@ struct XAigerWriter
 
                                         toposort.node(cell->name);
 
-                                        if (inst_module->attributes.count("\\abc9_flop"))
+                                        if (inst_module->get_bool_attribute("\\abc9_flop"))
                                                 flop_boxes.push_back(cell);
                                         continue;
                                 }
index 3c53a522382d84588c6ec9beab07b2555dc3a783..d6c8260b2cac29ed8ff334018b699f03f4caeee7 100644 (file)
@@ -533,7 +533,7 @@ void abc9_module(RTLIL::Design *design, RTLIL::Module *module, std::string scrip
                        }
 
                        RTLIL::Module* box_module = design->module(mapped_cell->type);
-                       auto abc9_flop = box_module && box_module->attributes.count("\\abc9_flop");
+                       auto abc9_flop = box_module && box_module->get_bool_attribute("\\abc9_flop");
                        for (auto &conn : mapped_cell->connections()) {
                                RTLIL::SigSpec newsig;
                                for (auto c : conn.second.chunks()) {
@@ -988,7 +988,7 @@ struct Abc9Pass : public Pass {
 
                        for (auto cell : all_cells) {
                                auto inst_module = design->module(cell->type);
-                               if (!inst_module || !inst_module->attributes.count("\\abc9_flop")
+                               if (!inst_module || !inst_module->get_bool_attribute("\\abc9_flop")
                                                || cell->get_bool_attribute("\\abc9_keep"))
                                        continue;