diff options
Diffstat (limited to 'passes')
-rw-r--r-- | passes/opt/opt.cc | 17 | ||||
-rw-r--r-- | passes/sat/sat.cc | 8 |
2 files changed, 16 insertions, 9 deletions
diff --git a/passes/opt/opt.cc b/passes/opt/opt.cc index 396819883..b852e6ae8 100644 --- a/passes/opt/opt.cc +++ b/passes/opt/opt.cc @@ -44,8 +44,8 @@ struct OptPass : public Pass { log(" opt_muxtree\n"); log(" opt_reduce [-fine] [-full]\n"); log(" opt_merge [-share_all]\n"); - log(" opt_share (-full only)\n"); - log(" opt_rmdff [-keepdc] [-sat]\n"); + log(" opt_share (-full only)\n"); + log(" opt_rmdff [-keepdc] [-sat] (except when called with -noff)\n"); log(" opt_clean [-purge]\n"); log(" opt_expr [-mux_undef] [-mux_bool] [-undriven] [-clkinv] [-fine] [-full] [-keepdc]\n"); log(" while <changed design>\n"); @@ -55,7 +55,7 @@ struct OptPass : public Pass { log(" do\n"); log(" opt_expr [-mux_undef] [-mux_bool] [-undriven] [-clkinv] [-fine] [-full] [-keepdc]\n"); log(" opt_merge [-share_all]\n"); - log(" opt_rmdff [-keepdc] [-sat]\n"); + log(" opt_rmdff [-keepdc] [-sat] (except when called with -noff)\n"); log(" opt_clean [-purge]\n"); log(" while <changed design in opt_rmdff>\n"); log("\n"); @@ -73,6 +73,7 @@ struct OptPass : public Pass { std::string opt_rmdff_args; bool opt_share = false; bool fast_mode = false; + bool noff_mode = false; log_header(design, "Executing OPT pass (performing simple optimizations).\n"); log_push(); @@ -127,6 +128,10 @@ struct OptPass : public Pass { fast_mode = true; continue; } + if (args[argidx] == "-noff") { + noff_mode = true; + continue; + } break; } extra_args(args, argidx, design); @@ -137,7 +142,8 @@ struct OptPass : public Pass { Pass::call(design, "opt_expr" + opt_expr_args); Pass::call(design, "opt_merge" + opt_merge_args); design->scratchpad_unset("opt.did_something"); - Pass::call(design, "opt_rmdff" + opt_rmdff_args); + if (!noff_mode) + Pass::call(design, "opt_rmdff" + opt_rmdff_args); if (design->scratchpad_get_bool("opt.did_something") == false) break; Pass::call(design, "opt_clean" + opt_clean_args); @@ -156,7 +162,8 @@ struct OptPass : public Pass { Pass::call(design, "opt_merge" + opt_merge_args); if (opt_share) Pass::call(design, "opt_share"); - Pass::call(design, "opt_rmdff" + opt_rmdff_args); + if (!noff_mode) + Pass::call(design, "opt_rmdff" + opt_rmdff_args); Pass::call(design, "opt_clean" + opt_clean_args); Pass::call(design, "opt_expr" + opt_expr_args); if (design->scratchpad_get_bool("opt.did_something") == false) diff --git a/passes/sat/sat.cc b/passes/sat/sat.cc index 6acdbc800..e2fe5b846 100644 --- a/passes/sat/sat.cc +++ b/passes/sat/sat.cc @@ -256,13 +256,13 @@ struct SatHelper { RTLIL::SigSpec big_lhs, big_rhs; - for (auto &it : module->wires_) + for (auto wire : module->wires()) { - if (it.second->attributes.count(ID::init) == 0) + if (wire->attributes.count(ID::init) == 0) continue; - RTLIL::SigSpec lhs = sigmap(it.second); - RTLIL::SigSpec rhs = it.second->attributes.at(ID::init); + RTLIL::SigSpec lhs = sigmap(wire); + RTLIL::SigSpec rhs = wire->attributes.at(ID::init); log_assert(lhs.size() == rhs.size()); RTLIL::SigSpec removed_bits; |