From: Eddie Hung Date: Wed, 26 Jun 2019 17:33:54 +0000 (-0700) Subject: Merge remote-tracking branch 'origin/xaig' into xc7mux X-Git-Tag: working-ls180~1208^2~71 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=612083a807f0776f13db132ddbd5cf0bed14eb02;p=yosys.git Merge remote-tracking branch 'origin/xaig' into xc7mux --- 612083a807f0776f13db132ddbd5cf0bed14eb02 diff --cc techlibs/xilinx/synth_xilinx.cc index 4367f2b99,b17b9beb5..2a641e933 --- a/techlibs/xilinx/synth_xilinx.cc +++ b/techlibs/xilinx/synth_xilinx.cc @@@ -73,11 -73,12 +73,17 @@@ struct SynthXilinxPass : public ScriptP log(" -nosrl\n"); log(" disable inference of shift registers\n"); log("\n"); + log(" -nocarry\n"); + log(" do not use XORCY/MUXCY/CARRY4 cells in output netlist\n"); + log("\n"); + log(" -nowidelut\n"); + log(" do not use MUXF[78] resources to implement LUTs larger than LUT6s\n"); + log("\n"); + log(" -widemux \n"); + log(" enable inference of hard multiplexer resources (MuxFx) for muxes at or\n"); + log(" above this number of inputs (minimum value 5).\n"); + log(" default: 0 (no inference)\n"); + log("\n"); log(" -run :\n"); log(" only run the commands between the labels (see below). an empty\n"); log(" from label is synonymous to 'begin', and empty to label is\n"); @@@ -99,8 -100,7 +105,8 @@@ } 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, abc9; + int widemux; void clear_flags() YS_OVERRIDE { @@@ -115,8 -115,9 +121,10 @@@ nobram = false; nodram = false; nosrl = false; - arch = "xc7"; + nocarry = false; + nowidelut = false; + abc9 = false; + widemux = 0; } void execute(std::vector args, RTLIL::Design *design) YS_OVERRIDE @@@ -179,12 -188,8 +195,12 @@@ nosrl = true; continue; } + if (args[argidx] == "-widemux" && argidx+1 < args.size()) { + widemux = atoi(args[++argidx].c_str()); + continue; + } if (args[argidx] == "-abc9") { - abc = "abc9"; + abc9 = true; continue; } break; @@@ -310,21 -277,17 +326,21 @@@ run("shregmap -tech xilinx -minlen 3", "(skip if '-nosrl')"); } - std::string techmap_files = " -map +/techmap.v"; + std::string techmap_args = " -map +/techmap.v"; + if (help_mode) + techmap_args += " [-map +/xilinx/mux_map.v]"; + else if (widemux > 0) + techmap_args += stringf(" -D MIN_MUX_INPUTS=%d -map +/xilinx/mux_map.v", widemux); if (help_mode) - techmap_files += " [-map +/xilinx/arith_map.v]"; + techmap_args += " [-map +/xilinx/arith_map.v]"; else if (!nocarry) { - techmap_files += " -map +/xilinx/arith_map.v"; + techmap_args += " -map +/xilinx/arith_map.v"; if (vpr) - techmap_files += " -D _EXPLICIT_CARRY"; + techmap_args += " -D _EXPLICIT_CARRY"; - else if (abc == "abc9") + else if (abc9) - techmap_files += " -D _CLB_CARRY"; + techmap_args += " -D _CLB_CARRY"; } - run("techmap " + techmap_files); + run("techmap " + techmap_args); run("opt -fast"); }