slang namespace
Root namespace.
Classes
- class AbortAssertionExpr
- Represents an abort (accept_on / reject_on) property expression.
- class AssertionInstanceExpression
- class AssertionPortSymbol
- class AssignmentExpression
- Represents an assignment expression.
- class AssignmentPatternExpressionBase
- Base class for assignment pattern expressions.
- struct AssociativeArray
- Represents a SystemVerilog associative array, for use during constant evaluation.
- class AssociativeArrayType
- Represents an unpacked array that provides associative lookup.
-
template<typename TDerived, bool VisitStatements, bool VisitExpressions>struct ASTVisitor
- class Bag
- class BinaryAssertionExpr
- Represents a binary operator in a sequence or property expression.
- class BinaryExpression
- Represents a binary operator expression.
- class BindContext
-
template<typename T>class bitmask
- class BlockStatement
- Represents a sequential or parallel block statement.
- struct BufferID
- class BumpAllocator
- class CallExpression
- Represents a subroutine call.
- class CaseAssertionExpr
- Represents a case operator in a property expression.
- class CHandleType
- Represents storage for pointers passed using the DPI (a "C" compatible handle).
- class ClassBuilder
- A helper class for constructing class types programmatically.
- class ClassType
- Represents a class definition type.
- class ClockingAssertionExpr
- Represents an assertion expression with attached clocking control.
- class ClockingBlockSymbol
- Represents a clocking block.
- class ClockingEventExpression
- class ClockingSkew
- Represents a skew value that is applied to clocking block signals.
- class ClockVarSymbol
- Represents a clocking block signal.
- class CommandLine
- class Compilation
- struct CompilationOptions
- Contains various options that can control compilation behavior.
- class CompilationUnitSymbol
- The root of a single compilation unit.
- class ConcatenationExpression
- Represents a concatenation expression.
- class ConditionalAssertionExpr
- Represents a conditional operator in a property expression.
- class ConditionalConstraint
- Represents a constraint defined by an if-else condition.
- class ConditionalExpression
- Represents a conditional operator expression.
- struct ConstantRange
- class ConstantValue
- class ConstraintBlockSymbol
- Represents a named constraint block declaration within a class.
- class ConstraintList
- Represents a list of constraints.
- struct ConstTokenOrSyntax
- A token or a constant syntax node.
- class ContinuousAssignSymbol
- Represents a continuous assignment statement.
- class ConversionExpression
- Represents a type conversion expression (implicit or explicit).
- class CopyClassExpression
- Represents a
new
expression that copies a class instance. -
template<typename T>class CopyPtr
- class CoverCrossBodySymbol
- class CovergroupBodySymbol
- class CovergroupType
- Represents a covergroup definition type.
- class CVConstIterator
- class CVIterator
- class DataTypeExpression
- class DeclaredType
- class DefParamSymbol
- Represents a defparam directive.
- class Diagnostic
- Wraps up a reported diagnostic along with location in source and any arguments.
- class DiagnosticEngine
- class Diagnostics
- A collection of diagnostics.
- class DisableIffAssertionExpr
- Represents a disable iff condition in a property spec.
- class DisableSoftConstraint
- Represents a constraint that disables a soft random variable.
- class DistExpression
- class DynamicArrayType
- Represents a dynamically sized unpacked array.
- class ElabSystemTaskSymbol
- Represents an elaboration system task, such as $error or $warning.
- class ElementSelectExpression
- Represents a single element selection expression.
- class EmptyArgumentExpression
- class EmptyMemberSymbol
- class EmptyStatement
- Represents an empty statement, used as a placeholder or an anchor for attributes.
- class EnumType
- Represents an enumerated type.
- class EnumValueSymbol
- Represents an enumerated value / member.
- class ErrorType
- class EvalContext
- class EventType
- class ExplicitImportSymbol
- Represents an explicit import from a package.
- class Expression
- The base class for all expressions in SystemVerilog.
- class ExpressionConstraint
- Represents a constraint defined by a logical expression.
- class FieldSymbol
- Represents a field member of a struct or union.
- class FirstMatchAssertionExpr
- Represents a first_match operator in a sequence expression.
- class FixedSizeUnpackedArrayType
- class FloatingType
- class ForeachConstraint
- Represents a constraint that iterates over the elements of an array.
- class FormalArgumentSymbol
- Represents a formal argument in subroutine (task or function).
- class ForwardingTypedefSymbol
-
template<typename Fn>class function_ref
- class GenerateBlockArraySymbol
- Represents an array of generate blocks, as generated by a loop generate construct.
- class GenerateBlockSymbol
- class GenericClassDefSymbol
- class GenvarSymbol
- Represents a genvar declaration.
- class HierarchicalReferenceExpression
- class HierarchicalValueExpression
- Represents an expression that references a named value via hierarchical path.
- class ImplicationConstraint
- Represents a constraint defined by an implication.
- class InsideExpression
- Represents a set membership operator expression.
- class InstanceSymbolBase
- Common functionality for module, interface, program, and primitive instances.
- class IntegerLiteral
- Represents an integer literal.
- class IntegralType
- class InterfacePortSymbol
- class InvalidExpression
- class InvalidStatement
-
template<typename DerivedT, typename IteratorCategoryT, typename T, typename DifferenceTypeT = std::ptrdiff_t, typename PointerT = T*, typename ReferenceT = T&>class iterator_facade
-
template<typename TIterator>class iterator_range
- A range represented by an interator pair, begin and end.
- class IteratorSymbol
- Represents an iterator variable created for array manipulation methods.
- class JsonWriter
- class LetDeclSymbol
- Represents a let declaration.
- class Lexer
- struct LexerOptions
- Contains various options that can control lexing behavior.
- class LocalAssertionVarSymbol
- struct logic_t
- class Lookup
- Centralized functionality for looking up symbols by name in the AST.
- class LookupLocation
- struct LookupResult
- A structure that contains the results of a name lookup operation.
- class LValue
- class LValueReferenceExpression
- class MemberAccessExpression
- Represents an access of a structure variable's members.
- class MethodBuilder
- A helper class for constructing method symbols programmatically.
- class MinTypMaxExpression
- Represents a min:typ:max expression.
- class ModportClockingSymbol
- Represents a clocking block port.
- class ModportPortSymbol
- Represents a single port specifier in a modport declaration.
- class ModportSymbol
- Represents a modport within an interface definition.
- class MultiPortSymbol
- class NamedValueExpression
- Represents an expression that references a named value.
- class NetSymbol
- Represents a net declaration.
- class NetType
- class NewArrayExpression
- Represents a new[] expression that creates a dynamic array.
- class NewClassExpression
- Represents a
new
expression that creates a class instance. - class NewCovergroupExpression
- Represents a
new
expression that creates a covergroup instance. -
template<typename T>class not_null
- class NullLiteral
- Represents a null literal.
- class NullType
- struct NumericTokenFlags
- Various flags for numeric tokens.
- class OpenRangeExpression
- class OS
- A collection of various OS-specific utility functions.
- class PackageSymbol
- A SystemVerilog package construct.
- class PackedArrayType
- class PackedStructType
- Represents a packed structure of members.
- class PackedUnionType
- Represents a packed union of members.
- class ParameterSymbol
- Represents a parameter value.
- struct ParamOverrideNode
- class Parser
- Implements a full syntax parser for SystemVerilog.
- class ParserBase
- struct ParserOptions
- Contains various options that can control parsing behavior.
- class PortSymbol
- class PredefinedIntegerType
- Represents the predefined integer types, which are essentially predefined vector types.
- class Preprocessor
- struct PreprocessorOptions
- Contains various options that can control preprocessing behavior.
- class PropertySymbol
- Represents a named property object.
- class PropertyType
- Represents the type of property instances and arguments.
- class QueueType
- Represents an unpacked array that provides queue semantics.
- class RangeSelectExpression
- Represents a range selection expression.
- struct real_t
- class RealLiteral
- Represents a real number literal.
- class ReplicatedAssignmentPatternExpression
- Represents a replicated assignment pattern expression.
- class ReplicationExpression
- Represents a replication expression.
- class RootSymbol
- Represents the entirety of a design, along with all contained compilation units.
-
template<typename T, typename Index>class SafeIndexedVector
- class ScalarType
- Represents the single-bit scalar types.
- class Scope
-
template<typename F>class ScopeGuard
- class ScriptSession
-
template<typename T>class SeparatedSyntaxList
- class SequenceConcatExpr
- Represents an assertion expression defined as a delayed concatenation of other expressions.
- struct SequenceRange
- Represents a range of potential sequence matches.
- struct SequenceRepetition
- Encodes a repetition of some sub-sequence.
- class SequenceSymbol
- Represents a named sequence object.
- class SequenceType
- Represents the type of sequence instances and arguments.
- class SequenceWithMatchExpr
- struct shortreal_t
- class SimpleAssertionExpr
- Represents an assertion expression defined as a simple regular expression.
- class SimpleAssignmentPatternExpression
- Represents an assignment pattern expression.
- class SimpleSystemSubroutine
-
template<typename K, typename V, size_t N, typename Entry = ska::detailv3::sherwood_v3_entry<std::pair<K, V>>, typename Alloc = StackAllocator<Entry, N>>class SmallMap
-
template<typename T, size_t N, typename Entry = ska::detailv3::sherwood_v3_entry<T>, typename Alloc = StackAllocator<Entry, N>>class SmallSet
-
template<typename T>class SmallVector
-
template<typename T, size_t N>class SmallVectorSized
- class SolveBeforeConstraint
- Represents a constraint that enforces ordering of solving variables.
- struct SourceBuffer
- class SourceLocation
- class SourceManager
- class SourceRange
- Combines a pair of source locations that denote a range of source text.
- class SpecparamSymbol
- Represents a specify parameter.
- class Statement
- The base class for all statements in SystemVerilog.
- class StatementBinder
- class StatementList
- Represents a list of statements.
- class StreamingConcatenationExpression
- Represents a streaming concatenation.
- class StringLiteral
- Represents a string literal.
-
template<typename T>class StringTable
- class StringType
- Represents an ASCII string type.
- class StrongWeakAssertionExpr
- Represents a strong or weak operator in a property expression.
- class StructBuilder
- A helper class for constructing struct types programmatically.
- class StructuredAssignmentPatternExpression
- Represents an assignment pattern expression.
- class SubroutineSymbol
- Represents a subroutine (task or function).
- class SVInt
- class SVIntStorage
- struct SVQueue
- Represents a SystemVerilog queue, for use during constant evaluation.
- struct SVUnion
- Represents a SystemVerilog unpacked union, for use during constant evaluation.
- class Symbol
- class SyntaxFacts
-
template<typename T>class SyntaxList
- A syntax node that represents a list of child syntax nodes.
- class SyntaxListBase
- A base class for syntax nodes that represent a list of items.
- class SyntaxNode
- Base class for all syntax nodes.
- class SyntaxPrinter
-
template<typename TDerived>class SyntaxRewriter
- class SyntaxTree
-
template<typename TDerived>class SyntaxVisitor
- class TaggedUnionExpression
- Represents a tagged union member setter expression.
- class TimeLiteral
- Represents a time literal.
- struct TimeScale
- struct TimeScaleValue
- A combination of a unit and magnitude for a time scale value.
- class Token
- class TokenList
- A syntax node that represents a list of child tokens.
- struct TokenOrSyntax
- A token or a syntax node.
-
template<typename TNode>struct TokenOrSyntaxBase
- A base class template for a sum type representing either a token or a syntax node.
- class TransparentMemberSymbol
- class Trivia
- class Type
- class TypeAliasType
- Represents a type alias, which is introduced via a typedef or type parameter.
-
template<typename T>class TypedBumpAllocator
- class TypeReferenceExpression
- class TypeRefType
- Represents the result of a type reference expression, i.e. the type() operator.
- class UnaryAssertionExpr
- Represents a unary operator in a property expression.
- class UnaryExpression
- Represents a unary operator expression.
- class UnbasedUnsizedIntegerLiteral
- Represents an unbased unsized integer literal, which fills all bits in an expression.
- class UnboundedLiteral
- Represents the unboudned queue or range literal.
- class UnboundedType
- class UniquenessConstraint
- Represents a constraint that enforces uniqueness of variables.
- class UnknownModuleSymbol
- class UnpackedStructType
- Represents an unpacked structure of members.
- class UnpackedUnionType
- Represents an unpacked union of members.
- class UntypedType
- Represents an 'untyped' type, which is used for e.g. arguments of sequences.
- class ValueExpressionBase
- Common base class for both NamedValueExpression and HierarchicalValueExpression.
- class ValueSymbol
- class VariableSymbol
- Represents a variable declaration.
- class VersionInfo
- Provides access to compile-time generated version info about the library.
- class VirtualInterfaceType
- Represents a virtual interface type.
- class VoidType
- class WildcardImportSymbol
Enums
- enum class BindFlags: uint64_t { None = 0, InsideConcatenation = 1ull << 0, UnevaluatedBranch = 1ull << 1, AllowDataType = 1ull << 2, EnumInitializer = 1ull << 3, NoAttributes = 1ull << 4, AssignmentAllowed = 1ull << 5, AssignmentDisallowed = 1ull << 6, NonProcedural = 1ull << 7, StaticInitializer = 1ull << 8, StreamingAllowed = 1ull << 9, TopLevelStatement = 1ull << 10, AllowUnboundedLiteral = 1ull << 11, AllowUnboundedLiteralArithmetic = 1ull << 12, Function = 1ull << 13, Final = 1ull << 14, NonBlockingTimingControl = 1ull << 15, EventExpression = 1ull << 16, AllowTypeReferences = 1ull << 17, AssertionExpr = 1ull << 18, AllowClockingBlock = 1ull << 19, AssertionInstanceArgCheck = 1ull << 20, AssertionDelayOrRepetition = 1ull << 21, LValue = 1ull << 22, PropertyNegation = 1ull << 23, PropertyTimeAdvance = 1ull << 24, RecursivePropertyArg = 1ull << 25, ConcurrentAssertActionBlock = 1ull << 26, AllowCoverageSampleFormal = 1ull << 27, AllowCoverpoint = 1ull << 28, AllowNetType = 1ull << 29, OutputArg = 1ull << 30, ProceduralAssign = 1ull << 31, ProceduralForceRelease = 1ull << 32, AllowInterconnect = 1ull << 33, UnrollableForLoop = 1ull << 34 }
- Specifies flags that control expression and statement binding.
- enum class EvalFlags: uint8_t { None = 0, IsScript = 1 << 0, CacheResults = 1 << 1, SpecparamsAllowed = 1 << 2, CovergroupExpr = 1 << 3, AllowUnboundedPlaceholder = 1 << 4 }
- Various flags that can be applied to a constant expression evaluation.
- enum class LookupFlags { None = 0, Type = 1 << 0, AllowDeclaredAfter = 1 << 1, DisallowWildcardImport = 1 << 2, NoUndeclaredError = 1 << 3, NoUndeclaredErrorIfUninstantiated = 1 << 4, TypedefTarget = 1 << 5, NoParentScope = 1 << 6, NoSelectors = 1 << 7, AllowRoot = 1 << 8, ForceHierarchical = AllowDeclaredAfter | NoUndeclaredErrorIfUninstantiated }
- Additional modifiers for a lookup operation.
- enum class MinTypMax { Min, Typ, Max }
- enum class DiagnosticSeverity { Ignored, Note, Warning, Error, Fatal }
- enum class LiteralBase: uint8_t { Binary, Octal, Decimal, Hex }
- Specifies the base of an integer (for converting to/from a string)
- enum class TimeUnit: uint8_t { Seconds, Milliseconds, Microseconds, Nanoseconds, Picoseconds, Femtoseconds }
- Scale unit for a time value.
- enum class TimeScaleMagnitude: uint8_t { One = 1, Ten = 10, Hundred = 100 }
- enum class KeywordVersion: uint8_t { v1364_1995 = 0, v1364_2001_noconfig = 1, v1364_2001 = 2, v1364_2005 = 3, v1800_2005 = 4, v1800_2009 = 5, v1800_2012 = 6, v1800_2017 = 7 }
- enum class TriviaKind: uint8_t { Unknown, Whitespace, EndOfLine, LineComment, BlockComment, DisabledText, SkippedTokens, SkippedSyntax, Directive }
- The kind of trivia we've stored.
- enum class AssignFlags { None = 0, NonBlocking = 1 << 0, InConcat = 1 << 1, InputPort = 1 << 2, OutputPort = 1 << 3, InOutPort = 1 << 4, FuncFromProcedure = 1 << 5, ClockVar = 1 << 6, AssertionLocalVarFormalArg = 1 << 7 }
- A set of flags that control how assignments are checked.
- enum class MethodFlags: uint16_t { None = 0, Virtual = 1 << 0, Pure = 1 << 1, Static = 1 << 2, Constructor = 1 << 3, InterfaceImport = 1 << 4, DPIImport = 1 << 5, DPIContext = 1 << 6, NotConst = 1 << 7, Randomize = 1 << 8 }
- Specifies various flags that can apply to subroutines.
- enum class SymbolIndex: uint32_t { }
- enum class VariableFlags: uint16_t { None = 0, Const = 1 << 0, CompilerGenerated = 1 << 1, ImmutableCoverageOption = 1 << 2, CoverageSampleFormal = 1 << 3 }
- Specifies various flags that can apply to variables.
- enum class DeclaredTypeFlags { None = 0, InferImplicit = 1 << 0, InitializerCantSeeParent = 1 << 1, InitializerOverridden = 1 << 2, TypeOverridden = 1 << 3, AutomaticInitializer = 1 << 4, TypedefTarget = 1 << 5, NetType = 1 << 6, UserDefinedNetType = 1 << 7, FormalArgMergeVar = 1 << 8, Rand = 1 << 9, DPIReturnType = 1 << 10, DPIArg = 1 << 11, AllowUnboundedLiteral = 1 << 12, RequireSequenceType = 1 << 13, CoverageType = 1 << 14, InterconnectNet = 1 << 15, NeedsTypeCheck = NetType | UserDefinedNetType | FormalArgMergeVar | Rand | DPIReturnType | DPIArg | RequireSequenceType | CoverageType }
- Various flags that control declared type resolution.
- enum class IntegralFlags: uint8_t { Unsigned = 0, TwoState = 0, Signed = 1, FourState = 2, Reg = 4 }
- Specifies possible traits for integral types.
Typedefs
- using bitwidth_t = uint32_t
- A type that can represent the largest possible bit width of a SystemVerilog integer.
Functions
- auto countLeadingZeros32(uint32_t value) -> uint32_t
- auto countLeadingZeros64(uint64_t value) -> uint32_t
- auto checkedAddS32(int32_t a, int32_t b) -> std::optional<int32_t>
- auto checkedSubS32(int32_t a, int32_t b) -> std::optional<int32_t>
- auto checkedMulU32(uint32_t a, uint32_t b) -> std::optional<uint32_t>
- auto clog2(const SVInt& v) -> uint32_t
- Returns the ceiling of the log_2 of the value. If value is zero, returns zero.
- auto xxhash(const void* input, size_t len) -> size_t
- Hashes the provided input using the xxhash XXH3 algorithm.
-
template<typename T, typename... Rest>void hash_combine(size_t& seed, const T& v, Rest... rest)
-
template<typename T>auto make_range(T begin, T end) -> iterator_
range<T> - Constructs an iterator_
range from two provided iterators (inferring the types involved). -
template<typename TContainer>auto make_reverse_range(TContainer&& container) -> auto
- auto toStringView(span<char> text) -> string_view
- Converts a span of characters into a string_view.
- void uintToStr(SmallVector<char>& buffer, uint32_t value)
- Converts the provided value into a string, storing it into buffer.
- void uintToStr(SmallVector<char>& buffer, uint64_t value)
- Converts the provided value into a string, storing it into buffer.
- auto strToInt(string_view str, size_t* pos = nullptr, int base = 10) -> optional<int32_t>
- auto strToUInt(string_view str, size_t* pos = nullptr, int base = 10) -> optional<uint32_t>
- auto strToDouble(string_view str, size_t* pos = nullptr) -> optional<double>
- auto editDistance(string_view left, string_view right, bool allowReplacements = true, int maxDistance = 0) -> int
- auto widen(string_view str) -> string_view
- Widens the provided UTF8 string into UTF16 wchars.
- auto narrow(string_view str) -> string_view
- Widens the provided UTF16 string into UTF8.
Enum documentation
enum class slang:: BindFlags: uint64_t
#include <slang/binding/BindContext.h>
Specifies flags that control expression and statement binding.
Enumerators | |
---|---|
None |
No special binding behavior specified. |
InsideConcatenation |
The expression is inside a concatenation; this enables slightly different binding rules. |
UnevaluatedBranch |
The expression is inside the unevaluated side of a conditional branch. This is used to avoid issuing warnings for things that won't happen. |
AllowDataType |
Allow the expression to also be a data type; used in a few places like the first argument to system methods like $bits |
EnumInitializer |
The expression being bound is an enum value initializer. |
NoAttributes |
Attributes are disallowed on expressions in this context. |
AssignmentAllowed |
Assignment is allowed in this context. This flag is cleared for nested subexpressions, unless they are directly parenthesized. |
AssignmentDisallowed |
Assignments are disallowed in this context. As opposed to the AssignmentAllowed flag, this is not cleared and overrides that fact even if we are in a procedural context and would otherwise be allowed to modify variables. |
NonProcedural |
Expression is not inside a procedural context. |
StaticInitializer |
Expression is for a static variable's initializer. References to automatic variables will be disallowed. |
StreamingAllowed |
Streaming operator is allowed in assignment target, assignment source, bit-stream casting argument, or stream expressions of another streaming concatenation. This flag is cleared for nested subexpressions, unless they are directly parenthesized. |
TopLevelStatement |
This is the first expression appearing as an expression statement; potentially this indicates whether a subroutine invocation is as a task (if set) or as a function (unset). Cleared for nested subexpressions. |
AllowUnboundedLiteral |
Expression is allowed to be the unbounded literal '$' such as inside a queue select. |
AllowUnboundedLiteralArithmetic |
Expression is allowed to do arithmetic with an unbounded literal. |
Function |
Binding is happening within a function body. |
Final |
Binding is happening within a final block. |
NonBlockingTimingControl |
Binding is happening within the intra-assignment timing control of a non-blocking assignment expression. |
EventExpression |
Binding is happening within an event expression. |
AllowTypeReferences |
Binding is in a context where type reference expressions are allowed. |
AssertionExpr |
Binding is happening within an assertion expression (sequence or property). |
AllowClockingBlock |
Allow binding a clocking block as part of a top-level event expression. |
AssertionInstanceArgCheck |
Binding is for checking an assertion argument, prior to it being expanded as part of an actual instance. |
AssertionDelayOrRepetition |
Binding is for a cycle delay or sequence repetition, where references to assertion formal ports have specific type requirements. |
LValue |
Binding is for the left hand side of an assignment operation. |
PropertyNegation |
Binding is for the negation of a property, which disallows recursive instantiations. |
PropertyTimeAdvance |
Binding is for a property that has come after a positive advancement of time within the parent property definition. |
RecursivePropertyArg |
Binding is for an argument passed to a recursive property instance. |
ConcurrentAssertActionBlock |
Binding is inside a concurrent assertion's action block. |
AllowCoverageSampleFormal |
Binding is for a covergroup expression that permits referencing a formal argument of an overridden sample method. |
AllowCoverpoint |
Expressions are allowed to reference coverpoint objects directly. |
AllowNetType |
User-defined nettypes are allowed to be looked up in this context. |
OutputArg |
Binding is for an output (or inout) port or function argument. |
ProceduralAssign |
Binding is for a procedural assign statement. |
ProceduralForceRelease |
Binding is for a procedural force / release / deassign statement. |
AllowInterconnect |
Binding is in a context that allows interconnect nets. |
UnrollableForLoop |
Binding is inside a potentially unrollable for loop, which means we should skip registering drivers and let the loop unroller do it. |
enum class slang:: EvalFlags: uint8_t
#include <slang/binding/EvalContext.h>
Various flags that can be applied to a constant expression evaluation.
Enumerators | |
---|---|
None |
No special flags specified. |
IsScript |
This evaluation is happening inside of a script, so some language rules should be relaxed. |
CacheResults |
The results of the evaluation can be cached in each expression's |
SpecparamsAllowed |
Specparams are allowed during evaluation. |
CovergroupExpr |
Evaluation is for a covergroup expression, which allows some forms of non-constant variables to be referenced. |
AllowUnboundedPlaceholder |
For parameter evaluation, allow unbounded literals to evaluate to the placeholder value. Other expressions that have an unbounded literal without a queue target will return an invalid value. |
enum class slang:: LookupFlags
#include <slang/binding/Lookup.h>
Additional modifiers for a lookup operation.
Enumerators | |
---|---|
None |
No special modifiers. |
Type |
A lookup for a type name, as opposed to a value. These names cannot be hierarchical but can be package or class scoped. |
AllowDeclaredAfter |
Usually lookups require that the found symbol be declared before the lookup location. This flag removes that restriction. |
DisallowWildcardImport |
Don't search through wildcard imports to satisfy the lookup. |
NoUndeclaredError |
Don't report an error if the lookup is for a simple identifier that cannot be found. |
NoUndeclaredErrorIfUninstantiated |
Don't report an error if the lookup is for a simple identifier that cannot be found and the context in which we are searching is an uninstantiated module. |
TypedefTarget |
The lookup is for a typedef target type, which has a special exemption to allow scoped access to incomplete forward class types. |
NoParentScope |
The lookup should not continue looking into parent scopes if the name is not found in the initial search scope. |
NoSelectors |
Additional name selectors are not allowed in the final result. |
AllowRoot |
Lookup is allowed to return the root symbol via the '$root' scope specifier. |
ForceHierarchical |
Treat this lookup as hierarchical even if it's a simple name. |
enum class slang:: MinTypMax
#include <slang/compilation/Compilation.h>
Specifies which set of min:typ:max expressions should be used during compilation.
Enumerators | |
---|---|
Min |
Use the "min" delay expressions. |
Typ |
Use the "typical" delay expressions. |
Max |
Use the "max" delay expressions. |
enum class slang:: DiagnosticSeverity
#include <slang/diagnostics/Diagnostics.h>
The severity of a given diagnostic. This is not tied to the diagnostic itself; it can be configured on a per-diagnostic basis at runtime.
enum class slang:: LiteralBase: uint8_t
#include <slang/numeric/SVInt.h>
Specifies the base of an integer (for converting to/from a string)
enum class slang:: TimeUnit: uint8_t
#include <slang/numeric/Time.h>
Scale unit for a time value.
enum class slang:: TimeScaleMagnitude: uint8_t
#include <slang/numeric/Time.h>
As allowed by SystemVerilog, time scales can be expressed in one of only a few magnitudes.
enum class slang:: KeywordVersion: uint8_t
#include <slang/parsing/LexerFacts.h>
Different restricted sets of keywords that can be set using the `begin_keywords directive. The values of the enum correspond to indexes to allKeywords[] in LexerFacts.cpp
enum class slang:: TriviaKind: uint8_t
#include <slang/parsing/Token.h>
The kind of trivia we've stored.
enum class slang:: AssignFlags
#include <slang/symbols/SemanticFacts.h>
A set of flags that control how assignments are checked.
Enumerators | |
---|---|
None |
No special assignment behavior specified. |
NonBlocking |
The assignment is non-blocking. |
InConcat |
The assignment is occurring inside a concatenation. |
InputPort |
The assignment is for an input port of a module / interface / program (the assignment to the internal symbol from the port itself). |
OutputPort |
The assignment is for an output port of a module / interface / program (the assignment from the internal symbol from the port itself). |
InOutPort |
The assignment is for an inout port of a module / interface / program. |
FuncFromProcedure |
This assignment is being discovered via a function call from a procedure. |
ClockVar |
The assignment is from a clocking block signal. |
AssertionLocalVarFormalArg |
The assignment is from an assertion instance's local variable formal argument. |
enum class slang:: MethodFlags: uint16_t
#include <slang/symbols/SubroutineSymbols.h>
Specifies various flags that can apply to subroutines.
Enumerators | |
---|---|
None |
No specific flags specified. |
Virtual |
The method is virtual. |
Pure |
The method is 'pure' virtual, meaning it requires an implementation in derived classes. |
Static |
The method is static, meaning it is invocable without an object instance handle. |
Constructor |
The method is a class constructor. |
InterfaceImport |
The method is imported into an interface instance. |
DPIImport |
The method is a DPI import. |
DPIContext |
The method is a DPI import marked 'context'. |
NotConst |
The method is known not to be constant, even if it otherwise meets all of the requirements for a constant function. Used for built-in methods only. |
Randomize |
This method is a std::randomize built-in. These are declared as normal subroutines so they can be found via name lookup, and then a special case translates the calls into the appropriate system subroutine call. |
enum class slang:: SymbolIndex: uint32_t
#include <slang/symbols/Symbol.h>
A numeric index that can be used to compare the relative ordering of symbols within a single lexical scope.
enum class slang:: VariableFlags: uint16_t
#include <slang/symbols/VariableSymbols.h>
Specifies various flags that can apply to variables.
Enumerators | |
---|---|
None |
No specific flags specified. |
Const |
The variable is a constant, i.e. not modifiable after initialization. |
CompilerGenerated |
The variable was not declared by the user but created during compilation. |
ImmutableCoverageOption |
The variable is a coverage option that is not modifiable outside of the covergroup declaration. |
CoverageSampleFormal |
The variable is a formal argument of an overridden sample method in a covergroup. |
enum class slang:: DeclaredTypeFlags
#include <slang/types/DeclaredType.h>
Various flags that control declared type resolution.
Enumerators | |
---|---|
None |
No special flags specified. |
InferImplicit |
If the declared type is implicit, the actual type should be inferred from the initializer. If this is not set, the type will be resolved as 'logic' if implicit syntax is provided. |
InitializerCantSeeParent |
The bound initializer cannot refer to the parent symbol in its expression. This is used for parameters which would otherwise be infinitely recursive if they referenced themselves. |
InitializerOverridden |
The initializer expression has been overridden via a parameter in a hierarchical instantation. |
TypeOverridden |
The type has been overridden via a type parameter in a hierarchical instantation. |
AutomaticInitializer |
The initializer is for an automatic variable. |
TypedefTarget |
The type being bound is the target of a typedef. |
NetType |
The type being bound is a net type. |
UserDefinedNetType |
The type being bound is a user-defined net type. |
FormalArgMergeVar |
The type being bound is part of a port I/O declaration and should be merged with the formal argument declared elsewhere in the scope. |
Rand |
The type being bound is for a random variable. |
DPIReturnType |
The type being bound is a DPI return type. |
DPIArg |
The type being bound is for a DPI argument. |
AllowUnboundedLiteral |
Allow use of the unbounded literal '$' in the initializer expression. |
RequireSequenceType |
The type must be one allowed in a sequence expression. |
CoverageType |
The type must be valid in a coverage expression. |
InterconnectNet |
The type is for an interconnect net, which has special rules. |
NeedsTypeCheck |
A mask of flags that indicate additional type rules are needed to be checked after the type itself is resolved. |
enum class slang:: IntegralFlags: uint8_t
#include <slang/types/Type.h>
Specifies possible traits for integral types.
Enumerators | |
---|---|
Unsigned |
The type is unsigned. This is the default. |
TwoState |
The type is two state. This is the default. |
Signed |
The type is signed. |
FourState |
The type is four state. |
Reg |
The type used the 'reg' keyword instead of 'logic'; they are semantically identical but preserve the distinction to allow more useful messaging. |
Typedef documentation
using slang:: bitwidth_t = uint32_t
#include <slang/numeric/SVInt.h>
A type that can represent the largest possible bit width of a SystemVerilog integer.
Function documentation
uint32_t slang:: countLeadingZeros32(uint32_t value)
#include <slang/numeric/MathUtils.h>
If value is zero, returns 32. Otherwise, returns the number of zeros, starting from the MSB.
uint32_t slang:: countLeadingZeros64(uint64_t value)
#include <slang/numeric/MathUtils.h>
If value is zero, returns 64. Otherwise, returns the number of zeros, starting from the MSB.
std::optional<int32_t> slang:: checkedAddS32(int32_t a,
int32_t b)
#include <slang/numeric/MathUtils.h>
Performs an addition of two signed 32-bit integers and returns the result if it does not overflow. If it does, nullopt is returned instead.
std::optional<int32_t> slang:: checkedSubS32(int32_t a,
int32_t b)
#include <slang/numeric/MathUtils.h>
Performs a subtraction of two signed 32-bit integers and returns the result if it does not overflow. If it does, nullopt is returned instead.
std::optional<uint32_t> slang:: checkedMulU32(uint32_t a,
uint32_t b)
#include <slang/numeric/MathUtils.h>
Performs a multiplication of two unsigned 32-bit integers and returns the result if it does not overflow. If it does, nullopt is returned instead.
uint32_t slang:: clog2(const SVInt& v)
#include <slang/numeric/SVInt.h>
Returns the ceiling of the log_2 of the value. If value is zero, returns zero.
size_t slang:: xxhash(const void* input,
size_t len)
#include <slang/util/Hash.h>
Hashes the provided input using the xxhash XXH3 algorithm.
#include <slang/util/Hash.h>
template<typename T, typename... Rest>
void slang:: hash_combine(size_t& seed,
const T& v,
Rest... rest)
Hash combining function, based on the function from Boost. It hashes the provided v object and combines it with the previous hash value in seed.
#include <slang/util/Iterator.h>
template<typename T>
iterator_ range<T> slang:: make_range(T begin,
T end)
Constructs an iterator_
#include <slang/util/Iterator.h>
template<typename TContainer>
auto slang:: make_reverse_range(TContainer&& container)
Constructs a reversed iterator_
string_view slang:: toStringView(span<char> text)
#include <slang/util/String.h>
Converts a span of characters into a string_view.
void slang:: uintToStr(SmallVector<char>& buffer,
uint32_t value)
#include <slang/util/String.h>
Converts the provided value into a string, storing it into buffer.
void slang:: uintToStr(SmallVector<char>& buffer,
uint64_t value)
#include <slang/util/String.h>
Converts the provided value into a string, storing it into buffer.
optional<int32_t> slang:: strToInt(string_view str,
size_t* pos = nullptr,
int base = 10)
#include <slang/util/String.h>
Returns | the converted value, or nullopt if conversion fails (invalid string, overflow, etc). |
---|
Parses the provided str in the specified base into a signed integer. If pos is non-null, it will be set to point to the first character in the source string that was not part of the conversion.
optional<uint32_t> slang:: strToUInt(string_view str,
size_t* pos = nullptr,
int base = 10)
#include <slang/util/String.h>
Returns | the converted value, or nullopt if conversion fails (invalid string, overflow, etc). |
---|
Parses the provided str in the specified base into an unsigned integer. If pos is non-null, it will be set to point to the first character in the source string that was not part of the conversion.
optional<double> slang:: strToDouble(string_view str,
size_t* pos = nullptr)
#include <slang/util/String.h>
Returns | the converted value, or nullopt if conversion fails (invalid string, overflow, etc). |
---|
Parses the provided str into a floating point value. If pos is non-null, it will be set to point to the first character in the source string that was not part of the conversion.
int slang:: editDistance(string_view left,
string_view right,
bool allowReplacements = true,
int maxDistance = 0)
#include <slang/util/String.h>
Determines the number of edits to the left string that are required to change it into the right string. If allowReplacements is true, characters can be substituted as needed. Otherwise, only swaps are allowed.
If maxDistance is >0 and the computed distance is at least that much, give up and return maxDistance + 1.
string_view slang:: widen(string_view str)
#include <slang/util/String.h>
Widens the provided UTF8 string into UTF16 wchars.
string_view slang:: narrow(string_view str)
#include <slang/util/String.h>
Widens the provided UTF16 string into UTF8.