abc9: only do +/abc9_map if `DFF
authorEddie Hung <eddie@fpgeh.com>
Wed, 22 Apr 2020 00:54:24 +0000 (17:54 -0700)
committerEddie Hung <eddie@fpgeh.com>
Thu, 14 May 2020 17:33:57 +0000 (10:33 -0700)
passes/techmap/abc9.cc
techlibs/common/abc9_map.v

index 147d6e572d417226a85cded8b8161983f56dcbf9..60a88f72941e43e80e7a95308ee567876271a175 100644 (file)
@@ -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");
                }
 
index 5f1822485c1b358c4b49046c8a468d085c7527bf..57b3831d8902af2a678dfdaf5aa4980e9654bd37 100644 (file)
@@ -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