abc_flop to also get topologically sorted
authorEddie Hung <eddie@fpgeh.com>
Thu, 11 Jul 2019 03:26:09 +0000 (20:26 -0700)
committerEddie Hung <eddie@fpgeh.com>
Thu, 11 Jul 2019 03:26:09 +0000 (20:26 -0700)
backends/aiger/xaiger.cc

index 82c28549c33285d925c8468101849c013e9d216f..5eeae3b82264a39ba2e869f4a04196ef4fcc96ea 100644 (file)
@@ -312,19 +312,18 @@ struct XAigerWriter
                                        undriven_bits.erase(O);
                                        ff_bits.emplace_back(q);
                                }
-                               else {
-                                       for (const auto &conn : cell->connections()) {
-                                               if (cell->input(conn.first)) {
-                                                       // Ignore inout for the sake of topographical ordering
-                                                       if (cell->output(conn.first)) continue;
-                                                       for (auto bit : sigmap(conn.second))
-                                                               bit_users[bit].insert(cell->name);
-                                               }
 
-                                               if (cell->output(conn.first))
-                                                       for (auto bit : sigmap(conn.second))
-                                                               bit_drivers[bit].insert(cell->name);
+                               for (const auto &conn : cell->connections()) {
+                                       if (cell->input(conn.first)) {
+                                               // Ignore inout for the sake of topographical ordering
+                                               if (cell->output(conn.first)) continue;
+                                               for (auto bit : sigmap(conn.second))
+                                                       bit_users[bit].insert(cell->name);
                                        }
+
+                                       if (cell->output(conn.first))
+                                               for (auto bit : sigmap(conn.second))
+                                                       bit_drivers[bit].insert(cell->name);
                                }
                        }
                        else {