diff --git a/kernel/driver.cc b/kernel/driver.cc index 461e06cf99a..613f98ad450 100644 --- a/kernel/driver.cc +++ b/kernel/driver.cc @@ -206,29 +206,11 @@ int main(int argc, char **argv) cxxopts::Options options(argv[0], "Yosys Open SYnthesis Suite"); - options.add_options() - ("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. " \ - "Use this option twice to also quiet warning messages") - ("v,verbose", "print log headers up to to the console. " \ - "Implies -q for everything except the 'End of script.' message.", - cxxopts::value(), "") - ("t,timestamp", "annotate all log messages with a time stamp") - ("d,detailed-timing", "print more detailed timing stats at exit") - ("l,logfile", "write log messages to ", - cxxopts::value>(), "") - ("L,line-buffered-logfile", "like -l but open in line buffered mode", - cxxopts::value>(), "") - ("o,outfile", "write the design to on exit", - cxxopts::value(), "") + 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(), "") - ("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)", @@ -238,13 +220,35 @@ int main(int argc, char **argv) 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>(), "[=]") + ("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. " \ + "Use this option twice to also quiet warning messages") + ("v,verbose", "print log headers up to to the console. " \ + "Implies -q for everything except the 'End of script.' message.", + cxxopts::value(), "") + ("t,timestamp", "annotate all log messages with a time stamp") + ("d,detailed-timing", "print more detailed timing stats at exit") + ("l,logfile", "write log messages to ", + cxxopts::value>(), "") + ("L,line-buffered-logfile", "like -l but open in line buffered mode", + cxxopts::value>(), "") + ("o,outfile", "write the design to on exit", + 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("[ [..]]");