diff --git a/kernel/driver.cc b/kernel/driver.cc index 461e06cf9..613f98ad4 100644 --- a/kernel/driver.cc +++ b/kernel/driver.cc @@ -206,7 +206,34 @@ int main(int argc, char **argv) cxxopts::Options options(argv[0], "Yosys Open SYnthesis Suite"); - options.add_options() + options.add_options("functional") + ("b,backend", "use for the output file specified on the command line", + cxxopts::value(), "") + ("f,frontend", "use for the input files on the command line", + cxxopts::value(), "") + ("s,scriptfile", "execute the commands in ", + cxxopts::value(), "") + ("c,tcl-scriptfile", "execute the commands in the TCL (see 'help tcl' for details)", + cxxopts::value(),"") + ("C,tcl-interactive", "enters TCL interactive shell mode") + ("p,commands", "execute (to chain commands, separate them with semicolon + whitespace: 'cmd1; cmd2')", + cxxopts::value>(), "") + ("m,plugin", "load the specified module", + cxxopts::value>(), "") + ("D,define", "set the specified Verilog define to if supplied via command \"read -define\"", + cxxopts::value>(), "[=]") + ("S,synth", "shortcut for calling the \"synth\" command, a default script for transforming " \ + "the Verilog input to a gate-level netlist. For example: " \ + "yosys -o output.blif -S input.v " \ + "For more complex synthesis jobs it is recommended to use the read_* and write_* " \ + "commands in a script file instead of specifying input and output files on the " \ + "command line.") + ("infile", "input files", cxxopts::value>()) + ; + options.add_options("logging") + ("H", "print the command list") + ("h,help", "print this help message. If given, print help for .", + cxxopts::value(), "[]") ("Q", "suppress printing of banner (copyright, disclaimer, version)") ("T", "suppress printing of footer (log hash, version, timing statistics)") ("q,quiet", "quiet operation. Only write warnings and error messages to console. " \ @@ -222,29 +249,6 @@ int main(int argc, char **argv) cxxopts::value>(), "") ("o,outfile", "write the design to on exit", cxxopts::value(), "") - ("b,backend", "use for the output file specified on the command line", - cxxopts::value(), "") - ("f,frontend", "use for the input files on the command line", - cxxopts::value(), "") - ("H", "print the command list") - ("h,help", "print this help message. If given, print help for .", - cxxopts::value(), "[]") - ("s,scriptfile", "execute the commands in ", - cxxopts::value(), "") - ("c,tcl-scriptfile", "execute the commands in the TCL (see 'help tcl' for details)", - cxxopts::value(),"") - ("C,tcl-interactive", "enters TCL interactive shell mode") - ("p,commands", "execute (to chain commands, separate them with semicolon + whitespace: 'cmd1; cmd2')", - cxxopts::value>(), "") - ("m,plugin", "load the specified module", - cxxopts::value>(), "") - ("X,trace", "enable tracing of core data structure changes. for debugging") - ("M,randomize-pointers", "will slightly randomize allocated pointer addresses. for debugging") - ("A,abort", "will call abort() at the end of the script. for debugging") - ("r,top", "elaborate the specified HDL module", - cxxopts::value(), "") - ("D,define", "set the specified Verilog define to if supplied via command \"read -define\"", - cxxopts::value>(), "[=]") ("P,dump-design", "dump the design when printing the specified log header to a file. " \ "yosys_dump_.il is used as filename if none is specified. " \ "Use 'ALL' as to dump at every header.", @@ -257,19 +261,19 @@ int main(int argc, char **argv) cxxopts::value>(), "") ("E,deps-file", "write a Makefile dependencies file with input and output file names", cxxopts::value(), "") + ("V,version", "print version information and exit") + ; + options.add_options("developer") + ("X,trace", "enable tracing of core data structure changes. for debugging") + ("M,randomize-pointers", "will slightly randomize allocated pointer addresses. for debugging") + ("A,abort", "will call abort() at the end of the script. for debugging") + ("r,top", "elaborate the specified HDL module", + cxxopts::value(), "") ("x,experimental", "do not print warnings for the experimental ", cxxopts::value>(), "") ("g,debug", "globally enable debug log messages") - ("V,version", "print version information and exit") - ("S,synth", "shortcut for calling the \"synth\" command, a default script for transforming " \ - "the Verilog input to a gate-level netlist. For example: " \ - "yosys -o output.blif -S input.v " \ - "For more complex synthesis jobs it is recommended to use the read_* and write_* " \ - "commands in a script file instead of specifying input and output files on the " \ - "command line.") ("perffile", "write a JSON performance log to ", cxxopts::value(), "") - ("infile", "input files", cxxopts::value>()) - ; + ; options.parse_positional({"infile"}); options.positional_help("[ [..]]");