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.SubtypeSymbol
: Base-class for all symbol classes.SimpleSubtypeSymbol
: A configuration reference in a configuration instantiation.ConstrainedScalarSubtypeSymbol
: A configuration reference in a configuration instantiation.ConstrainedCompositeSubtypeSymbol
: A configuration reference in a configuration instantiation.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
- AccessType = 4096
AccessType
- ProtectedType = 8192
ProtectedType
- FileType = 16384
FileType
- Attribute = 32768
Attribute
- TypeAttribute = 65536
TypeAttribute
- ValueAttribute = 131072
ValueAttribute
- SignalAttribute = 262144
SignalAttribute
- RangeAttribute = 524288
RangeAttribute
- ViewAttribute = 1048576
ViewAttribute
- Constant = 2097152
Constant
- Variable = 4194304
Variable
- Signal = 8388608
Signal
- File = 16777216
File
- EnumLiteral = 33554432
EnumLiteral
- Procedure = 67108864
Procedure
- Function = 134217728
Function
- Label = 268435456
Label
- View = 536870912
View
- AnyType = 32512
Any possible type incl. subtypes.
- SubProgram = 201326592
Any subprogram
- PackageMember = 216039176
Any member of a package
- SimpleNameInExpression = 182452736
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)
-
_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)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_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)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_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)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_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)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_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)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_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)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_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)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_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)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_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)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_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)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_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)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.SubtypeSymbol(name)[source]
Inheritance
- Parameters:
name (Name)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.SimpleSubtypeSymbol(name)[source]
A configuration reference in a configuration instantiation.
Inheritance
- Parameters:
name (Name)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.ConstrainedScalarSubtypeSymbol(name)[source]
A configuration reference in a configuration instantiation.
Inheritance
- Parameters:
name (Name)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.ConstrainedCompositeSubtypeSymbol(name)[source]
A configuration reference in a configuration instantiation.
Inheritance
- Parameters:
name (Name)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.SimpleObjectOrFunctionCallSymbol(name)[source]
Inheritance
- Parameters:
name (Name)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.
- class pyVHDLModel.Symbol.IndexedObjectOrFunctionCallSymbol(name)[source]
Inheritance
- Parameters:
name (Name)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
-
_possibleReferences:
PossibleReference
An enumeration to filter possible references.