From: Eddie Hung Date: Wed, 26 Jun 2019 17:04:01 +0000 (-0700) Subject: Merge branch 'koriakin/xc7nocarrymux' into xaig X-Git-Tag: working-ls180~1237^2~35 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=799b18263f70872115978f11d234b013dc9b79de;p=yosys.git Merge branch 'koriakin/xc7nocarrymux' into xaig --- 799b18263f70872115978f11d234b013dc9b79de diff --cc techlibs/ecp5/synth_ecp5.cc index b271500f1,01222e55c..c80ad0b08 --- a/techlibs/ecp5/synth_ecp5.cc +++ b/techlibs/ecp5/synth_ecp5.cc @@@ -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 { @@@ -272,15 -264,10 +272,14 @@@ 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"); } diff --cc techlibs/xilinx/synth_xilinx.cc index 86b49b13c,27125d56c..69f9507c3 --- a/techlibs/xilinx/synth_xilinx.cc +++ b/techlibs/xilinx/synth_xilinx.cc @@@ -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 { @@@ -152,6 -149,14 +160,14 @@@ retime = true; continue; } + if (args[argidx] == "-nocarry") { + nocarry = true; + continue; + } - if (args[argidx] == "-nomux") { - nomux = true; ++ if (args[argidx] == "-nowidelut") { ++ nowidelut = true; + continue; + } if (args[argidx] == "-vpr") { vpr = true; continue; @@@ -281,15 -269,13 +297,17 @@@ } 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)