slang::ast::ASTContext::RandomizeDetails struct

A collection of information needed to bind names inside inline constraint blocks for class and scope randomize function calls.

Public variables

const Scope* classType
The scope of the class type itself, if randomizing a class.
const Symbol* thisVar
If randomizing a class via a dotted handle access, this is the the class handle symbol.
std::span<const std::string_view> nameRestrictions
A list of names to which class-scoped lookups are restricted.
flat_hash_set<const Symbol*> scopeRandVars
A set of variables for a scope randomize call that should be treated as a rand variable.

Variable documentation

std::span<const std::string_view> slang::ast::ASTContext::RandomizeDetails::nameRestrictions

A list of names to which class-scoped lookups are restricted.

If empty, the lookup is unrestricted and all names are first tried in class-scope.