Base class for all symbols (logical code constructs) such as modules, types, functions, variables, etc.
- class AssertionPortSymbol
- Represents a formal argument / port of an assertion construct, such as a sequence, property, or let construct.
- class CheckerSymbol
- Represents a checker declaration.
- class ClockingBlockSymbol
- Represents a clocking block.
- class CompilationUnitSymbol
- The root of a single compilation unit.
- class ConfigBlockSymbol
- Represents a config block declaration.
- class ConstraintBlockSymbol
- Represents a named constraint block declaration within a class.
- class ContinuousAssignSymbol
- Represents a continuous assignment statement.
- class CoverCrossBodySymbol
- Represents the body of a cover cross type, separated out because the members of the cross body can't be accessed outside of the cross itself.
- class CovergroupBodySymbol
- Represents the body of a covergroup type, separated out because the arguments of a covergroup need to live in their own scope so that they can be shadowed by body members.
- class DefParamSymbol
- Represents a defparam directive.
- class ElabSystemTaskSymbol
- Represents an elaboration system task, such as $error or $warning.
- class EmptyMemberSymbol
- Represents an empty member, i.e.
- class ExplicitImportSymbol
- Represents an explicit import from a package.
- class ForwardingTypedefSymbol
- A forward declaration of a user-defined type name.
- class GenerateBlockArraySymbol
- Represents an array of generate blocks, as generated by a loop generate construct.
- class GenerateBlockSymbol
- Represents blocks that are instantiated by a loop generate or conditional generate construct.
- class GenericClassDefSymbol
- Represents a generic class definition, which is a parameterized class that has not yet had its parameter values specified.
- class GenvarSymbol
- Represents a genvar declaration.
- class InstanceSymbolBase
- Common functionality for module, interface, program, and primitive instances.
- class InterfacePortSymbol
- Represents the public-facing side of a module / program / interface port that is also a connection to an interface instance (optionally with a modport restriction).
- class LetDeclSymbol
- Represents a let declaration.
- class ModportClockingSymbol
- Represents a clocking block port.
- class ModportSymbol
- Represents a modport within an interface definition.
- class MultiPortSymbol
- Represents a multi-port, which is a port symbol that externally appears as a single connection but internally connects to multiple names, potentially with varying directions.
- class NetType
- Base class for all net types in SystemVerilog.
- class PackageSymbol
- A SystemVerilog package construct.
- class PortSymbol
- Represents the public-facing side of a module / program / interface port.
- class PropertySymbol
- Represents a named property object.
- class RootSymbol
- Represents the entirety of a design, along with all contained compilation units.
- class SequenceSymbol
- Represents a named sequence object.
- class SubroutineSymbol
- Represents a subroutine (task or function).
- class TransparentMemberSymbol
- A class that wraps a hoisted transparent type member, such as an enum value or a symbol inherited from a base class, into a scope.
- class Type
- Base class for all data types in SystemVerilog.
- class UninstantiatedDefSymbol
- Represents an instance of a definition (module / interface / program / checker) that is not actually instantiated in the design.
- class ValueSymbol
- A base class for symbols that represent a value (for example a variable or a parameter).
- class WildcardImportSymbol
- Represents a wildcard import declaration.
- auto getParentScope() const -> const Scope*
- Gets the logical parent scope that contains this symbol.
- auto getHierarchicalParent() const -> const Scope*
- Gets the parent scope of this symbol in terms of its hierarchy location.
auto getSyntax() const -> const syntax::
- Gets the syntax node that was used to create this symbol, if any.
- auto isScope() const -> bool
- Determines whether this symbol also represents a scope.
- auto isType() const -> bool
- Determines whether this symbol represents a type.
- auto isValue() const -> bool
- Determines whether this symbol represents a value.
- auto getDeclaredType() const -> const DeclaredType*
- If the symbol has a declared type, returns a pointer to it. Otherwise returns nullptr.
string& buffer) const
- Gets the symbol's hierarchical path by walking up to the root node and appending each parent's name.
string& buffer) const
- Gets the symbol's lexical path by walking up to the compilation unit and appending each parent's name.
auto isDeclaredBefore(const Symbol& symbol) const -> std::
- Determines whether this symbol is considered to be declared before the given symbol, in the same compilation unit.
- auto getDeclaringDefinition() const -> const Definition*
- Gets the definition in which this symbol is declared.
- auto getRandMode() const -> RandMode
- If this symbol is a random variable, returns its mode.
- auto getIndex() const -> SymbolIndex
- Gets the index of the symbol within its parent scope, which can be used to determine the relative ordering of scope members.
void setSyntax(const syntax::
- Sets the syntax that was used to create this symbol.
- auto getNextSibling() const -> const Symbol*
- Returns the next sibling symbol in the parent scope, if one exists.
- SymbolKind kind
- The type of symbol.
- The name of the symbol; if the symbol does not have a name, this will be an empty string.
- SourceLocation location
- The declared location of the symbol in the source code, or an empty location if it was not explicitly declared in the source text.
optional<bool> slang:: ast:: Symbol:: isDeclaredBefore(const Symbol& symbol) const
Determines whether this symbol is considered to be declared before the given symbol, in the same compilation unit.
If it is, this method returns true. Otherwise it returns false. If the given symbol is not even in the same compilation unit as this one, returns std::nullopt.
ast:: Symbol:: getRandMode() const
If this symbol is a random variable, returns its mode.
Otherwise returns RandMode::None.