abc9_ops: use new 'design -delete' and 'select -unset'

This commit is contained in:
Eddie Hung 2020-04-14 11:10:48 -07:00
parent a52f779eca
commit 043ad8e76c
2 changed files with 7 additions and 16 deletions

View 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");
}
}
}

View 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");