pyGHDL.dom.Symbol
This module implements derived symbol classes from pyVHDLModel.Symbol.
Classes
Symbol: Generic reference (name) to a language entity where no single, fixedLibraryReferenceSymbol: Represents a reference (name) to a library.PackageReferenceSymbol: Represents a reference (name) to a package.ModeViewSymbol: Represents a reference (name) to a mode view declaration.SubprogramReferenceSymbol: Represents a reference (name) to a subprogram (procedure or function).ConfigurationSymbol: Represents a reference (name) to a configuration declaration, e.g. in an entity aspect of aSignalSymbol: Represents a reference (name) to a signal, e.g. the target of a signal assignment.VariableSymbol: Represents a reference (name) to a variable, e.g. the target of a variable assignment.ContextReferenceSymbol: Represents a reference (name) to a context.PackageMemberReferenceSymbol: Represents a reference (name) to a package member.AllPackageMembersReferenceSymbol: Represents a reference (name) to all members in a package.EntityInstantiationSymbol: Represents a reference (name) to an entity in a direct entity instantiation.ComponentInstantiationSymbol: Represents a reference (name) to a component in a component instantiation.ConfigurationInstantiationSymbol: Represents a reference (name) to a configuration in a configuration instantiation.EntitySymbol: Represents a reference (name) to an entity in an architecture declaration.ArchitectureSymbol: An entity reference in an entity instantiation with architecture name.PackageSymbol: Represents a reference (name) to a package in a package body declaration.SimpleSubtypeSymbol: Represents a reference to a type or subtype by its type mark.ConstrainedScalarSubtypeSymbol: Represents a reference to a scalar subtype narrowed by a range.ConstrainedArraySubtypeSymbol: Represents a reference to an array subtype narrowed by index ranges.ConstrainedRecordSubtypeSymbol: Represents a reference to a record subtype with constrained elements.RecordElementSymbol: Represents a reference to a record element.RangeAttributeSymbol: A symbol referencing a range attribute, e.g.vector'range.SimpleObjectOrFunctionCallSymbol: Represents a reference that is either an object or a parameterless function call.IndexedObjectOrFunctionCallSymbol: Represents a reference that is either an indexed object, a function call or a type conversion.
Classes
- class pyGHDL.dom.Symbol.Symbol(identifierNode, name, possibleReferences)[source]
Generic reference (name) to a language entity where no single, fixed
PossibleReferencevalue fits - e.g. an alias’s target, which may or may not be restricted to an object depending on whether a subtype indication is present.This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.Symbol.Inheritance
- Parameters:
identifierNode (Iir)
name (Name)
possibleReferences (PossibleReference)
- __init__(identifierNode, name, possibleReferences)[source]
Initializes a symbol.
- Parameters:
identifierNode (
TypeVar(Iir, bound=c_int)) – The IIR node of the name this symbol was translated from.name (
Name) – The name referencing the language entity this symbol stands for.possibleReferences (
PossibleReference) – An enumeration to filter possible references.
- Return type:
None
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()[source]
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()[source]
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()[source]
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.LibraryReferenceSymbol(identifierNode, name)[source]
Represents a reference (name) to a library.
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.LibraryReferenceSymbol.Example
library ieee; -- ^^^^
Inheritance
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Library: Library | None
Property to access the library (
_reference).- Returns:
The library, or
Noneif not set.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.PackageReferenceSymbol(identifierNode, name)[source]
Represents a reference (name) to a package.
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.PackageReferenceSymbol.Example
use ieee.numeric_std; -- ^^^^^^^^^^^^^^^^
Inheritance
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Package: Package | None
Property to access the package (
_reference).- Returns:
The package, or
Noneif not set.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.ModeViewSymbol(identifierNode, name)[source]
Represents a reference (name) to a mode view declaration.
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.ModeViewSymbol.Example
port (p : view MyView); -- ^^^^^^
Inheritance
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property ModeView: ModeViewDeclaration | None
Property to access the mode view (
_reference).- Returns:
The mode view, or
Noneif not set.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.SubprogramReferenceSymbol(identifierNode, name)[source]
Represents a reference (name) to a subprogram (procedure or function).
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.SubprogramReferenceSymbol.Example
function f is new g generic map (...); -- ^
Inheritance
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- property Subprogram: Subprogram | None
Property to access the subprogram (
_reference).- Returns:
The subprogram, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.ConfigurationSymbol(identifierNode, name)[source]
Represents a reference (name) to a configuration declaration, e.g. in an entity aspect of a binding indication.
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.ConfigurationSymbol.Example
for U1 : comp use configuration work.cfg; -- ^^^^^^^
Inheritance
- property Configuration: Configuration | None
Property to access the configuration (
_reference).- Returns:
The configuration, or
Noneif not set.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.SignalSymbol(identifierNode, name)[source]
Represents a reference (name) to a signal, e.g. the target of a signal assignment.
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.SignalSymbol.Example
s <= '1'; --^
Inheritance
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- property Signal: Signal | None
Property to access the signal (
_reference).- Returns:
The signal, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.VariableSymbol(identifierNode, name)[source]
Represents a reference (name) to a variable, e.g. the target of a variable assignment.
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.VariableSymbol.Example
v := '1'; --^
Inheritance
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- property Variable: Variable | None
Property to access the variable (
_reference).- Returns:
The variable, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.ContextReferenceSymbol(identifierNode, name)[source]
Represents a reference (name) to a context.
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.ContextReferenceSymbol.Example
context ieee.ieee_std_context; -- ^^^^^^^^^^^^^^^^^^^^^
Inheritance
- property Context: Context
Property to access the context (
_reference).- Returns:
The context.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.PackageMemberReferenceSymbol(identifierNode, name)[source]
Represents a reference (name) to a package member.
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.PackageMemberReferenceSymbol.Example
use ieee.numeric_std.unsigned; -- ^^^^^^^^^^^^^^^^^^^^^^^^^
Inheritance
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Member: Package | None
Property to access the member (
_reference).- Returns:
The member, or
Noneif not set.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.AllPackageMembersReferenceSymbol(identifierNode, name)[source]
Represents a reference (name) to all members in a package.
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.AllPackageMembersReferenceSymbol.Example
use ieee.numeric_std.all; -- ^^^^^^^^^^^^^^^^^^^^
Inheritance
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Members: Package
Property to access the members (
_reference).- Returns:
The members.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.EntityInstantiationSymbol(identifierNode, name)[source]
Represents a reference (name) to an entity in a direct entity instantiation.
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.EntityInstantiationSymbol.Example
inst : entity work.Counter; -- ^^^^^^^^^^^^
Inheritance
- __init__(identifierNode, name)[source]
Initializes a reference (name) to an entity in a direct entity instantiation.
- property Entity: Entity
Property to access the entity (
_reference).- Returns:
The entity.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.ComponentInstantiationSymbol(identifierNode, name)[source]
Represents a reference (name) to a component in a component instantiation.
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.ComponentInstantiationSymbol.Example
inst : component Counter; -- ^^^^^^^
Inheritance
- __init__(identifierNode, name)[source]
Initializes a reference (name) to an entity in a component instantiation.
- property Component: Component
Property to access the component (
_reference).- Returns:
The component.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.ConfigurationInstantiationSymbol(identifierNode, name)[source]
Represents a reference (name) to a configuration in a configuration instantiation.
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.ConfigurationInstantiationSymbol.Example
inst : configuration Counter; -- ^^^^^^^
Inheritance
- __init__(identifierNode, name)[source]
Initializes a reference (name) to an entity in a configuration instantiation.
- property Configuration: Configuration
Property to access the configuration (
_reference).- Returns:
The configuration.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.EntitySymbol(identifierNode, name)[source]
Represents a reference (name) to an entity in an architecture declaration.
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.EntitySymbol.Example
architecture rtl of Counter is -- ^^^^^^^ begin end architecture;
Inheritance
- __init__(identifierNode, name)[source]
Initializes a reference (name) to an entity in an architecture declaration.
- property Entity: Entity
Property to access the entity (
_reference).- Returns:
The entity.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.ArchitectureSymbol(identifierNode, name)[source]
An entity reference in an entity instantiation with architecture name.
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.ArchitectureSymbol.Inheritance
- property Architecture: Architecture
Property to access the architecture (
_reference).- Returns:
The architecture.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.PackageSymbol(identifierNode, name)[source]
Represents a reference (name) to a package in a package body declaration.
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.PackageSymbol.Example
package body utilities is -- ^^^^^^^^^ end package body;
Inheritance
- __init__(identifierNode, name)[source]
Initializes a reference (name) to a package in a package body declaration.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Package: Package
Property to access the package (
_reference).- Returns:
The package.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.SimpleSubtypeSymbol(node, subtypeName)[source]
Represents a reference to a type or subtype by its type mark.
The referenced language entity is available as
Referenceonce resolved.Example
signal s : bit := '0'; -- ^^^ <- Name
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.SimpleSubtypeSymbol.Inheritance
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- property Subtype: Subtype
Property to access the subtype (
_reference).- Returns:
The subtype.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.ConstrainedScalarSubtypeSymbol(node, subtypeName, rng)[source]
Represents a reference to a scalar subtype narrowed by a range.
The referenced language entity is available as
Referenceonce resolved. The range is mandatory: a type mark without a range constraint is aSimpleSubtypeSymbol.Example
for i in integer range 0 to 3 loop -- ^^^^^^^ <- Name -- ^^^^^^ <- Constraint
A range constraint written as a range attribute is a
RangeFromNamereferring to aRangeAttributeSymbol:subtype index is natural range vector'range; -- ^^^^^^^ <- Name -- ^^^^^^^^^^^^ <- Constraint
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.ConstrainedScalarSubtypeSymbol.Inheritance
- __init__(node, subtypeName, rng)[source]
Initializes a reference to a scalar subtype narrowed by a range.
- property Constraint: Range
Read-only property to access the scalar type’s range constraint (
_constraint).- Returns:
The constraint of the scalar subtype.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- property Subtype: Subtype
Property to access the subtype (
_reference).- Returns:
The subtype.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.ConstrainedArraySubtypeSymbol(node, subtypeName, constraints)[source]
Represents a reference to an array subtype narrowed by index ranges.
The referenced language entity is available as
Referenceonce resolved.Example
signal v : bit_vector(7 downto 0); -- ^^^^^^^^^^ <- Name -- ^^^^^^^^^^ <- Constraints
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.ConstrainedArraySubtypeSymbol.Inheritance
- __init__(node, subtypeName, constraints)[source]
Initializes a reference to an array subtype narrowed by index ranges.
- property Constraints: List[Range]
Read-only property to access the constraints (
_constraints).- Returns:
List of constraints.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- property Subtype: Subtype
Property to access the subtype (
_reference).- Returns:
The subtype.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.ConstrainedRecordSubtypeSymbol(node, subtypeName, constraints)[source]
Represents a reference to a record subtype with constrained elements.
The referenced language entity is available as
Referenceonce resolved.This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.ConstrainedRecordSubtypeSymbol.Inheritance
- __init__(node, subtypeName, constraints)[source]
Initializes a reference to a record subtype with constrained elements.
- classmethod parse(node)[source]
Translates an IIR node to a
ConstrainedRecordSubtypeSymbol.
- property Constraints: Dict[RecordElementSymbol, Range]
Read-only property to access the constraints (
_constraints).- Returns:
Dictionary of constraints.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- property Subtype: Subtype
Property to access the subtype (
_reference).- Returns:
The subtype.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _constraints: Dict[RecordElementSymbol, Any]
Dictionary of the constraint per constrained record element.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.RecordElementSymbol(node, name)[source]
Represents a reference to a record element.
The referenced language entity is available as
Referenceonce resolved.Example
r := (a => '1', b => '0'); -- ^ <- Name
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.RecordElementSymbol.Inheritance
- Parameters:
node (Iir)
name (SimpleName)
- __init__(node, name)[source]
Initializes a reference to a record element.
- Parameters:
node (
TypeVar(Iir, bound=c_int)) – The IIR node this object was translated from.name (
SimpleName) – The name referencing the record element.
- Return type:
None
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.RangeAttributeSymbol(node, name)[source]
A symbol referencing a range attribute, e.g.
vector'range.This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.RangeAttributeSymbol.Inheritance
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.SimpleObjectOrFunctionCallSymbol(node, name)[source]
Represents a reference that is either an object or a parameterless function call.
Which of the two it is cannot be decided before the name is resolved. The referenced language entity is available as
Referenceonce resolved.This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.SimpleObjectOrFunctionCallSymbol.Inheritance
- __init__(node, name)[source]
Initializes a reference that is either an object or a parameterless function call.
- classmethod parse(node)[source]
Translates an IIR node to a
SimpleObjectOrFunctionCallSymbol.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- class pyGHDL.dom.Symbol.IndexedObjectOrFunctionCallSymbol(node, name)[source]
Represents a reference that is either an indexed object, a function call or a type conversion.
The referenced language entity is available as
Referenceonce resolved.Attention
All three are written the same way -
arr(0),f(0)andinteger(0)are indistinguishable as syntax, so a parser produces one shape for them and only name resolution tells them apart.This class implements a
pyGHDL.domobject derived frompyVHDLModel.Symbol.IndexedObjectOrFunctionCallSymbol.Inheritance
- __init__(node, name)[source]
Initializes a reference that is either an indexed object, a function call or a type conversion.
- classmethod parse(node)[source]
Translates an IIR node to an
IndexedObjectOrFunctionCallSymbol.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property IsResolved: bool
Check if the symbol is resolved, i.e.
_referenceis set.- Returns:
True, if the symbol is resolved.
- property Name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
Read-only property to access the name (
_name).- Returns:
The name.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Reference: Any | None
Read-only property to access the reference (
_reference).- Returns:
The reference, or
Noneif not set.
- __bool__()
Reports whether this symbol has been resolved.
- Return type:
- Returns:
Trueif the symbol references a model entity.
- __repr__()
Formats a representation of the symbol.
Format:
SignalSymbol: 'clk' -> <signal>, or... -> ?while unresolved- Return type:
- Returns:
String representation of the symbol.
- __str__()
Formats the symbol.
Format: the referenced model entity once resolved, else the name plus
?- Return type:
- Returns:
Formatted symbol.
- _name: <pyTooling.Decorators.readonly object at 0x7d2df2337dd0>
The name to reference the language entity.
- _possibleReferences: PossibleReference
An enumeration to filter possible references.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.