slang::CompilationOptions struct

Contains various options that can control compilation behavior.

Contents

Public variables

uint32_t maxInstanceDepth
uint32_t maxGenerateSteps
uint32_t maxConstexprDepth
uint32_t maxConstexprSteps
uint32_t maxConstexprBacktrace
uint32_t errorLimit
uint32_t typoCorrectionLimit
MinTypMax minTypMax
bool suppressUnused
flat_hash_set<string_view> topModules
std::vector<std::string> paramOverrides

Variable documentation

uint32_t slang::CompilationOptions::maxInstanceDepth

The maximum depth of nested module instances (and interfaces/programs), to detect infinite recursion.

uint32_t slang::CompilationOptions::maxGenerateSteps

The maximum number of steps that will be taken when expanding a single generate construct, to detect infinite loops.

uint32_t slang::CompilationOptions::maxConstexprDepth

The maximum depth of nested function calls in constant expressions, to detect infinite recursion.

uint32_t slang::CompilationOptions::maxConstexprSteps

The maximum number of steps to allow when evaluating a constant expressions, to detect infinite loops.

uint32_t slang::CompilationOptions::maxConstexprBacktrace

The maximum number of frames in a callstack to display in diagnostics before abbreviating them.

uint32_t slang::CompilationOptions::errorLimit

The maximum number of errors that can be found before we short circuit the tree walking process.

uint32_t slang::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.

MinTypMax slang::CompilationOptions::minTypMax

Specifies which set of min:typ:max expressions should be used during compilation.

bool slang::CompilationOptions::suppressUnused

If true, suppress warnings about unused code elements. This is intended for tests; for end users, they can use warning flags to control output.

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

std::vector<std::string> slang::CompilationOptions::paramOverrides

A list of parameters to override, of the form <name>=

– note that for now at least this only applies to parameters in top-level modules.