struct
#include <slang/driver/Driver.h>
Options A container for various options that can be parsed and applied to the compilation process.
Include paths
- std::vector<std::string> includeDirs
- A list of include directories in which to search for files.
- std::vector<std::string> includeSystemDirs
- A list of system include directories in which to search for files.
- std::vector<std::string> libDirs
- A list of library directories in which to search for missing modules.
- std::vector<std::string> libExts
- A list of extensions that will be used to search for library files.
- flat_hash_set<std::string> excludeExts
- A set of extensions that will be used to exclude files.
- std::vector<std::string> ignoreDirectives
- A set of preprocessor directives to be ignored.
Preprocessing
- std::optional<uint32_t> maxIncludeDepth
- The maximum depth of included files before an error is issued.
- std::vector<std::string> defines
- A list of macros that should be defined in each compilation unit.
- std::vector<std::string> undefines
- A list of macros that should be undefined in each compilation unit.
- std::optional<bool> librariesInheritMacros
- If true, library files will inherit macro definitions from primary source files.
Parsing
- std::optional<uint32_t> maxParseDepth
- The maximum call stack depth of parsing before an error is issued.
- std::optional<uint32_t> maxLexerErrors
- The maximum number of lexer errors that can be encountered before giving up.
Compilation
- std::optional<uint32_t> maxInstanceDepth
- std::optional<uint32_t> maxGenerateSteps
- std::optional<uint32_t> maxConstexprDepth
- std::optional<uint32_t> maxConstexprSteps
- std::optional<uint32_t> maxConstexprBacktrace
- std::optional<uint32_t> maxInstanceArray
- The maximum number of instances allowed in a single instance array.
- std::optional<std::string> compat
- std::optional<std::string> minTypMax
- std::optional<std::string> timeScale
- std::optional<bool> allowUseBeforeDeclare
- If true, allow various to be referenced before they are declared.
- std::optional<bool> ignoreUnknownModules
- If true, ignore errors about unknown modules.
- std::optional<bool> relaxEnumConversions
- If true, allow all integral types to convert implicitly to enum types.
- std::optional<bool> allowHierarchicalConst
- If true, allow hierarchical names in constant expressions.
- std::optional<bool> allowDupInitialDrivers
- std::optional<bool> strictDriverChecking
- std::optional<bool> onlyLint
- If true, only perform linting of code, don't try to elaborate a full hierarchy.
- std::vector<std::string> topModules
- std::vector<std::string> paramOverrides
Diagnostics control
- std::optional<bool> colorDiags
- If true, print diagnostics with color.
- std::optional<bool> diagColumn
- If true, include column numbers in printed diagnostics.
- std::optional<bool> diagLocation
- If true, include location information in printed diagnostics.
- std::optional<bool> diagSourceLine
- If true, include source line context in printed diagnostics.
- std::optional<bool> diagOptionName
- If true, include warning option names in printed diagnostics.
- std::optional<bool> diagIncludeStack
- If true, include file include stacks in printed diagnostics.
- std::optional<bool> diagMacroExpansion
- If true, include macro expansion information in printed diagnostics.
- std::optional<bool> diagHierarchy
- If true, include hierarchy paths in printed diagnostics.
- std::optional<uint32_t> errorLimit
- The maximum number of errors to print before giving up.
- std::vector<std::string> warningOptions
- A list of warning options that will be passed to the DiagnosticEngine.
- std::vector<std::string> suppressWarningsPaths
- A list of paths in which to suppress warnings.
File lists
- std::optional<bool> singleUnit
- std::vector<std::string> libraryFiles
- A list of library files to include in the compilation.
Variable documentation
std::optional<uint32_t> slang:: driver:: Driver:: Options:: maxInstanceDepth
The maximum depth of nested module instances (and interfaces/programs), to detect infinite recursion.
std::optional<uint32_t> slang:: driver:: Driver:: Options:: maxGenerateSteps
The maximum number of steps that will be taken when expanding a single generate construct, to detect infinite loops.
std::optional<uint32_t> slang:: driver:: Driver:: Options:: maxConstexprDepth
The maximum depth of nested function calls in constant expressions, to detect infinite recursion.
std::optional<uint32_t> slang:: driver:: Driver:: Options:: maxConstexprSteps
The maximum number of steps to allow when evaluating a constant expressions, to detect infinite loops.
std::optional<uint32_t> slang:: driver:: Driver:: Options:: maxConstexprBacktrace
The maximum number of frames in a callstack to display in diagnostics before abbreviating them.
std::optional<std::string> slang:: driver:: Driver:: Options:: compat
A string indicating a member of CompatMode to use for tailoring other compilation options.
std::optional<std::string> slang:: driver:: Driver:: Options:: minTypMax
A string indicating a member of MinTypMax to indicate which set of (min:typ:max) expressions is valid for this compilation.
std::optional<std::string> slang:: driver:: Driver:: Options:: timeScale
A string that indicates the default time scale to use for any design elements that don't specify one explicitly.
std::optional<bool> slang:: driver:: Driver:: Options:: allowDupInitialDrivers
Signals driven by an always_comb are normally not allowed to be driven by any other process. Setting this option allows initial blocks to also drive such signals.
std::optional<bool> slang:: driver:: Driver:: Options:: strictDriverChecking
If true, perform strict checking of variable drivers, which currently means not taking into account procedural for loop unrolling.
std::vector<std::string> slang:: driver:: Driver:: Options:: topModules
If non-empty, specifies the list of modules that should serve as the top modules in the design. If empty, this will be automatically determined based on which modules are unreferenced elsewhere.
std::vector<std::string> slang:: driver:: Driver:: Options:: paramOverrides
A list of parameters to override, of the form <name>=<value> – note that for now at least this only applies to parameters in top-level modules.
std::optional<bool> slang:: driver:: Driver:: Options:: singleUnit
If set to true, all source files will be treated as part of a single compilation unit, meaning all of their text will be merged together.