summaryrefslogtreecommitdiff
path: root/passes/proc/proc_mux.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-03-01 09:26:29 +0100
committerClifford Wolf <clifford@clifford.at>2013-03-01 09:26:29 +0100
commitf952309c81afcb467eb367ec519ec12876fb0983 (patch)
treeeb56d924efba8b36cbe03512e163c1f79e3744ea /passes/proc/proc_mux.cc
parent36954471a6f385bda835b2a4e5751764bb146aac (diff)
Added help messages to proc_* passes
Diffstat (limited to 'passes/proc/proc_mux.cc')
-rw-r--r--passes/proc/proc_mux.cc18
1 files changed, 15 insertions, 3 deletions
diff --git a/passes/proc/proc_mux.cc b/passes/proc/proc_mux.cc
index 4d50597d..75ca4727 100644
--- a/passes/proc/proc_mux.cc
+++ b/passes/proc/proc_mux.cc
@@ -279,7 +279,17 @@ static void proc_mux(RTLIL::Module *mod, RTLIL::Process *proc)
}
struct ProcMuxPass : public Pass {
- ProcMuxPass() : Pass("proc_mux") { }
+ ProcMuxPass() : Pass("proc_mux", "convert decision trees to multiplexers") { }
+ virtual void help()
+ {
+ // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|
+ log("\n");
+ log(" proc_mux [selection]\n");
+ log("\n");
+ log("This pass converts the decision trees in processes (originating from if-else\n");
+ log("and case statements) to trees of multiplexer cells.\n");
+ log("\n");
+ }
virtual void execute(std::vector<std::string> args, RTLIL::Design *design)
{
log_header("Executing PROC_MUX pass (convert decision trees to multiplexers).\n");
@@ -287,8 +297,10 @@ struct ProcMuxPass : public Pass {
extra_args(args, 1, design);
for (auto &mod_it : design->modules)
- for (auto &proc_it : mod_it.second->processes)
- proc_mux(mod_it.second, proc_it.second);
+ if (design->selected(mod_it.second))
+ for (auto &proc_it : mod_it.second->processes)
+ if (design->selected(mod_it.second, proc_it.second))
+ proc_mux(mod_it.second, proc_it.second);
}
} ProcMuxPass;