pyVHDLModel.Symbol
This module contains parts of an abstract document language model for VHDL.
Symbols are entity specific wrappers for names that reference VHDL language entities.
Classes
PossibleReference
: Is an enumeration, representing possible targets for a reference in aSymbol
.Symbol
: Base-class for all symbol classes.LibraryReferenceSymbol
: Represents a reference (name) to a library.PackageReferenceSymbol
: Represents a reference (name) to a package.ContextReferenceSymbol
: Represents a reference (name) to a context.PackageMemberReferenceSymbol
: Represents a reference (name) to a package member.AllPackageMembersReferenceSymbol
: Represents a reference (name) to all package members.EntityInstantiationSymbol
: Represents a reference (name) to an entity in a direct entity instantiation.ComponentInstantiationSymbol
: Represents a reference (name) to an entity in a component instantiation.ConfigurationInstantiationSymbol
: Represents a reference (name) to an entity 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.RecordElementSymbol
: Base-class for all symbol classes.SubtypeSymbol
: Base-class for all symbol classes.SimpleSubtypeSymbol
: Base-class for all symbol classes.ConstrainedScalarSubtypeSymbol
: Base-class for all symbol classes.ConstrainedCompositeSubtypeSymbol
: Base-class for all symbol classes.ConstrainedArraySubtypeSymbol
: Base-class for all symbol classes.ConstrainedRecordSubtypeSymbol
: Base-class for all symbol classes.SimpleObjectOrFunctionCallSymbol
: Base-class for all symbol classes.IndexedObjectOrFunctionCallSymbol
: Base-class for all symbol classes.
Classes
- class pyVHDLModel.Symbol.PossibleReference(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Is an enumeration, representing possible targets for a reference in a
Symbol
.Inheritance
- Library = 1
Library
- Entity = 2
Entity
- Architecture = 4
Architecture
- Component = 8
Component
- Package = 16
Package
- Configuration = 32
Configuration
- Context = 64
Context
- Type = 128
Type
- Subtype = 256
Subtype
- ScalarType = 512
ScalarType
- ArrayType = 1024
ArrayType
- RecordType = 2048
RecordType
- RecordElement = 4096
RecordElement
- AccessType = 8192
AccessType
- ProtectedType = 16384
ProtectedType
- FileType = 32768
FileType
- Attribute = 65536
Attribute
- TypeAttribute = 131072
TypeAttribute
- ValueAttribute = 262144
ValueAttribute
- SignalAttribute = 524288
SignalAttribute
- RangeAttribute = 1048576
RangeAttribute
- ViewAttribute = 2097152
ViewAttribute
- Constant = 4194304
Constant
- Variable = 8388608
Variable
- Signal = 16777216
Signal
- File = 33554432
File
- EnumLiteral = 67108864
EnumLiteral
- Procedure = 134217728
Procedure
- Function = 268435456
Function
- Label = 536870912
Label
- View = 1073741824
View
- AnyType = 61184
Any possible type incl. subtypes.
- SubProgram = 402653184
Any subprogram
- PackageMember = 432074504
Any member of a package
- SimpleNameInExpression = 364904960
Any possible item in an expression.
- static _generate_next_value_(name, start, count, last_values)
Generate the next value when not given.
name: the name of the member start: the initial start value or None count: the number of existing members last_values: the last value assigned or None
- _numeric_repr_()
Return the canonical string representation of the object.
For many object types, including most builtins, eval(repr(obj)) == obj.
- classmethod _iter_member_by_value_(value)
Extract all members from the value in definition (i.e. increasing value) order.
- classmethod _iter_member_(value)
Extract all members from the value in definition (i.e. increasing value) order.
- classmethod _iter_member_by_def_(value)
Extract all members from the value in definition order.
- classmethod _missing_(value)
Create a composite member containing all canonical members present in value.
If non-member values are present, result depends on _boundary_ setting.
- __contains__(other)
Returns True if self has at least the same flags set as other.
- __iter__()
Returns flags in definition order.
- __len__()
Return the number of members (no aliases)
- __repr__()
Return repr(self).
- __str__()
Return str(self).
- __bool__()
classes/types should always be True.
- __or__(other)
Return self|value.
- __ror__(other)
Return value|self.
- __new__(value)
- class pyVHDLModel.Symbol.Symbol(name, possibleReferences)[source]
Base-class for all symbol classes.
Inheritance
- Parameters:
name (Name)
possibleReferences (PossibleReference)
- __init__(name, possibleReferences)[source]
- Parameters:
name (Name)
possibleReferences (PossibleReference)
- Return type:
None
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.LibraryReferenceSymbol(name)[source]
Represents a reference (name) to a library.
The internal name will be a
SimpleName
.Example
library ieee; -- ^^^^
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.PackageReferenceSymbol(name)[source]
Represents a reference (name) to a package.
The internal name will be a
SelectedName
.Example
use ieee.numeric_std; -- ^^^^^^^^^^^^^^^^
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.ContextReferenceSymbol(name)[source]
Represents a reference (name) to a context.
The internal name will be a
SelectedName
.Example
context ieee.ieee_std_context; -- ^^^^^^^^^^^^^^^^^^^^^
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.PackageMemberReferenceSymbol(name)[source]
Represents a reference (name) to a package member.
The internal name will be a
SelectedName
.Example
use ieee.numeric_std.unsigned; -- ^^^^^^^^^^^^^^^^^^^^^^^^^
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.AllPackageMembersReferenceSymbol(name)[source]
Represents a reference (name) to all package members.
The internal name will be a
AllName
.Example
use ieee.numeric_std.all; -- ^^^^^^^^^^^^^^^^^^^^
Inheritance
- Parameters:
name (AllName)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.EntityInstantiationSymbol(name)[source]
Represents a reference (name) to an entity in a direct entity instantiation.
The internal name will be a
SimpleName
orSelectedName
.Example
inst : entity work.Counter; -- ^^^^^^^^^^^^
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.ComponentInstantiationSymbol(name)[source]
Represents a reference (name) to an entity in a component instantiation.
The internal name will be a
SimpleName
orSelectedName
.Example
inst : component Counter; -- ^^^^^^^
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.ConfigurationInstantiationSymbol(name)[source]
Represents a reference (name) to an entity in a configuration instantiation.
The internal name will be a
SimpleName
orSelectedName
.Example
inst : configuration Counter; -- ^^^^^^^
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.EntitySymbol(name)[source]
Represents a reference (name) to an entity in an architecture declaration.
The internal name will be a
SimpleName
orSelectedName
.Example
architecture rtl of Counter is -- ^^^^^^^ begin end architecture;
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.ArchitectureSymbol(name)[source]
An entity reference in an entity instantiation with architecture name.
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.PackageSymbol(name)[source]
Represents a reference (name) to a package in a package body declaration.
The internal name will be a
SimpleName
orSelectedName
.Example
package body Utilities is -- ^^^^^^^^^ end package body;
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.RecordElementSymbol(name)[source]
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.SubtypeSymbol(name)[source]
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.SimpleSubtypeSymbol(name)[source]
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.ConstrainedScalarSubtypeSymbol(name)[source]
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.ConstrainedCompositeSubtypeSymbol(name)[source]
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.ConstrainedArraySubtypeSymbol(name)[source]
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.ConstrainedRecordSubtypeSymbol(name)[source]
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.SimpleObjectOrFunctionCallSymbol(name)[source]
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.IndexedObjectOrFunctionCallSymbol(name)[source]
Inheritance
- Parameters:
name (Name)
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.