abc9: only do +/abc9_map if `DFF

This commit is contained in:
Eddie Hung 2020-04-21 17:54:24 -07:00
parent 2946bb60e9
commit 57c478c537
2 changed files with 6 additions and 1 deletions

View File

@ -330,7 +330,10 @@ struct Abc9Pass : public ScriptPass
run("design -stash $abc9_map"); run("design -stash $abc9_map");
run("design -load $abc9"); run("design -load $abc9");
run("design -delete $abc9"); run("design -delete $abc9");
run("techmap -wb -max_iter 1 -map %$abc9_map -map +/abc9_map.v"); if (help_mode)
run("techmap -wb -max_iter 1 -map %$abc9_map -map +/abc9_map.v [-D DFF]", "(option if -dff)");
else
run(stringf("techmap -wb -max_iter 1 -map %$abc9_map -map +/abc9_map.v %s", dff_mode ? "-D DFF" : ""));
run("design -delete $abc9_map"); run("design -delete $abc9_map");
} }

View File

@ -1,3 +1,4 @@
`ifdef DFF
(* techmap_celltype = "$_DFF_N_ $_DFF_P_" *) (* techmap_celltype = "$_DFF_N_ $_DFF_P_" *)
module $_DFF_x_(input C, D, output Q); module $_DFF_x_(input C, D, output Q);
parameter [0:0] _TECHMAP_WIREINIT_Q_ = 1'bx; parameter [0:0] _TECHMAP_WIREINIT_Q_ = 1'bx;
@ -23,3 +24,4 @@ module $_DFF_x_(input C, D, output Q);
$error("Unrecognised _TECHMAP_CELLTYPE_"); $error("Unrecognised _TECHMAP_CELLTYPE_");
endgenerate endgenerate
endmodule endmodule
`endif