Add support for synth_xilinx -abc9 and ignore abc9 -dress opt
authorEddie Hung <eddie@fpgeh.com>
Tue, 9 Apr 2019 17:06:44 +0000 (10:06 -0700)
committerEddie Hung <eddie@fpgeh.com>
Tue, 9 Apr 2019 17:06:44 +0000 (10:06 -0700)
passes/techmap/abc9.cc
techlibs/xilinx/synth_xilinx.cc

index da3d36354157110c644c2905a2d10adf123437b6..6e2e349eeba0a9b2fb8744213346c85938014334 100644 (file)
@@ -1237,6 +1237,11 @@ struct Abc9Pass : public Pass {
                                map_mux16 = true;
                                continue;
                        }
+                       if (arg == "-dress") {
+                               // TODO
+                               abc_dress = true;
+                               continue;
+                       }
                        if (arg == "-g" && argidx+1 < args.size()) {
                                for (auto g : split_tokens(args[++argidx], ",")) {
                                        vector<string> gate_list;
index 805ae8e6e93844d8e2c60340bd098c858b4c3e24..090bcce857c45f5a1bc791de91e1c47146d26b96 100644 (file)
@@ -80,6 +80,9 @@ struct SynthXilinxPass : public Pass
                log("    -retime\n");
                log("        run 'abc' with -dff option\n");
                log("\n");
+               log("    -abc9\n");
+               log("        use abc9 instead of abc\n");
+               log("\n");
                log("\n");
                log("The following commands are executed by this synthesis command:\n");
                log("\n");
@@ -142,6 +145,7 @@ struct SynthXilinxPass : public Pass
                std::string edif_file;
                std::string blif_file;
                std::string run_from, run_to;
+               std::string abc = "abc";
                bool flatten = false;
                bool retime = false;
                bool vpr = false;
@@ -191,6 +195,10 @@ struct SynthXilinxPass : public Pass
                                nodram = true;
                                continue;
                        }
+                       if (args[argidx] == "-abc9") {
+                               abc = "abc9";
+                               continue;
+                       }
                        break;
                }
                extra_args(args, argidx, design);
@@ -267,7 +275,7 @@ struct SynthXilinxPass : public Pass
 
                if (check_label(active, run_from, run_to, "map_luts"))
                {
-                       Pass::call(design, "abc -luts 2:2,3,6:5,10,20" + string(retime ? " -dff" : ""));
+                       Pass::call(design, abc + " -luts 2:2,3,6:5,10,20" + string(retime ? " -dff" : ""));
                        Pass::call(design, "clean");
                        Pass::call(design, "techmap -map +/xilinx/lut_map.v");
                }