log(" -nowidelut\n");
log(" do not use MUXF[78] resources to implement LUTs larger than LUT6s\n");
log("\n");
+ log(" -nodsp\n");
+ log(" do not use DSP48E1s to implement multipliers and associated logic\n");
+ log("\n");
log(" -widemux <int>\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(" enable inference of hard multiplexer resources (MUXF[78]) for muxes at or\n");
+ log(" above this number of inputs (minimum value 2, recommended value >= 5).\n");
log(" default: 0 (no inference)\n");
log("\n");
log(" -run <from_label>:<to_label>\n");
run("opt_clean");
run("check");
run("opt");
- run("wreduce");
+ if (help_mode)
+ run("wreduce [-keepdc]", "(option for '-widemux')");
+ else
+ run("wreduce" + std::string(widemux > 0 ? " -keepdc" : ""));
run("peepopt");
run("opt_clean");
- run("share");
- run("techmap -map +/cmp2lut.v -D LUT_WIDTH=4");
- run("opt_expr");
- run("opt_clean");
+
+ if (widemux > 0 || help_mode)
+ run("muxpack", " ('-widemux' only)");
+
+ // shregmap -tech xilinx can cope with $shiftx and $mux
+ // cells for identifying variable-length shift registers,
+ // so attempt to convert $pmux-es to the former
+ // Also: wide multiplexer inference benefits from this too
+ if (!(nosrl && widemux == 0) || help_mode) {
+ run("pmux2shiftx", "(skip if '-nosrl' and '-widemux=0')");
+ run("clean", " (skip if '-nosrl' and '-widemux=0')");
+ }
+
+ run("techmap -map +/cmp2lut.v -D LUT_WIDTH=6");
++
+ if (!nodsp || help_mode) {
+ run("techmap -map +/mul2dsp.v -D DSP_A_MAXWIDTH=25 -D DSP_B_MAXWIDTH=18 -D DSP_NAME=$__MUL25X18");
+ run("clean");
+ run("techmap -map +/xilinx/dsp_map.v");
+ }
++
run("alumacc");
+ run("share");
run("opt");
run("fsm");
run("opt -fast");