Merge remote-tracking branch 'origin/eddie/synth_keepdc' into xc7mux

This commit is contained in:
Eddie Hung 2019-07-08 19:21:53 -07:00
commit 9ac078be6f
4 changed files with 25 additions and 8 deletions

View File

@ -12,6 +12,7 @@ Yosys 0.9 .. Yosys 0.9-dev
- Added "synth_xilinx -abc9" (experimental)
- Added "synth_ice40 -abc9" (experimental)
- Added "synth -abc9" (experimental)
- Added "synth -keepdc"
- Added "script -scriptwire
- "synth_xilinx" to now infer wide multiplexers (-widemux <min> to enable)

View File

@ -497,7 +497,7 @@ struct WreducePass : public Pass {
log(" flows that use the 'memory_memx' pass.\n");
log("\n");
log(" -keepdc\n");
log(" Do not optimize explicit don't-care values.\n");
log(" Do not optimize explicit don't-care values on $mux cells.\n");
log("\n");
}
void execute(std::vector<std::string> args, Design *design) YS_OVERRIDE

View File

@ -631,11 +631,16 @@ struct MuxcoverPass : public Pass {
log("\n");
log("Cover trees of $_MUX_ cells with $_MUX{4,8,16}_ cells\n");
log("\n");
log(" -mux2=cost, -mux4[=cost], -mux8[=cost], -mux16[=cost]\n");
log(" Use the specified types of MUXes (with optional integer costs). If none\n");
log(" of these options are given, the effect is the same as if all of them are.\n");
log(" Default costs: $_MUX_ = %d, $_MUX4_ = %d,\n", COST_MUX2, COST_MUX4);
log(" $_MUX8_ = %d, $_MUX16_ = %d\n", COST_MUX8, COST_MUX16);
log(" -mux4[=cost], -mux8[=cost], -mux16[=cost]\n");
log(" Cover $_MUX_ trees using the specified types of MUXes (with optional\n");
log(" integer costs). If none of these options are given, the effect is the\n");
log(" same as if all of them are.\n");
log(" Default costs: $_MUX4_ = %d, $_MUX8_ = %d, \n", COST_MUX4, COST_MUX8);
log(" $_MUX16_ = %d\n", COST_MUX16);
log("\n");
log(" -mux2=cost\n");
log(" Use the specified cost for $_MUX_ cells when making covering decisions.\n");
log(" Default cost: $_MUX_ = %d\n", COST_MUX2);
log("\n");
log(" -dmux=cost\n");
log(" Use the specified cost for $_MUX_ cells used in decoders.\n");

View File

@ -78,6 +78,9 @@ struct SynthPass : public ScriptPass
log(" -abc9\n");
log(" use new ABC9 flow (EXPERIMENTAL)\n");
log("\n");
log(" -keepdc\n");
log(" do not optimize explicit don't-care values on $mux cells.\n");
log("\n");
log("\n");
log("The following commands are executed by this synthesis command:\n");
help_script();
@ -85,7 +88,7 @@ struct SynthPass : public ScriptPass
}
string top_module, fsm_opts, memory_opts, abc;
bool autotop, flatten, noalumacc, nofsm, noabc, noshare;
bool autotop, flatten, noalumacc, nofsm, noabc, noshare, keepdc;
int lut;
void clear_flags() YS_OVERRIDE
@ -102,6 +105,7 @@ struct SynthPass : public ScriptPass
noabc = false;
noshare = false;
abc = "abc";
keepdc = false;
}
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
@ -167,6 +171,10 @@ struct SynthPass : public ScriptPass
abc = "abc9";
continue;
}
if (args[argidx] == "-keepdc") {
keepdc = true;
continue;
}
break;
}
extra_args(args, argidx, design);
@ -211,7 +219,10 @@ struct SynthPass : public ScriptPass
run("opt_clean");
run("check");
run("opt");
run("wreduce");
if (help_mode)
run("wreduce [-keepdc]");
else
run("wreduce" + std::string(keepdc ? " -keepdc" : ""));
run("peepopt");
run("opt_clean");
if (help_mode)