Add help for "-sat" option inside opt_rmdff. "opt" can pass "-sat" too
authorBogdan Vukobratovic <bogdan.vukobratovic@gmail.com>
Thu, 27 Jun 2019 20:06:23 +0000 (22:06 +0200)
committerBogdan Vukobratovic <bogdan.vukobratovic@gmail.com>
Thu, 27 Jun 2019 20:06:23 +0000 (22:06 +0200)
passes/opt/opt.cc
passes/opt/opt_rmdff.cc

index a4aca2fee2f82455fae4b6c220f945ca90418212..e9a43e0f32d96ff5fc68cfc8ff580a09db019043 100644 (file)
@@ -44,7 +44,7 @@ struct OptPass : public Pass {
                log("        opt_muxtree\n");
                log("        opt_reduce [-fine] [-full]\n");
                log("        opt_merge [-share_all]\n");
-               log("        opt_rmdff [-keepdc]\n");
+               log("        opt_rmdff [-keepdc] [-sat]\n");
                log("        opt_clean [-purge]\n");
                log("        opt_expr [-mux_undef] [-mux_bool] [-undriven] [-clkinv] [-fine] [-full] [-keepdc]\n");
                log("    while <changed design>\n");
@@ -54,7 +54,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]\n");
+               log("        opt_rmdff [-keepdc] [-sat]\n");
                log("        opt_clean [-purge]\n");
                log("    while <changed design in opt_rmdff>\n");
                log("\n");
@@ -112,6 +112,10 @@ struct OptPass : public Pass {
                                opt_rmdff_args += " -keepdc";
                                continue;
                        }
+                       if (args[argidx] == "-sat") {
+                               opt_rmdff_args += " -sat";
+                               continue;
+                       }
                        if (args[argidx] == "-share_all") {
                                opt_merge_args += " -share_all";
                                continue;
index 17e0d7cd44175fe91a4ab84bd0cb2556011dce6b..be6ac2d30a25b2e4688760817ec1b499e6584e9d 100644 (file)
@@ -549,6 +549,10 @@ struct OptRmdffPass : public Pass {
                log("This pass identifies flip-flops with constant inputs and replaces them with\n");
                log("a constant driver.\n");
                log("\n");
+               log("    -sat\n");
+               log("        additionally invoke SAT solver to detect and remove flip-flops (with \n");
+               log("        non-constant inputs) that can also be replaced with a constant driver\n");
+               log("\n");
        }
        void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
        {