From 9465b2af95a146f514fc1e0b2d31bc3d9a233fb7 Mon Sep 17 00:00:00 2001 From: KrystalDelusion Date: Wed, 24 Aug 2022 10:28:27 +1200 Subject: Fitting help messages to 80 character width Uses the regex below to search (using vscode): ^\t\tlog\("(.{10,}(?\n"); log(" }\n"); log("\n"); - log("The \"offset\" and \"upto\" fields are skipped if their value would be 0."); - log("They don't affect connection semantics, and are only used to preserve original"); + log("The \"offset\" and \"upto\" fields are skipped if their value would be 0.\n"); + log("They don't affect connection semantics, and are only used to preserve original\n"); log("HDL bit indexing."); log("And is:\n"); log("\n"); @@ -459,8 +459,8 @@ struct JsonBackend : public Backend { log("connected to a constant driver are denoted as string \"0\", \"1\", \"x\", or\n"); log("\"z\" instead of a number.\n"); log("\n"); - log("Bit vectors (including integers) are written as string holding the binary"); - log("representation of the value. Strings are written as strings, with an appended"); + log("Bit vectors (including integers) are written as string holding the binary\n"); + log("representation of the value. Strings are written as strings, with an appended\n"); log("blank in cases of strings of the form /[01xz]* */.\n"); log("\n"); log("For example the following Verilog code:\n"); diff --git a/backends/verilog/verilog_backend.cc b/backends/verilog/verilog_backend.cc index aa1d4558c..e60ebc70e 100644 --- a/backends/verilog/verilog_backend.cc +++ b/backends/verilog/verilog_backend.cc @@ -2160,7 +2160,8 @@ struct VerilogBackend : public Backend { log(" as binary numbers.\n"); log("\n"); log(" -simple-lhs\n"); - log(" Connection assignments with simple left hand side without concatenations.\n"); + log(" Connection assignments with simple left hand side without\n"); + log(" concatenations.\n"); log("\n"); log(" -extmem\n"); log(" instead of initializing memories using assignments to individual\n"); diff --git a/frontends/rpc/rpc_frontend.cc b/frontends/rpc/rpc_frontend.cc index c12640ef0..ec3952661 100644 --- a/frontends/rpc/rpc_frontend.cc +++ b/frontends/rpc/rpc_frontend.cc @@ -383,12 +383,12 @@ struct RpcFrontend : public Pass { log(" request for the module to be derived for a specific set of\n"); log(" parameters. starts with \\ for named parameters, and with $\n"); log(" for unnamed parameters, which are numbered starting at 1.\n"); - log(" for integer parameters is always specified as a binary string of unlimited\n"); - log(" precision. the returned by the frontend is hygienically parsed\n"); - log(" by a built-in Yosys , allowing the RPC frontend to return any\n"); - log(" convenient representation of the module. the derived module is cached,\n"); - log(" so the response should be the same whenever the same set of parameters\n"); - log(" is provided.\n"); + log(" for integer parameters is always specified as a binary string of\n"); + log(" unlimited precision. the returned by the frontend is\n"); + log(" hygienically parsedby a built-in Yosys , allowing the RPC\n"); + log(" frontend to return anyconvenient representation of the module. the\n"); + log(" derived module is cached,so the response should be the same whenever the\n"); + log(" same set of parameters is provided.\n"); } void execute(std::vector args, RTLIL::Design *design) override { diff --git a/passes/cmds/bugpoint.cc b/passes/cmds/bugpoint.cc index 7b621504d..e666023fa 100644 --- a/passes/cmds/bugpoint.cc +++ b/passes/cmds/bugpoint.cc @@ -34,10 +34,10 @@ struct BugpointPass : public Pass { log("\n"); log("This command minimizes the current design that is known to crash Yosys with the\n"); log("given script into a smaller testcase. It does this by removing an arbitrary part\n"); - log("of the design and recursively invokes a new Yosys process with this modified design\n"); - log("and the same script, repeating these steps while it can find a smaller design that\n"); - log("still causes a crash. Once this command finishes, it replaces the current design\n"); - log("with the smallest testcase it was able to produce.\n"); + log("of the design and recursively invokes a new Yosys process with this modified\n"); + log("design and the same script, repeating these steps while it can find a smaller\n"); + log("design that still causes a crash. Once this command finishes, it replaces the\n"); + log("current design with the smallest testcase it was able to produce.\n"); log("In order to save the reduced testcase you must write this out to a file with\n"); log("another command after `bugpoint` like `write_rtlil` or `write_verilog`.\n"); log("\n"); diff --git a/passes/cmds/chformal.cc b/passes/cmds/chformal.cc index d813a449c..66044b161 100644 --- a/passes/cmds/chformal.cc +++ b/passes/cmds/chformal.cc @@ -32,8 +32,8 @@ struct ChformalPass : public Pass { log(" chformal [types] [mode] [options] [selection]\n"); log("\n"); log("Make changes to the formal constraints of the design. The [types] options\n"); - log("the type of constraint to operate on. If none of the following options are given,\n"); - log("the command will operate on all constraint types:\n"); + log("the type of constraint to operate on. If none of the following options are\n"); + log("given, the command will operate on all constraint types:\n"); log("\n"); log(" -assert $assert cells, representing assert(...) constraints\n"); log(" -assume $assume cells, representing assume(...) constraints\n"); diff --git a/passes/cmds/exec.cc b/passes/cmds/exec.cc index f00629a02..c15ef23bf 100644 --- a/passes/cmds/exec.cc +++ b/passes/cmds/exec.cc @@ -46,8 +46,8 @@ struct ExecPass : public Pass { log("\n"); log("Execute a command in the operating system shell. All supplied arguments are\n"); log("concatenated and passed as a command to popen(3). Whitespace is not guaranteed\n"); - log("to be preserved, even if quoted. stdin and stderr are not connected, while stdout is\n"); - log("logged unless the \"-q\" option is specified.\n"); + log("to be preserved, even if quoted. stdin and stderr are not connected, while\n"); + log("stdout is logged unless the \"-q\" option is specified.\n"); log("\n"); log("\n"); log(" -q\n"); diff --git a/passes/cmds/glift.cc b/passes/cmds/glift.cc index b398c3e04..439ded076 100644 --- a/passes/cmds/glift.cc +++ b/passes/cmds/glift.cc @@ -431,45 +431,46 @@ struct GliftPass : public Pass { log("\n"); log(" glift [options] [selection]\n"); log("\n"); - log("Augments the current or specified module with gate-level information flow tracking\n"); - log("(GLIFT) logic using the \"constructive mapping\" approach. Also can set up QBF-SAT\n"); - log("optimization problems in order to optimize GLIFT models or trade off precision and\n"); - log("complexity.\n"); + log("Augments the current or specified module with gate-level information flow \n"); + log("tracking (GLIFT) logic using the \"constructive mapping\" approach. Also can set\n"); + log("up QBF-SAT optimization problems in order to optimize GLIFT models or trade off\n"); + log("precision and complexity.\n"); log("\n"); log("\n"); log("Commands:\n"); log("\n"); log(" -create-precise-model\n"); - log(" Replaces the current or specified module with one that has corresponding \"taint\"\n"); - log(" inputs, outputs, and internal nets along with precise taint tracking logic.\n"); - log(" For example, precise taint tracking logic for an AND gate is:\n"); + log(" Replaces the current or specified module with one that has corresponding\n"); + log(" \"taint\" inputs, outputs, and internal nets along with precise taint\n"); + log(" tracking logic. For example, precise taint tracking logic for an AND gate\n"); + log(" is:\n"); log("\n"); log(" y_t = a & b_t | b & a_t | a_t & b_t\n"); log("\n"); log("\n"); log(" -create-imprecise-model\n"); - log(" Replaces the current or specified module with one that has corresponding \"taint\"\n"); - log(" inputs, outputs, and internal nets along with imprecise \"All OR\" taint tracking\n"); - log(" logic:\n"); + log(" Replaces the current or specified module with one that has corresponding\n"); + log(" \"taint\" inputs, outputs, and internal nets along with imprecise \"All OR\"\n"); + log(" taint tracking logic:\n"); log("\n"); log(" y_t = a_t | b_t\n"); log("\n"); log("\n"); log(" -create-instrumented-model\n"); - log(" Replaces the current or specified module with one that has corresponding \"taint\"\n"); - log(" inputs, outputs, and internal nets along with 4 varying-precision versions of taint\n"); - log(" tracking logic. Which version of taint tracking logic is used for a given gate is\n"); - log(" determined by a MUX selected by an $anyconst cell. By default, unless the\n"); - log(" `-no-cost-model` option is provided, an additional wire named `__glift_weight` with\n"); - log(" the `keep` and `minimize` attributes is added to the module along with pmuxes and\n"); - log(" adders to calculate a rough estimate of the number of logic gates in the GLIFT model\n"); - log(" given an assignment for the $anyconst cells. The four versions of taint tracking logic\n"); - log(" for an AND gate are:"); - log("\n"); - log(" y_t = a & b_t | b & a_t | a_t & b_t (like `-create-precise-model`)\n"); + log(" Replaces the current or specified module with one that has corresponding\n"); + log(" \"taint\" inputs, outputs, and internal nets along with 4 varying-precision\n"); + log(" versions of taint tracking logic. Which version of taint tracking logic is\n"); + log(" used for a given gate is determined by a MUX selected by an $anyconst cell.\n"); + log(" By default, unless the `-no-cost-model` option is provided, an additional\n"); + log(" wire named `__glift_weight` with the `keep` and `minimize` attributes is\n"); + log(" added to the module along with pmuxes and adders to calculate a rough\n"); + log(" estimate of the number of logic gates in the GLIFT model given an assignment\n"); + log(" for the $anyconst cells. The four versions of taint tracking logic for an\n"); + log(" AND gate are:\n"); + log(" y_t = a & b_t | b & a_t | a_t & b_t (like `-create-precise-model`)\n"); log(" y_t = a_t | a & b_t\n"); log(" y_t = b_t | b & a_t\n"); - log(" y_t = a_t | b_t (like `-create-imprecise-model`)\n"); + log(" y_t = a_t | b_t (like `-create-imprecise-model`)\n"); log("\n"); log("\n"); log("Options:\n"); @@ -479,27 +480,30 @@ struct GliftPass : public Pass { log(" (default: label constants as un-tainted)\n"); log("\n"); log(" -keep-outputs\n"); - log(" Do not remove module outputs. Taint tracking outputs will appear in the module ports\n"); - log(" alongside the orignal outputs.\n"); + log(" Do not remove module outputs. Taint tracking outputs will appear in the\n"); + log(" module ports alongside the orignal outputs.\n"); log(" (default: original module outputs are removed)\n"); log("\n"); log(" -simple-cost-model\n"); - log(" Do not model logic area. Instead model the number of non-zero assignments to $anyconsts.\n"); - log(" Taint tracking logic versions vary in their size, but all reduced-precision versions are\n"); - log(" significantly smaller than the fully-precise version. A non-zero $anyconst assignment means\n"); - log(" that reduced-precision taint tracking logic was chosen for some gate.\n"); - log(" Only applicable in combination with `-create-instrumented-model`.\n"); - log(" (default: use a complex model and give that wire the \"keep\" and \"minimize\" attributes)\n"); + log(" Do not model logic area. Instead model the number of non-zero assignments to\n"); + log(" $anyconsts. Taint tracking logic versions vary in their size, but all\n"); + log(" reduced-precision versions are significantly smaller than the fully-precise\n"); + log(" version. A non-zero $anyconst assignment means that reduced-precision taint\n"); + log(" tracking logic was chosen for some gate. Only applicable in combination with\n"); + log(" `-create-instrumented-model`. (default: use a complex model and give that\n"); + log(" wire the \"keep\" and \"minimize\" attributes)\n"); log("\n"); log(" -no-cost-model\n"); - log(" Do not model taint tracking logic area and do not create a `__glift_weight` wire.\n"); - log(" Only applicable in combination with `-create-instrumented-model`.\n"); - log(" (default: model area and give that wire the \"keep\" and \"minimize\" attributes)\n"); + log(" Do not model taint tracking logic area and do not create a `__glift_weight`\n"); + log(" wire. Only applicable in combination with `-create-instrumented-model`.\n"); + log(" (default: model area and give that wire the \"keep\" and \"minimize\"\n"); + log(" attributes)\n"); log("\n"); log(" -instrument-more\n"); - log(" Allow choice from more versions of (even simpler) taint tracking logic. A total\n"); - log(" of 8 versions of taint tracking logic will be added per gate, including the 4\n"); - log(" versions from `-create-instrumented-model` and these additional versions:\n"); + log(" Allow choice from more versions of (even simpler) taint tracking logic. A\n"); + log(" total of 8 versions of taint tracking logic will be added per gate,\n"); + log(" including the 4 versions from `-create-instrumented-model` and these\n"); + log(" additional versions:\n"); log("\n"); log(" y_t = a_t\n"); log(" y_t = b_t\n"); diff --git a/passes/cmds/logcmd.cc b/passes/cmds/logcmd.cc index f1702400d..20cbd8943 100644 --- a/passes/cmds/logcmd.cc +++ b/passes/cmds/logcmd.cc @@ -38,8 +38,9 @@ struct LogPass : public Pass { log("logfiles.\n"); log("\n"); log(" -stdout\n"); - log(" Print the output to stdout too. This is useful when all Yosys is executed\n"); - log(" with a script and the -q (quiet operation) argument to notify the user.\n"); + log(" Print the output to stdout too. This is useful when all Yosys is\n"); + log(" executed with a script and the -q (quiet operation) argument to notify\n"); + log(" the user.\n"); log("\n"); log(" -stderr\n"); log(" Print the output to stderr too.\n"); diff --git a/passes/cmds/scratchpad.cc b/passes/cmds/scratchpad.cc index 015eb97e7..aecc4c17d 100644 --- a/passes/cmds/scratchpad.cc +++ b/passes/cmds/scratchpad.cc @@ -49,7 +49,8 @@ struct ScratchpadPass : public Pass { log(" copy the value of the first identifier to the second identifier.\n"); log("\n"); log(" -assert \n"); - log(" assert that the entry for the given identifier is set to the given value.\n"); + log(" assert that the entry for the given identifier is set to the given\n"); + log(" value.\n"); log("\n"); log(" -assert-set \n"); log(" assert that the entry for the given identifier exists.\n"); diff --git a/passes/cmds/select.cc b/passes/cmds/select.cc index b112b145c..fdf56641c 100644 --- a/passes/cmds/select.cc +++ b/passes/cmds/select.cc @@ -1125,7 +1125,7 @@ struct SelectPass : public Pass { log(" \n"); log(" select the specified object(s) from the current module\n"); log("\n"); - log("By default, patterns will not match black/white-box modules or their"); + log("By default, patterns will not match black/white-box modules or their\n"); log("contents. To include such objects, prefix the pattern with '='.\n"); log("\n"); log("A can be a module name, wildcard expression (*, ?, [..])\n"); diff --git a/passes/hierarchy/submod.cc b/passes/hierarchy/submod.cc index c0c40671d..8476d392c 100644 --- a/passes/hierarchy/submod.cc +++ b/passes/hierarchy/submod.cc @@ -348,8 +348,8 @@ struct SubmodPass : public Pass { log("\n"); log(" -hidden\n"); log(" instead of creating submodule ports with public names, create ports with\n"); - log(" private names so that a subsequent 'flatten; clean' call will restore the\n"); - log(" original module with original public names.\n"); + log(" private names so that a subsequent 'flatten; clean' call will restore\n"); + log(" the original module with original public names.\n"); log("\n"); } void execute(std::vector args, RTLIL::Design *design) override diff --git a/passes/memory/memory_bram.cc b/passes/memory/memory_bram.cc index b1f45d5fc..1cb50b3ea 100644 --- a/passes/memory/memory_bram.cc +++ b/passes/memory/memory_bram.cc @@ -1245,7 +1245,8 @@ struct MemoryBramPass : public Pass { log("greater than 1 share the same configuration bit.\n"); log("\n"); log("Using the same bram name in different bram blocks will create different variants\n"); - log("of the bram. Verilog configuration parameters for the bram are created as needed.\n"); + log("of the bram. Verilog configuration parameters for the bram are created as\n"); + log("needed.\n"); log("\n"); log("It is also possible to create variants by repeating statements in the bram block\n"); log("and appending '@