From: Eddie Hung Date: Wed, 22 Apr 2020 00:54:24 +0000 (-0700) Subject: abc9: only do +/abc9_map if `DFF X-Git-Tag: working-ls180~549^2~12 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=57c478c537ef23c05ca34ecdf4c4334fd82c104e;p=yosys.git abc9: only do +/abc9_map if `DFF --- diff --git a/passes/techmap/abc9.cc b/passes/techmap/abc9.cc index 147d6e572..60a88f729 100644 --- a/passes/techmap/abc9.cc +++ b/passes/techmap/abc9.cc @@ -330,7 +330,10 @@ struct Abc9Pass : public ScriptPass run("design -stash $abc9_map"); run("design -load $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"); } diff --git a/techlibs/common/abc9_map.v b/techlibs/common/abc9_map.v index 5f1822485..57b3831d8 100644 --- a/techlibs/common/abc9_map.v +++ b/techlibs/common/abc9_map.v @@ -1,3 +1,4 @@ +`ifdef DFF (* techmap_celltype = "$_DFF_N_ $_DFF_P_" *) module $_DFF_x_(input C, D, output Q); parameter [0:0] _TECHMAP_WIREINIT_Q_ = 1'bx; @@ -23,3 +24,4 @@ module $_DFF_x_(input C, D, output Q); $error("Unrecognised _TECHMAP_CELLTYPE_"); endgenerate endmodule +`endif