diff options
author | Clifford Wolf <clifford@clifford.at> | 2013-03-01 09:26:29 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2013-03-01 09:26:29 +0100 |
commit | f952309c81afcb467eb367ec519ec12876fb0983 (patch) | |
tree | eb56d924efba8b36cbe03512e163c1f79e3744ea /passes/proc/proc_clean.cc | |
parent | 36954471a6f385bda835b2a4e5751764bb146aac (diff) | |
download | yosys-f952309c81afcb467eb367ec519ec12876fb0983.tar.gz yosys-f952309c81afcb467eb367ec519ec12876fb0983.tar.bz2 yosys-f952309c81afcb467eb367ec519ec12876fb0983.zip |
Added help messages to proc_* passes
Diffstat (limited to 'passes/proc/proc_clean.cc')
-rw-r--r-- | passes/proc/proc_clean.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/passes/proc/proc_clean.cc b/passes/proc/proc_clean.cc index ec9fade30..e247f2882 100644 --- a/passes/proc/proc_clean.cc +++ b/passes/proc/proc_clean.cc @@ -130,7 +130,17 @@ static void proc_clean(RTLIL::Module *mod, RTLIL::Process *proc, int &total_coun } struct ProcCleanPass : public Pass { - ProcCleanPass() : Pass("proc_clean") { } + ProcCleanPass() : Pass("proc_clean", "remove empty parts of processes") { } + virtual void help() + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" proc_clean [selection]\n"); + log("\n"); + log("This pass removes empty parts of processes and ultimately removes a process\n"); + log("if it contains only empty structures.\n"); + log("\n"); + } virtual void execute(std::vector<std::string> args, RTLIL::Design *design) { int total_count = 0; @@ -140,7 +150,11 @@ struct ProcCleanPass : public Pass { for (auto &mod_it : design->modules) { std::vector<std::string> delme; + if (!design->selected(mod_it.second)) + continue; for (auto &proc_it : mod_it.second->processes) { + if (!design->selected(mod_it.second, proc_it.second)) + continue; proc_clean(mod_it.second, proc_it.second, total_count); if (proc_it.second->syncs.size() == 0 && proc_it.second->root_case.switches.size() == 0 && proc_it.second->root_case.actions.size() == 0) { |