write_xaiger: create holes_sigmap before modifications
authorEddie Hung <eddie@fpgeh.com>
Sun, 12 Jan 2020 01:25:32 +0000 (17:25 -0800)
committerEddie Hung <eddie@fpgeh.com>
Sun, 12 Jan 2020 01:25:32 +0000 (17:25 -0800)
backends/aiger/xaiger.cc

index 7ee5058aeaa3a3efbf405d079496f58c5993adca..a6c87159d7bc85cfeca9444a522ace45c99bb289 100644 (file)
@@ -771,6 +771,8 @@ struct XAigerWriter
                                //   created a new $paramod ...
                                Pass::call_on_module(holes_module->design, holes_module, "flatten -wb; techmap; aigmap");
 
+                               SigMap holes_sigmap(holes_module);
+
                                dict<SigSpec, SigSpec> replace;
                                for (auto it = holes_module->cells_.begin(); it != holes_module->cells_.end(); ) {
                                        auto cell = it->second;
@@ -808,7 +810,6 @@ struct XAigerWriter
                                        ++it;
                                }
 
-                               SigMap holes_sigmap(holes_module);
                                for (auto &conn : holes_module->connections_) {
                                        auto it = replace.find(sigmap(conn.second));
                                        if (it != replace.end())