opt_merge: use the master FF type list
authorMarcelina Kościelnicka <mwk@0x04.net>
Tue, 30 Jun 2020 18:57:35 +0000 (20:57 +0200)
committerMarcelina Kościelnicka <mwk@0x04.net>
Tue, 30 Jun 2020 18:57:35 +0000 (20:57 +0200)
passes/opt/opt_merge.cc

index a95aa74c19bab923013747a4a3f12173fd07f1dc..f03faa9cf360b787169d8e53590c6bfb83dfbb03 100644 (file)
@@ -298,9 +298,7 @@ struct OptMergeWorker
                                                                module->connect(RTLIL::SigSig(it.second, other_sig));
                                                                assign_map.add(it.second, other_sig);
 
-                                                               if (it.first == ID::Q && (cell->type.begins_with("$dff") || cell->type.begins_with("$dlatch") ||
-                                                                                       cell->type.begins_with("$_DFF") || cell->type.begins_with("$_DLATCH") || cell->type.begins_with("$_SR_") ||
-                                                                                       cell->type.in(ID($adff), ID($sr), ID($ff), ID($_FF_)))) {
+                                                               if (it.first == ID::Q && RTLIL::builtin_ff_cell_types().count(cell->type)) {
                                                                        for (auto c : it.second.chunks()) {
                                                                                auto jt = c.wire->attributes.find(ID::init);
                                                                                if (jt == c.wire->attributes.end())