diff options
Diffstat (limited to 'techlibs/common/synth.cc')
-rw-r--r-- | techlibs/common/synth.cc | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/techlibs/common/synth.cc b/techlibs/common/synth.cc index 11ebe533..efb21475 100644 --- a/techlibs/common/synth.cc +++ b/techlibs/common/synth.cc @@ -29,7 +29,7 @@ struct SynthPass : public ScriptPass { SynthPass() : ScriptPass("synth", "generic synthesis script") { } - virtual void help() YS_OVERRIDE + void help() YS_OVERRIDE { // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| log("\n"); @@ -64,6 +64,9 @@ struct SynthPass : public ScriptPass log(" -nordff\n"); log(" passed to 'memory'. prohibits merging of FFs into memory read ports\n"); log("\n"); + log(" -noshare\n"); + log(" do not run SAT-based resource sharing\n"); + log("\n"); log(" -run <from_label>[:<to_label>]\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"); @@ -76,9 +79,9 @@ struct SynthPass : public ScriptPass } string top_module, fsm_opts, memory_opts; - bool autotop, flatten, noalumacc, nofsm, noabc; + bool autotop, flatten, noalumacc, nofsm, noabc, noshare; - virtual void clear_flags() YS_OVERRIDE + void clear_flags() YS_OVERRIDE { top_module.clear(); fsm_opts.clear(); @@ -89,9 +92,10 @@ struct SynthPass : public ScriptPass noalumacc = false; nofsm = false; noabc = false; + noshare = false; } - virtual void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE + void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE { string run_from, run_to; clear_flags(); @@ -142,6 +146,10 @@ struct SynthPass : public ScriptPass memory_opts += " -nordff"; continue; } + if (args[argidx] == "-noshare") { + noshare = true; + continue; + } break; } extra_args(args, argidx, design); @@ -157,7 +165,7 @@ struct SynthPass : public ScriptPass log_pop(); } - virtual void script() YS_OVERRIDE + void script() YS_OVERRIDE { if (check_label("begin")) { @@ -186,7 +194,8 @@ struct SynthPass : public ScriptPass run("wreduce"); if (!noalumacc) run("alumacc"); - run("share"); + if (!noshare) + run("share"); run("opt"); if (!nofsm) run("fsm" + fsm_opts); |