Command Line Reference
Reference information about all command line options.
Display help text about command line options and exit.
Display slang version information and exit.
Don't print non-essential output status.
Paths to files that should be included in the compilation.
Causes the tool to treat all input files as being part of a single compilation unit. By default all files are considered to be separate compilation units and ordering between them does not matter. When this option is provided, all files are concatenated together, in order, to produce a single compilation unit.
Adds a file to the compilation, like a positional argument, except that the file is considered to be a Verilog library. Libraries are always their own compilation unit even when compiling with
--single-unit, and modules within them are never automatically instantiated.
These options control what action the tool will perform when run. They are mutually exclusive. If none of these are provided, the default action is to elaborate the design, print any diagnostics, and exit.
Treat all files as a single input file (as if
--single-unit had been passed), run the preprocessor on them, and then print the preprocessed text to stdout. If errors occur during preprocessing, they will be printed instead of the preprocessed text.
Run the preprocessor on all input files, print out any macros that are discovered, and exit. No diagnostics will be printed.
Perform parsing of all input files but don't perform type checking and elaboration. All diagnostics encountered will be printed.
Add the given directory path to the list of directories searched by `include directives that use quotes to specify the path.
Add the given directory path to the list of directories searched by `include directives that use angle brackets to specify the path.
Define <macro> to <value> (or
1 if <value> is ommitted) at the start of all source files. Example:
slang -DFOO=2 -DBAR=asdf -D BAZ=3
Undefine the given macro at the start of all source files.
When running in preprocessor-only mode (using
-E) include comments in the preprocessed output text.
When running in preprocessor-only mode (using
-E) include directives in the preprocessed output text.
Set the maximum depth of nested include files. Exceeding this limit will cause an error. The default is 1024.
Set the maximum depth of nested language elements. This is a measure of the depth of the parsing stack, which is checked against this limit to avoid stack overflows. The default is 1024.
Set the maximum number of errors that can occur during lexing before the rest of the file is skipped. The default is 64.
Add the given directory path to the list of directories searched when an unknown module instantiation is encountered. Combined with
--libext, files are automatically included based on the name of the module being instantiated.
Add the given extension to the list of extensions tried when searching for files to satisfy unknown module instantiations. This list automatically includes '.v' and '.sv' by default.
Dump the compiled AST in JSON format to the specified file, or '-' for stdout.
When dumping AST to JSON, include only the scope (or symbol) specified by the given hierarchical path. This option can be specified more than once to include more than one scope. If not provided, all symbols are dumped.
Specifies the name of a module that should be instantiated at the root of the design. Can be specified more than once to instantiate multiple top-level modules. The module specified must not have any non-defaulted parameters or interface ports.
If no top modules are specified manually, they will be automatically inferred by finding all modules that are not instantiated elsewhere in the design.
Set the maximum depth of the design hierarchy. Used to detect infinite module instantiation recursion. The default is 512.
Set the maximum number of steps that can occur during generate block evaluation before giving up. Used to detect infinite generate loops. The default is 65535.
Set the maximum depth of the constant evaluation call stack. Used to detect infinite recursion during constant evaluation. The default is 256.
Set the maximum number of steps that can occur during constant evaluation before giving up. Used to detect infinite constant evaluation loops. The default is 100000.
Set the maximum number of frames to show when printing a constant evaluation backtrace in diagnostics; the rest will be abbreviated to avoid spamming output. The default is 10.
Select which expressions in min:typ:max triplets should be processed as part of the compilation. By default this will be the "typical", or middle expression.
Override all parameters with the given name in top-level modules to the provided value. This option can be specified more than once to override multiple parameters.
Always print diagnostics in color. If this option is unset, colors will be enabled if a color-capable terminal is detected.
Set a limit on the number of errors that will be printed. Setting this to zero will disable the limit. The default is 64.
Don't issue an error for instantiations of unknown modules, interface, and programs.
Enable warning "foo". See TODO for a complete list of warnings that can be enabled this way.
Disable warning "foo".
Disable all warnings.
Enable all warnings.
Treat all warnings as errors.
Treat warning "foo" as an error.
Turn warning "foo" into a warning even if
-Werror is specified.