From 043ad8e76cd45bb573c804ffddb4a478cd4a99d4 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Tue, 14 Apr 2020 11:10:48 -0700 Subject: [PATCH] abc9_ops: use new 'design -delete' and 'select -unset' --- passes/techmap/abc9.cc | 20 +++++--------------- passes/techmap/abc9_ops.cc | 3 ++- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/passes/techmap/abc9.cc b/passes/techmap/abc9.cc index 97ee57aaa..adb28189e 100644 --- a/passes/techmap/abc9.cc +++ b/passes/techmap/abc9.cc @@ -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"); } } } diff --git a/passes/techmap/abc9_ops.cc b/passes/techmap/abc9_ops.cc index c640d06f8..57f51503c 100644 --- a/passes/techmap/abc9_ops.cc +++ b/passes/techmap/abc9_ops.cc @@ -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"); -- 2.30.2