abc9: cleanup
authorEddie Hung <eddie@fpgeh.com>
Mon, 13 Apr 2020 20:12:45 +0000 (13:12 -0700)
committerEddie Hung <eddie@fpgeh.com>
Thu, 14 May 2020 17:33:56 +0000 (10:33 -0700)
passes/techmap/abc9.cc

index 7f3e6abcccffaeb421ca59dba4983b4574e6f506..97ee57aaaa04706789e1031e5b0287f711271bff 100644 (file)
@@ -295,16 +295,13 @@ struct Abc9Pass : public ScriptPass
                                run("delete *_$abc9_flop");
                                if (help_mode) {
                                        run("foreach module in design");
-                                       run("    cd <module-name>");
                                        run("    rename <module-name>_$abc9_flop _TECHMAP_REPLACE_");
-                                       run("    cd");
                                }
                                else {
                                        // Rename all submod-s to _TECHMAP_REPLACE_ to inherit name + attrs
                                        for (auto module : active_design->selected_modules()) {
-                                               run(stringf("cd %s", log_id(module->name)));
+                                               active_design->selected_active_module = module->name.str();
                                                run(stringf("rename %s_$abc9_flop _TECHMAP_REPLACE_", module->name.c_str()));
-                                               run("cd");
                                        }
                                }
                                run("design -stash $abc9_map");