Merge branch 'koriakin/xc7nocarrymux' into xaig
authorEddie Hung <eddie@fpgeh.com>
Wed, 26 Jun 2019 17:04:01 +0000 (10:04 -0700)
committerEddie Hung <eddie@fpgeh.com>
Wed, 26 Jun 2019 17:04:01 +0000 (10:04 -0700)
1  2 
techlibs/ecp5/synth_ecp5.cc
techlibs/xilinx/synth_xilinx.cc

index b271500f10ef88c5a6e4e35c2e11855129ee1ed9,01222e55c0fedb83606596eed8c800d23a15a931..c80ad0b0813e6c75f0b3230565efa347b3ed753d
@@@ -96,7 -93,7 +96,7 @@@ struct SynthEcp5Pass : public ScriptPas
        }
  
        string top_opt, blif_file, edif_file, json_file;
-       bool noccu2, nodffe, nobram, nodram, nomux, flatten, retime, abc2, abc9, vpr;
 -      bool noccu2, nodffe, nobram, nodram, nowidelut, flatten, retime, abc2, vpr;
++      bool noccu2, nodffe, nobram, nodram, nowidelut, flatten, retime, abc2, abc9, vpr;
  
        void clear_flags() YS_OVERRIDE
        {
                                run("abc", "      (only if -abc2)");
                        }
                        run("techmap -map +/ecp5/latches_map.v");
 -                      if (nowidelut)
 -                              run("abc -lut 4 -dress");
 -                      else
 -                              run("abc -lut 4:7 -dress");
 +                      if (abc9) {
 +                              run("abc9 -lut +/ecp5/abc_5g.lut -box +/ecp5/abc_5g.box -W 200");
 +                      } else {
-                               if (nomux)
++                              if (nowidelut)
 +                                      run("abc -lut 4 -dress");
 +                              else
 +                                      run("abc -lut 4:7 -dress");
 +                      }
                        run("clean");
                }
  
index 86b49b13cd9750ad03d3b4a4cb26cd0f8cd2892f,27125d56cfbccae295faa6af2c2f36cf0168a545..69f9507c3edbe59bf763cb0c3769b5b9d0886aaf
@@@ -93,8 -90,8 +99,8 @@@ struct SynthXilinxPass : public ScriptP
                log("\n");
        }
  
 -      std::string top_opt, edif_file, blif_file, arch;
 +      std::string top_opt, edif_file, blif_file, abc, arch;
-       bool flatten, retime, vpr, nocarry, nobram, nodram, nosrl;
+       bool flatten, retime, vpr, nobram, nodram, nosrl, nocarry, nowidelut;
  
        void clear_flags() YS_OVERRIDE
        {
                                retime = true;
                                continue;
                        }
 -                      if (args[argidx] == "-nomux") {
 -                              nomux = true;
+                       if (args[argidx] == "-nocarry") {
+                               nocarry = true;
+                               continue;
+                       }
++                      if (args[argidx] == "-nowidelut") {
++                              nowidelut = true;
+                               continue;
+                       }
                        if (args[argidx] == "-vpr") {
                                vpr = true;
                                continue;
                }
  
                if (check_label("map_luts")) {
 -                      if (help_mode)
 +                      run("opt_expr -mux_undef");
 +                      if (abc == "abc9")
 +                              run(abc + " -lut +/xilinx/abc_xc7.lut -box +/xilinx/abc_xc7.box -W " + XC7_WIRE_DELAY + string(retime ? " -dff" : ""));
 +                      else if (help_mode)
-                               run(abc + " -luts 2:2,3,6:5,10,20 [-dff]");
+                               run("abc -luts 2:2,3,6:5[,10,20] [-dff]", "(skip if 'nowidelut', only for '-retime')");
+                       else if (nowidelut)
+                               run("abc -luts 2:2,3,6:5" + string(retime ? " -dff" : ""));
                        else
 -                              run("abc -luts 2:2,3,6:5,10,20" + string(retime ? " -dff" : ""));
 +                              run(abc + " -luts 2:2,3,6:5,10,20" + string(retime ? " -dff" : ""));
                        run("clean");
 +
                        // This shregmap call infers fixed length shift registers after abc
                        //   has performed any necessary retiming
                        if (!nosrl || help_mode)