From af561800edc1d98c33fe057d5c02898460c9d6b9 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 28 Feb 2013 13:59:49 +0100 Subject: Added online help for "show" and "hierarchy" commands --- passes/hierarchy/hierarchy.cc | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'passes/hierarchy/hierarchy.cc') diff --git a/passes/hierarchy/hierarchy.cc b/passes/hierarchy/hierarchy.cc index c8cd77a1..9ba1594d 100644 --- a/passes/hierarchy/hierarchy.cc +++ b/passes/hierarchy/hierarchy.cc @@ -139,7 +139,30 @@ static void hierarchy(RTLIL::Design *design, RTLIL::Module *top) } struct HierarchyPass : public Pass { - HierarchyPass() : Pass("hierarchy") { } + HierarchyPass() : Pass("hierarchy", "check, expand and clean up design hierarchy") { } + virtual void help() + { + // |---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---|---v---| + log("\n"); + log(" hierarchy [-check] [-top ]\n"); + log("\n"); + log("In parametric designs, a module might exists in serveral variations with\n"); + log("different parameter values. This pass looks at all modules in the current\n"); + log("design an re-runs the language frontends for the parametric modules as\n"); + log("needed.\n"); + log("\n"); + log(" -check\n"); + log(" also check the design hierarchy. this generates an error when\n"); + log(" an unknown module is used as cell type.\n"); + log("\n"); + log(" -top \n"); + log(" use the specified top module to built a design hierarchy. modules\n"); + log(" outside this tree (unused modules) are removed.\n"); + log("\n"); + log("This pass ignores the current selection and always operates on all modules\n"); + log("in the current design.\n"); + log("\n"); + } virtual void execute(std::vector args, RTLIL::Design *design) { log_header("Executing HIERARCHY pass (removing modules outside design hierarchy).\n"); @@ -165,9 +188,8 @@ struct HierarchyPass : public Pass { log_cmd_error("Module `%s' not found!\n", args[argidx].c_str()); continue; } - break; + log_cmd_error("Unkown option %s.\n", args[argidx].c_str()); } - extra_args(args, argidx, design); if (top_mod != NULL) hierarchy(design, top_mod); -- cgit v1.2.3