slang::ast::CompilationOptions struct

Contains various options that can control compilation behavior.

Public variables

bitmask<CompilationFlags> flags
Various flags that control compilation behavior.
uint32_t maxInstanceDepth
The maximum depth of nested module instances (and interfaces/programs), to detect infinite recursion.
uint32_t maxCheckerInstanceDepth
The maximum depth of nested checker instances to detect infinite recursion.
uint32_t maxGenerateSteps
The maximum number of steps that will be taken when expanding a single generate construct, to detect infinite loops.
uint32_t maxConstexprDepth
The maximum depth of nested function calls in constant expressions, to detect infinite recursion.
uint32_t maxConstexprSteps
The maximum number of steps to allow when evaluating a constant expressions, to detect infinite loops.
uint32_t maxConstexprBacktrace
The maximum number of frames in a callstack to display in diagnostics before abbreviating them.
uint32_t maxDefParamSteps
The maximum number of iterations to try to resolve defparams before giving up due to potentially cyclic dependencies in parameter values.
uint32_t maxInstanceArray
The maximum number of instances allowed in a single instance array.
uint32_t maxRecursiveClassSpecialization
The maximum depth of recursive generic class specializations.
uint32_t errorLimit
The maximum number of errors that can be found before we short circuit the tree walking process.
uint32_t typoCorrectionLimit
The maximum number of times we'll attempt to do typo correction before giving up.
MinTypMax minTypMax
Specifies which set of min:typ:max expressions should be used during compilation.
LanguageVersion languageVersion
The version of the SystemVerilog language to use.
std::optional<TimeScale> defaultTimeScale
The default time scale to use for design elements that don't specify one explicitly.
flat_hash_set<std::string_view> topModules
If non-empty, specifies the list of modules that should serve as the top modules in the design.
std::vector<std::string> 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::vector<std::string> defaultLiblist
A list of library names, in the order in which they should be searched when binding cells to instances.

Variable documentation

uint32_t slang::ast::CompilationOptions::typoCorrectionLimit

The maximum number of times we'll attempt to do typo correction before giving up.

This is to prevent very slow compilation times if the source text is hopelessly broken.

flat_hash_set<std::string_view> slang::ast::CompilationOptions::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.