abc9_ops: use new 'design -delete' and 'select -unset'
authorEddie Hung <eddie@fpgeh.com>
Tue, 14 Apr 2020 18:10:48 +0000 (11:10 -0700)
committerEddie Hung <eddie@fpgeh.com>
Thu, 14 May 2020 17:33:56 +0000 (10:33 -0700)
passes/techmap/abc9.cc
passes/techmap/abc9_ops.cc

index 97ee57aaaa04706789e1031e5b0287f711271bff..adb28189e7d79321b91bf92edbaf6ce7b19d9b11 100644 (file)
@@ -309,15 +309,10 @@ struct Abc9Pass : public ScriptPass
                                run("abc9_ops -prep_dff_unmap"); // create $abc9_unmap design
                                run("techmap -map %$abc9_map"); // techmap user design into submod + $_DFF_[NP]_
                                run("setattr -mod -set whitebox 1 -set abc9_flop 1 -set abc9_box 1 *_$abc9_flop");
-                               if (!help_mode) {
-                                       // TODO: Need a way to delete saved designs?
-                                       auto it = saved_designs.find("$abc9_map");
-                                       delete it->second;
-                                       saved_designs.erase(it);
-                                       // TODO: Need a way to delete selections
-                                       active_design->selection_vars.erase(ID($abc9_flops));
-                                       active_design->selection_vars.erase(ID($abc9_cells));
-                               }
+                               run("design -delete $abc9");
+                               run("design -delete $abc9_map");
+                               run("select -unset $abc9_flops");
+                               run("select -unset $abc9_cells");
                        }
                }
 
@@ -423,12 +418,7 @@ struct Abc9Pass : public ScriptPass
                        if (dff_mode || help_mode) {
                                run("techmap -wb -map %$abc9_unmap", "(only if -dff)"); // techmap user design from submod back to original cell
                                                                                        //   ($_DFF_[NP]_ already shorted by -reintegrate)
-                               if (!help_mode) {
-                                       // TODO: Need a way to delete saved designs?
-                                       auto it = saved_designs.find("$abc9_unmap");
-                                       delete it->second;
-                                       saved_designs.erase(it);
-                               }
+                               run("design -delete $abc9_unmap");
                        }
                }
        }
index c640d06f82ab1e5bc7d62435605b98bf38c1cb68..57f51503c3ecd6a8eae8328807f43c1e4c4f0857 100644 (file)
@@ -1204,7 +1204,8 @@ struct Abc9OpsPass : public Pass {
                log("\n");
                log("    -prep_dff_hier\n");
                log("        derive all cells with a type instantiating an (* abc9_flop *) module.\n");
-               log("        store such modules in named selection '$abc9_flops'.\n");
+               log("        store such modules in named selection '$abc9_flops'. store one cell\n");
+               log("        instantiating each derived module into named selection '$abc9_cells'.\n");
                log("\n");
                log("    -prep_dff_map\n");
                log("        within (* abc9_flop *) modules, move all $specify{2,3}/$specrule cells\n");