pyVHDLModel.Name
This module contains parts of an abstract document language model for VHDL.
VHDL uses names to express cross-references from usage locations to declarations. Here, names are single or
combined identifiers. Symbols
are structures representing a name and a reference
(pointer) to the referenced vhdl language entity.
Classes
Name
:Name
is the base-class for all names in the VHDL language model.SimpleName
: A simple name is a name made from a single word.ParenthesisName
:Name
is the base-class for all names in the VHDL language model.IndexedName
:Name
is the base-class for all names in the VHDL language model.SlicedName
:Name
is the base-class for all names in the VHDL language model.SelectedName
: A selected name is a name made from multiple words separated by a dot (.
).AttributeName
:Name
is the base-class for all names in the VHDL language model.AllName
: The all name represents the reserved wordall
used in names.OpenName
: The open name represents the reserved wordopen
.
Classes
- class pyVHDLModel.Name.Name(identifier, prefix=None, parent=None)[source]
Name
is the base-class for all names in the VHDL language model.Inheritance
- Parameters:
identifier (str)
prefix (Name | None)
parent (ModelEntity)
- __init__(identifier, prefix=None, parent=None)[source]
Initializes a VHDL model entity.
- Parameters:
parent (
ModelEntity
) – The parent model entity of this entity.identifier (str)
prefix (Name | None)
- Return type:
None
- property Identifier: str
The identifier the name is referencing.
- Returns:
The referenced identifier.
- property NormalizedIdentifier: str
The normalized identifier the name is referencing.
- Returns:
The referenced identifier (normalized).
- property Root: Name
The root (left-most) element in a chain of names.
In case the name is a
simple name
, the root points to the name itself.- Returns:
The name’s root element.
- property Prefix: Name | None
The name’s prefix in a chain of names.
- Returns:
The name left from current name, if not a simple name, otherwise
None
.
- property HasPrefix: bool
Returns true, if the name has a prefix.
This is true for all names except
simple names
.- Returns:
True
, if the name as a prefix.
- property Parent: ModelEntity
Read-only property to access the model entity’s parent element reference in a logical hierarchy (
_parent
).- Returns:
Reference to the parent entity.
-
_parent:
ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyVHDLModel.Name.SimpleName(identifier, prefix=None, parent=None)[source]
A simple name is a name made from a single word.
For example, the entity name in an architecture declaration is a simple name, while the name of the architecture itself is an identifier. The simple name references is again an identifier in the entity declaration, thus names reference other (already) declared language entities.
Inheritance
- Parameters:
identifier (str)
prefix (Name | None)
parent (ModelEntity)
- property HasPrefix: bool
Returns true, if the name has a prefix.
This is true for all names except
simple names
.- Returns:
True
, if the name as a prefix.
- property Identifier: str
The identifier the name is referencing.
- Returns:
The referenced identifier.
- property NormalizedIdentifier: str
The normalized identifier the name is referencing.
- Returns:
The referenced identifier (normalized).
- property Parent: ModelEntity
Read-only property to access the model entity’s parent element reference in a logical hierarchy (
_parent
).- Returns:
Reference to the parent entity.
- property Prefix: Name | None
The name’s prefix in a chain of names.
- Returns:
The name left from current name, if not a simple name, otherwise
None
.
- property Root: Name
The root (left-most) element in a chain of names.
In case the name is a
simple name
, the root points to the name itself.- Returns:
The name’s root element.
- __init__(identifier, prefix=None, parent=None)
Initializes a VHDL model entity.
- Parameters:
parent (
ModelEntity
) – The parent model entity of this entity.identifier (str)
prefix (Name | None)
- Return type:
None
-
_parent:
ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyVHDLModel.Name.ParenthesisName(prefix, associations, parent=None)[source]
Inheritance
- Parameters:
prefix (Name)
associations (Iterable)
parent (ModelEntity)
- __init__(prefix, associations, parent=None)[source]
Initializes a VHDL model entity.
- Parameters:
parent (
ModelEntity
) – The parent model entity of this entity.prefix (Name)
associations (Iterable)
- Return type:
None
- property HasPrefix: bool
Returns true, if the name has a prefix.
This is true for all names except
simple names
.- Returns:
True
, if the name as a prefix.
- property Identifier: str
The identifier the name is referencing.
- Returns:
The referenced identifier.
- property NormalizedIdentifier: str
The normalized identifier the name is referencing.
- Returns:
The referenced identifier (normalized).
- property Parent: ModelEntity
Read-only property to access the model entity’s parent element reference in a logical hierarchy (
_parent
).- Returns:
Reference to the parent entity.
- property Prefix: Name | None
The name’s prefix in a chain of names.
- Returns:
The name left from current name, if not a simple name, otherwise
None
.
- property Root: Name
The root (left-most) element in a chain of names.
In case the name is a
simple name
, the root points to the name itself.- Returns:
The name’s root element.
-
_parent:
ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyVHDLModel.Name.IndexedName(prefix, indices, parent=None)[source]
Inheritance
- Parameters:
prefix (Name)
indices (Iterable[BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal])
parent (ModelEntity)
- __init__(prefix, indices, parent=None)[source]
Initializes a VHDL model entity.
- Parameters:
parent (
ModelEntity
) – The parent model entity of this entity.prefix (Name)
indices (Iterable[BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal])
- Return type:
None
- property HasPrefix: bool
Returns true, if the name has a prefix.
This is true for all names except
simple names
.- Returns:
True
, if the name as a prefix.
- property Identifier: str
The identifier the name is referencing.
- Returns:
The referenced identifier.
- property NormalizedIdentifier: str
The normalized identifier the name is referencing.
- Returns:
The referenced identifier (normalized).
- property Parent: ModelEntity
Read-only property to access the model entity’s parent element reference in a logical hierarchy (
_parent
).- Returns:
Reference to the parent entity.
- property Prefix: Name | None
The name’s prefix in a chain of names.
- Returns:
The name left from current name, if not a simple name, otherwise
None
.
- property Root: Name
The root (left-most) element in a chain of names.
In case the name is a
simple name
, the root points to the name itself.- Returns:
The name’s root element.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyVHDLModel.Name.SlicedName(identifier, prefix=None, parent=None)[source]
Inheritance
- Parameters:
identifier (str)
prefix (Name | None)
parent (ModelEntity)
- property HasPrefix: bool
Returns true, if the name has a prefix.
This is true for all names except
simple names
.- Returns:
True
, if the name as a prefix.
- property Identifier: str
The identifier the name is referencing.
- Returns:
The referenced identifier.
- property NormalizedIdentifier: str
The normalized identifier the name is referencing.
- Returns:
The referenced identifier (normalized).
- property Parent: ModelEntity
Read-only property to access the model entity’s parent element reference in a logical hierarchy (
_parent
).- Returns:
Reference to the parent entity.
- property Prefix: Name | None
The name’s prefix in a chain of names.
- Returns:
The name left from current name, if not a simple name, otherwise
None
.
- property Root: Name
The root (left-most) element in a chain of names.
In case the name is a
simple name
, the root points to the name itself.- Returns:
The name’s root element.
- __init__(identifier, prefix=None, parent=None)
Initializes a VHDL model entity.
- Parameters:
parent (
ModelEntity
) – The parent model entity of this entity.identifier (str)
prefix (Name | None)
- Return type:
None
-
_parent:
ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyVHDLModel.Name.SelectedName(identifier, prefix, parent=None)[source]
A selected name is a name made from multiple words separated by a dot (
.
).For example, the library and entity name in a direct entity instantiation is a selected name. Here the entity identifier is a selected name. The library identifier is a
simple name
, which is referenced by the selected name via thePrefix
property.Inheritance
- Parameters:
identifier (str)
prefix (Name)
parent (ModelEntity)
- __init__(identifier, prefix, parent=None)[source]
Initializes a VHDL model entity.
- Parameters:
parent (
ModelEntity
) – The parent model entity of this entity.identifier (str)
prefix (Name)
- Return type:
None
- property HasPrefix: bool
Returns true, if the name has a prefix.
This is true for all names except
simple names
.- Returns:
True
, if the name as a prefix.
- property Identifier: str
The identifier the name is referencing.
- Returns:
The referenced identifier.
- property NormalizedIdentifier: str
The normalized identifier the name is referencing.
- Returns:
The referenced identifier (normalized).
- property Parent: ModelEntity
Read-only property to access the model entity’s parent element reference in a logical hierarchy (
_parent
).- Returns:
Reference to the parent entity.
- property Prefix: Name | None
The name’s prefix in a chain of names.
- Returns:
The name left from current name, if not a simple name, otherwise
None
.
- property Root: Name
The root (left-most) element in a chain of names.
In case the name is a
simple name
, the root points to the name itself.- Returns:
The name’s root element.
-
_parent:
ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyVHDLModel.Name.AttributeName(identifier, prefix, parent=None)[source]
Inheritance
- Parameters:
identifier (str)
prefix (Name)
parent (ModelEntity)
- property HasPrefix: bool
Returns true, if the name has a prefix.
This is true for all names except
simple names
.- Returns:
True
, if the name as a prefix.
- property Identifier: str
The identifier the name is referencing.
- Returns:
The referenced identifier.
- property NormalizedIdentifier: str
The normalized identifier the name is referencing.
- Returns:
The referenced identifier (normalized).
- property Parent: ModelEntity
Read-only property to access the model entity’s parent element reference in a logical hierarchy (
_parent
).- Returns:
Reference to the parent entity.
- property Prefix: Name | None
The name’s prefix in a chain of names.
- Returns:
The name left from current name, if not a simple name, otherwise
None
.
- property Root: Name
The root (left-most) element in a chain of names.
In case the name is a
simple name
, the root points to the name itself.- Returns:
The name’s root element.
-
_parent:
ModelEntity
Reference to a parent entity in the logical model hierarchy.
- __init__(identifier, prefix, parent=None)[source]
Initializes a VHDL model entity.
- Parameters:
parent (
ModelEntity
) – The parent model entity of this entity.identifier (str)
prefix (Name)
- Return type:
None
- class pyVHDLModel.Name.AllName(prefix, parent=None)[source]
The all name represents the reserved word
all
used in names.Most likely this name is used in use-statements.
Inheritance
- Parameters:
prefix (Name)
parent (ModelEntity)
- property HasPrefix: bool
Returns true, if the name has a prefix.
This is true for all names except
simple names
.- Returns:
True
, if the name as a prefix.
- property Identifier: str
The identifier the name is referencing.
- Returns:
The referenced identifier.
- property NormalizedIdentifier: str
The normalized identifier the name is referencing.
- Returns:
The referenced identifier (normalized).
- property Parent: ModelEntity
Read-only property to access the model entity’s parent element reference in a logical hierarchy (
_parent
).- Returns:
Reference to the parent entity.
- property Prefix: Name | None
The name’s prefix in a chain of names.
- Returns:
The name left from current name, if not a simple name, otherwise
None
.
- property Root: Name
The root (left-most) element in a chain of names.
In case the name is a
simple name
, the root points to the name itself.- Returns:
The name’s root element.
-
_parent:
ModelEntity
Reference to a parent entity in the logical model hierarchy.
- __init__(prefix, parent=None)[source]
Initializes a VHDL model entity.
- Parameters:
parent (
ModelEntity
) – The parent model entity of this entity.prefix (Name)
- Return type:
None
- class pyVHDLModel.Name.OpenName(parent=None)[source]
The open name represents the reserved word
open
.Most likely this name is used in port associations.
Inheritance
- Parameters:
parent (ModelEntity)
- property HasPrefix: bool
Returns true, if the name has a prefix.
This is true for all names except
simple names
.- Returns:
True
, if the name as a prefix.
- property Identifier: str
The identifier the name is referencing.
- Returns:
The referenced identifier.
- property NormalizedIdentifier: str
The normalized identifier the name is referencing.
- Returns:
The referenced identifier (normalized).
- property Parent: ModelEntity
Read-only property to access the model entity’s parent element reference in a logical hierarchy (
_parent
).- Returns:
Reference to the parent entity.
- property Prefix: Name | None
The name’s prefix in a chain of names.
- Returns:
The name left from current name, if not a simple name, otherwise
None
.
- property Root: Name
The root (left-most) element in a chain of names.
In case the name is a
simple name
, the root points to the name itself.- Returns:
The name’s root element.
-
_parent:
ModelEntity
Reference to a parent entity in the logical model hierarchy.
- __init__(parent=None)[source]
Initializes a VHDL model entity.
- Parameters:
parent (
ModelEntity
) – The parent model entity of this entity.- Return type:
None