log(" -nosrl\n");
log(" disable inference of shift registers\n");
log("\n");
- log(" -minmuxf <int>\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(" default: 0 (no inference)\n");
std::string top_opt, edif_file, blif_file, abc, arch;
bool flatten, retime, vpr, nocarry, nobram, nodram, nosrl;
- int minmuxf;
+ int widemux;
void clear_flags() YS_OVERRIDE
{
nodram = false;
nosrl = false;
arch = "xc7";
- minmuxf = 0;
+ widemux = 0;
}
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
nosrl = true;
continue;
}
- if (args[argidx] == "-minmuxf" && argidx+1 < args.size()) {
- minmuxf = atoi(args[++argidx].c_str());
+ if (args[argidx] == "-widemux" && argidx+1 < args.size()) {
+ widemux = atoi(args[++argidx].c_str());
continue;
}
if (args[argidx] == "-abc9") {
if (arch != "xcup" && arch != "xcu" && arch != "xc7" && arch != "xc6s")
log_cmd_error("Invalid Xilinx -arch setting: %s\n", arch.c_str());
- if (minmuxf != 0 && minmuxf < 5)
- log_cmd_error("-minmuxf value must be 0 or >= 5.\n");
+ if (widemux != 0 && widemux < 5)
+ log_cmd_error("-widemux value must be 0 or >= 5.\n");
if (!design->full_selection())
log_cmd_error("This command only operates on fully selected designs!\n");
run("check");
run("opt");
if (help_mode)
- run("wreduce [c:* t:$mux %d]", "(selection for '-minmuxf' only)");
+ run("wreduce [c:* t:$mux %d]", "(selection for '-widemux' only)");
else
- run("wreduce" + std::string(minmuxf > 0 ? " c:* t:$mux %d" : ""));
+ run("wreduce" + std::string(widemux > 0 ? " c:* t:$mux %d" : ""));
run("peepopt");
run("opt_clean");
run("alumacc");
run("memory -nomap");
run("opt_clean");
- if (minmuxf > 0 || help_mode)
- run("muxpack", " ('-minmuxf' only)");
+ 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 && minmuxf == 0) || help_mode)
- run("pmux2shiftx", "(skip if '-nosrl' and '-minmuxf' < 5)");
+ if (!(nosrl && widemux == 0) || help_mode)
+ run("pmux2shiftx", "(skip if '-nosrl' and '-widemux' < 5)");
}
if (check_label("bram", "(skip if '-nobram')")) {
}
if (check_label("fine")) {
- run("opt -fast");
+ run("opt -fast -full");
run("memory_map");
run("dffsr2dff");
run("dff2dffe");
- if (minmuxf > 0 || help_mode) {
- run("simplemap t:$mux", " ('-minmuxf' only)");
- if (minmuxf > 0 || help_mode) {
+ if (widemux > 0 || help_mode) {
+ run("simplemap t:$mux", " ('-widemux' only)");
+ if (widemux > 0 || help_mode) {
std::string muxcover_args = " -dmux=0";
- switch (minmuxf) {
+ switch (widemux) {
// NB: Cost of mux2 is 100; mux8 should cost between 3 and 4
// of those so that 4:1 muxes and below are implemented
// out of mux2s
case 15: muxcover_args += " -mux16=1350"; break;
default: muxcover_args += " -mux16=1450"; break;
}
- run("muxcover " + muxcover_args, "('-minmuxf' only)");
+ run("muxcover " + muxcover_args, "('-widemux' only)");
}
}
run("opt -full");
std::string techmap_args = " -map +/techmap.v";
if (help_mode)
techmap_args += " [-map +/xilinx/mux_map.v]";
- else if (minmuxf > 0)
- techmap_args += stringf(" -D MIN_MUX_INPUTS=%d -map +/xilinx/mux_map.v", minmuxf);
+ else if (widemux > 0)
+ techmap_args += stringf(" -D MIN_MUX_INPUTS=%d -map +/xilinx/mux_map.v", widemux);
if (help_mode)
techmap_args += " [-map +/xilinx/arith_map.v]";
else if (!nocarry) {
if (check_label("map_cells")) {
std::string techmap_args = "-map +/techmap.v -D _ABC -map +/xilinx/cells_map.v";
- if (minmuxf > 0)
- techmap_args += stringf(" -D MIN_MUX_INPUTS=%d", minmuxf);
+ if (widemux > 0)
+ techmap_args += stringf(" -D MIN_MUX_INPUTS=%d", widemux);
run("techmap " + techmap_args);
run("clean");
}