pyVHDLModel.DesignUnit
This module contains parts of an abstract document language model for VHDL.
Design units are contexts, entities, architectures, packages and their bodies as well as configurations.
Classes
Reference
: A base-class for all references.LibraryClause
: Represents a library clause.UseClause
: Represents a use clause.ContextReference
: Represents a context reference.DesignUnitWithContextMixin
: A mixin-class for all design units with a context.DesignUnit
: A base-class for all design units.PrimaryUnit
: A base-class for all primary design units.SecondaryUnit
: A base-class for all secondary design units.Context
: Represents a context declaration.Package
: Represents a package declaration.PackageBody
: Represents a package body declaration.Entity
: Represents an entity declaration.Architecture
: Represents an architecture declaration.Component
: Represents a configuration declaration.Configuration
: Represents a configuration declaration.
Classes
- class pyVHDLModel.DesignUnit.Reference(symbols, parent=None)[source]
A base-class for all references.
See also
Inheritance
- Parameters:
parent (ModelEntity)
- __init__(symbols, parent=None)[source]
Initializes a reference by taking a list of symbols and a parent reference.
- Parameters:
symbols (
Iterable
[Symbol
]) – A list of symbols this reference references to.parent (
ModelEntity
) – Reference to the logical parent in the model hierarchy.
- Return type:
None
- property Symbols: List[Symbol]
Read-only property to access the symbols this reference references to (
_symbols
).- Returns:
A list of symbols.
- 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.DesignUnit.LibraryClause(symbols, parent=None)[source]
Represents a library clause.
Example
library std, ieee;
Inheritance
- Parameters:
parent (ModelEntity)
- property Symbols: List[LibraryReferenceSymbol]
Read-only property to access the symbols this library clause references to (
_symbols
).- Returns:
A list of library reference symbols.
- 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.
- __init__(symbols, parent=None)
Initializes a reference by taking a list of symbols and a parent reference.
- Parameters:
symbols (
Iterable
[Symbol
]) – A list of symbols this reference references to.parent (
ModelEntity
) – Reference to the logical parent in the model hierarchy.
- Return type:
None
-
_parent:
ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyVHDLModel.DesignUnit.UseClause(symbols, parent=None)[source]
Represents a use clause.
Example
use std.text_io.all, ieee.numeric_std.all;
Inheritance
- Parameters:
parent (ModelEntity)
- 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 Symbols: List[Symbol]
Read-only property to access the symbols this reference references to (
_symbols
).- Returns:
A list of symbols.
- __init__(symbols, parent=None)
Initializes a reference by taking a list of symbols and a parent reference.
- Parameters:
symbols (
Iterable
[Symbol
]) – A list of symbols this reference references to.parent (
ModelEntity
) – Reference to the logical parent in the model hierarchy.
- Return type:
None
-
_parent:
ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyVHDLModel.DesignUnit.ContextReference(symbols, parent=None)[source]
Represents a context reference.
Hint
It’s called context reference not context clause by the LRM.
Example
context ieee.ieee_std_context;
Inheritance
- Parameters:
parent (ModelEntity)
- 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 Symbols: List[Symbol]
Read-only property to access the symbols this reference references to (
_symbols
).- Returns:
A list of symbols.
- __init__(symbols, parent=None)
Initializes a reference by taking a list of symbols and a parent reference.
- Parameters:
symbols (
Iterable
[Symbol
]) – A list of symbols this reference references to.parent (
ModelEntity
) – Reference to the logical parent in the model hierarchy.
- Return type:
None
-
_parent:
ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyVHDLModel.DesignUnit.DesignUnitWithContextMixin[source]
A mixin-class for all design units with a context.
Inheritance
- class pyVHDLModel.DesignUnit.DesignUnit(identifier, contextItems=None, documentation=None, parent=None)[source]
A base-class for all design units.
See also
Inheritance
- Parameters:
identifier (str)
contextItems (Iterable[LibraryClause | UseClause | ContextReference] | None)
documentation (str | None)
parent (ModelEntity)
- __init__(identifier, contextItems=None, documentation=None, parent=None)[source]
Initializes a design unit.
- Parameters:
identifier (
str
) – Identifier (name) of the design unit.contextItems (
Optional
[Iterable
[Union
[LibraryClause
,UseClause
,ContextReference
]]]) – A sequence of library, use or context clauses.documentation (
Optional
[str
]) – Associated documentation of the design unit.parent (
ModelEntity
) – Reference to the logical parent in the model hierarchy.
- Return type:
None
- _document: Document
The VHDL library, the design unit was analyzed into.
-
_referencedLibraries:
Dict
[str
, Library] Referenced libraries based on explicit library clauses or implicit inheritance
-
_referencedPackages:
Dict
[str
,Dict
[str
, Package]] Referenced packages based on explicit use clauses or implicit inheritance
-
_referencedContexts:
Dict
[str
, Context] Referenced contexts based on explicit context references or implicit inheritance
-
_dependencyVertex:
Vertex
[None
,None
,str
, DesignUnit,None
,None
,None
,None
,None
,None
,None
,None
,None
,None
,None
,None
,None
] Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph()
.
-
_hierarchyVertex:
Vertex
[None
,None
,str
, DesignUnit,None
,None
,None
,None
,None
,None
,None
,None
,None
,None
,None
,None
,None
] The vertex in the hierarchy graph
- property ContextItems: List[LibraryClause | UseClause | ContextReference]
Read-only property to access the sequence of all context items comprising library, use and context clauses (
_contextItems
).- Returns:
Sequence of context items.
- property ContextReferences: List[ContextReference]
Read-only property to access the sequence of context clauses (
_contextReferences
).- Returns:
Sequence of context clauses.
- property LibraryReferences: List[LibraryClause]
Read-only property to access the sequence of library clauses (
_libraryReferences
).- Returns:
Sequence of library clauses.
- property PackageReferences: List[UseClause]
Read-only property to access the sequence of use clauses (
_packageReferences
).- Returns:
Sequence of use clauses.
- property DependencyVertex: Vertex
Read-only property to access the corresponding dependency vertex (
_dependencyVertex
).The dependency vertex references this design unit by its value field.
- Returns:
The corresponding dependency vertex.
- property HierarchyVertex: Vertex
Read-only property to access the corresponding hierarchy vertex (
_hierarchyVertex
).The hierarchy vertex references this design unit by its value field.
- Returns:
The corresponding hierarchy vertex.
- _identifier: str
The identifier of a model entity.
- _normalizedIdentifier: str
The normalized (lower case) identifier of a model entity.
- _documentation: Nullable[str]
The associated documentation of a model entity.
- property Documentation: str | None
Returns a model entity’s associated documentation.
- Returns:
Associated documentation of a model entity.
- property Identifier: str
Returns a model entity’s identifier (name).
- Returns:
Name of a model entity.
- property NormalizedIdentifier: str
Returns a model entity’s normalized identifier (lower case name).
- Returns:
Normalized name of a model entity.
- 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.DesignUnit.PrimaryUnit(identifier, contextItems=None, documentation=None, parent=None)[source]
A base-class for all primary design units.
See also
Inheritance
- Parameters:
identifier (str)
contextItems (Iterable[LibraryClause | UseClause | ContextReference] | None)
documentation (str | None)
parent (ModelEntity)
- property ContextItems: List[LibraryClause | UseClause | ContextReference]
Read-only property to access the sequence of all context items comprising library, use and context clauses (
_contextItems
).- Returns:
Sequence of context items.
- property ContextReferences: List[ContextReference]
Read-only property to access the sequence of context clauses (
_contextReferences
).- Returns:
Sequence of context clauses.
- property DependencyVertex: Vertex
Read-only property to access the corresponding dependency vertex (
_dependencyVertex
).The dependency vertex references this design unit by its value field.
- Returns:
The corresponding dependency vertex.
- property Documentation: str | None
Returns a model entity’s associated documentation.
- Returns:
Associated documentation of a model entity.
- property HierarchyVertex: Vertex
Read-only property to access the corresponding hierarchy vertex (
_hierarchyVertex
).The hierarchy vertex references this design unit by its value field.
- Returns:
The corresponding hierarchy vertex.
- property Identifier: str
Returns a model entity’s identifier (name).
- Returns:
Name of a model entity.
- property LibraryReferences: List[LibraryClause]
Read-only property to access the sequence of library clauses (
_libraryReferences
).- Returns:
Sequence of library clauses.
- property NormalizedIdentifier: str
Returns a model entity’s normalized identifier (lower case name).
- Returns:
Normalized name of a model entity.
- property PackageReferences: List[UseClause]
Read-only property to access the sequence of use clauses (
_packageReferences
).- Returns:
Sequence of use clauses.
- 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.
- __init__(identifier, contextItems=None, documentation=None, parent=None)
Initializes a design unit.
- Parameters:
identifier (
str
) – Identifier (name) of the design unit.contextItems (
Optional
[Iterable
[Union
[LibraryClause
,UseClause
,ContextReference
]]]) – A sequence of library, use or context clauses.documentation (
Optional
[str
]) – Associated documentation of the design unit.parent (
ModelEntity
) – Reference to the logical parent in the model hierarchy.
- Return type:
None
- _contextItems: List['ContextUnion']
List of all context items (library, use and context clauses).
- _contextReferences: List['ContextReference']
List of context clauses.
- _dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph()
.
- _document: Document
The VHDL library, the design unit was analyzed into.
- _documentation: Nullable[str]
The associated documentation of a model entity.
- _hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]
The vertex in the hierarchy graph
- _identifier: str
The identifier of a model entity.
- _libraryReferences: List['LibraryClause']
List of library clauses.
- _normalizedIdentifier: str
The normalized (lower case) identifier of a model entity.
- _packageReferences: List['UseClause']
List of use clauses.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _referencedContexts: Dict[str, 'Context']
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries: Dict[str, 'Library']
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages: Dict[str, Dict[str, 'Package']]
Referenced packages based on explicit use clauses or implicit inheritance
- class pyVHDLModel.DesignUnit.SecondaryUnit(identifier, contextItems=None, documentation=None, parent=None)[source]
A base-class for all secondary design units.
See also
Inheritance
- Parameters:
identifier (str)
contextItems (Iterable[LibraryClause | UseClause | ContextReference] | None)
documentation (str | None)
parent (ModelEntity)
- property ContextItems: List[LibraryClause | UseClause | ContextReference]
Read-only property to access the sequence of all context items comprising library, use and context clauses (
_contextItems
).- Returns:
Sequence of context items.
- property ContextReferences: List[ContextReference]
Read-only property to access the sequence of context clauses (
_contextReferences
).- Returns:
Sequence of context clauses.
- property DependencyVertex: Vertex
Read-only property to access the corresponding dependency vertex (
_dependencyVertex
).The dependency vertex references this design unit by its value field.
- Returns:
The corresponding dependency vertex.
- property Documentation: str | None
Returns a model entity’s associated documentation.
- Returns:
Associated documentation of a model entity.
- property HierarchyVertex: Vertex
Read-only property to access the corresponding hierarchy vertex (
_hierarchyVertex
).The hierarchy vertex references this design unit by its value field.
- Returns:
The corresponding hierarchy vertex.
- property Identifier: str
Returns a model entity’s identifier (name).
- Returns:
Name of a model entity.
- property LibraryReferences: List[LibraryClause]
Read-only property to access the sequence of library clauses (
_libraryReferences
).- Returns:
Sequence of library clauses.
- property NormalizedIdentifier: str
Returns a model entity’s normalized identifier (lower case name).
- Returns:
Normalized name of a model entity.
- property PackageReferences: List[UseClause]
Read-only property to access the sequence of use clauses (
_packageReferences
).- Returns:
Sequence of use clauses.
- 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.
- __init__(identifier, contextItems=None, documentation=None, parent=None)
Initializes a design unit.
- Parameters:
identifier (
str
) – Identifier (name) of the design unit.contextItems (
Optional
[Iterable
[Union
[LibraryClause
,UseClause
,ContextReference
]]]) – A sequence of library, use or context clauses.documentation (
Optional
[str
]) – Associated documentation of the design unit.parent (
ModelEntity
) – Reference to the logical parent in the model hierarchy.
- Return type:
None
- _contextItems: List['ContextUnion']
List of all context items (library, use and context clauses).
- _contextReferences: List['ContextReference']
List of context clauses.
- _dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph()
.
- _document: Document
The VHDL library, the design unit was analyzed into.
- _documentation: Nullable[str]
The associated documentation of a model entity.
- _hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]
The vertex in the hierarchy graph
- _identifier: str
The identifier of a model entity.
- _libraryReferences: List['LibraryClause']
List of library clauses.
- _normalizedIdentifier: str
The normalized (lower case) identifier of a model entity.
- _packageReferences: List['UseClause']
List of use clauses.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _referencedContexts: Dict[str, 'Context']
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries: Dict[str, 'Library']
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages: Dict[str, Dict[str, 'Package']]
Referenced packages based on explicit use clauses or implicit inheritance
- class pyVHDLModel.DesignUnit.Context(identifier, references=None, documentation=None, parent=None)[source]
Represents a context declaration.
A context contains a generic list of all its items (library clauses, use clauses and context references) in
_references
.Furthermore, when a context gets initialized, the item kinds get separated into individual lists:
When
pyVHDLModel.Design.LinkContexts()
got called, these lists were processed and the fields:_referencedLibraries
(Dict[libName, Library]
)_referencedPackages
(Dict[libName, [pkgName, Package]]
)_referencedContexts
(Dict[libName, [ctxName, Context]]
)
are populated.
Example
context ctx is -- ... end context;
Inheritance
- Parameters:
identifier (str)
references (Iterable[LibraryClause | UseClause | ContextReference] | None)
documentation (str | None)
parent (ModelEntity)
- __init__(identifier, references=None, documentation=None, parent=None)[source]
Initializes a design unit.
- Parameters:
identifier (
str
) – Identifier (name) of the design unit.contextItems – A sequence of library, use or context clauses.
documentation (
Optional
[str
]) – Associated documentation of the design unit.parent (
ModelEntity
) – Reference to the logical parent in the model hierarchy.references (Iterable[LibraryClause | UseClause | ContextReference] | None)
- Return type:
None
- _libraryReferences: List['LibraryClause']
List of library clauses.
- _packageReferences: List['UseClause']
List of use clauses.
- _contextReferences: List['ContextReference']
List of context clauses.
- property LibraryReferences: List[LibraryClause]
Read-only property to access the sequence of library clauses (
_libraryReferences
).- Returns:
Sequence of library clauses.
- property PackageReferences: List[UseClause]
Read-only property to access the sequence of use clauses (
_packageReferences
).- Returns:
Sequence of use clauses.
- property ContextReferences: List[ContextReference]
Read-only property to access the sequence of context clauses (
_contextReferences
).- Returns:
Sequence of context clauses.
- property ContextItems: List[LibraryClause | UseClause | ContextReference]
Read-only property to access the sequence of all context items comprising library, use and context clauses (
_contextItems
).- Returns:
Sequence of context items.
- property DependencyVertex: Vertex
Read-only property to access the corresponding dependency vertex (
_dependencyVertex
).The dependency vertex references this design unit by its value field.
- Returns:
The corresponding dependency vertex.
- property Documentation: str | None
Returns a model entity’s associated documentation.
- Returns:
Associated documentation of a model entity.
- property HierarchyVertex: Vertex
Read-only property to access the corresponding hierarchy vertex (
_hierarchyVertex
).The hierarchy vertex references this design unit by its value field.
- Returns:
The corresponding hierarchy vertex.
- property Identifier: str
Returns a model entity’s identifier (name).
- Returns:
Name of a model entity.
- property NormalizedIdentifier: str
Returns a model entity’s normalized identifier (lower case name).
- Returns:
Normalized name of a model entity.
- 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.
- _contextItems: List['ContextUnion']
List of all context items (library, use and context clauses).
- _dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph()
.
- _document: Document
The VHDL library, the design unit was analyzed into.
- _documentation: Nullable[str]
The associated documentation of a model entity.
- _hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]
The vertex in the hierarchy graph
- _identifier: str
The identifier of a model entity.
- _normalizedIdentifier: str
The normalized (lower case) identifier of a model entity.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _referencedContexts: Dict[str, 'Context']
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries: Dict[str, 'Library']
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages: Dict[str, Dict[str, 'Package']]
Referenced packages based on explicit use clauses or implicit inheritance
- class pyVHDLModel.DesignUnit.Package(identifier, contextItems=None, genericItems=None, declaredItems=None, documentation=None, parent=None)[source]
Represents a package declaration.
Example
package pkg is -- ... end package;
Inheritance
- Parameters:
identifier (str)
contextItems (Iterable[LibraryClause | UseClause | ContextReference] | None)
genericItems (Iterable[GenericInterfaceItemMixin] | None)
declaredItems (Iterable | None)
documentation (str | None)
parent (ModelEntity)
- __init__(identifier, contextItems=None, genericItems=None, declaredItems=None, documentation=None, parent=None)[source]
Initializes a design unit.
- Parameters:
identifier (
str
) – Identifier (name) of the design unit.contextItems (
Optional
[Iterable
[Union
[LibraryClause
,UseClause
,ContextReference
]]]) – A sequence of library, use or context clauses.documentation (
Optional
[str
]) – Associated documentation of the design unit.parent (
ModelEntity
) – Reference to the logical parent in the model hierarchy.genericItems (Iterable[GenericInterfaceItemMixin] | None)
declaredItems (Iterable | None)
- Return type:
None
- _declaredItems: List
List of all declared items in this concurrent declaration region.
- _types: Dict[str, FullType]
Dictionary of all types declared in this concurrent declaration region.
- _subtypes: Dict[str, Subtype]
Dictionary of all subtypes declared in this concurrent declaration region.
- _constants: Dict[str, Constant]
Dictionary of all constants declared in this concurrent declaration region.
- _signals: Dict[str, Signal]
Dictionary of all signals declared in this concurrent declaration region.
Dictionary of all shared variables declared in this concurrent declaration region.
- _files: Dict[str, File]
Dictionary of all files declared in this concurrent declaration region.
- _functions: Dict[str, Dict[str, Function]]
Dictionary of all functions declared in this concurrent declaration region.
- _procedures: Dict[str, Dict[str, Procedure]]
Dictionary of all procedures declared in this concurrent declaration region.
- property ContextItems: List[LibraryClause | UseClause | ContextReference]
Read-only property to access the sequence of all context items comprising library, use and context clauses (
_contextItems
).- Returns:
Sequence of context items.
- property ContextReferences: List[ContextReference]
Read-only property to access the sequence of context clauses (
_contextReferences
).- Returns:
Sequence of context clauses.
- property DependencyVertex: Vertex
Read-only property to access the corresponding dependency vertex (
_dependencyVertex
).The dependency vertex references this design unit by its value field.
- Returns:
The corresponding dependency vertex.
- property Documentation: str | None
Returns a model entity’s associated documentation.
- Returns:
Associated documentation of a model entity.
- property HierarchyVertex: Vertex
Read-only property to access the corresponding hierarchy vertex (
_hierarchyVertex
).The hierarchy vertex references this design unit by its value field.
- Returns:
The corresponding hierarchy vertex.
- property Identifier: str
Returns a model entity’s identifier (name).
- Returns:
Name of a model entity.
- IndexDeclaredItems()
Index declared items listed in the concurrent declaration region.
- Return type:
Algorithm
Iterate all declared items:
Every declared item is added to
_namespace
.If the declared item is a
FullType
, then add an entry to_types
.If the declared item is a
SubType
, then add an entry to_subtypes
.If the declared item is a
Function
, then add an entry to_functions
.If the declared item is a
Procedure
, then add an entry to_procedures
.If the declared item is a
Constant
, then add an entry to_constants
.If the declared item is a
Signal
, then add an entry to_signals
.If the declared item is a
Variable
, TODO.If the declared item is a
SharedVariable
, then add an entry to_sharedVariables
.If the declared item is a
File
, then add an entry to_files
.If the declared item is neither of these types, call
_IndexOtherDeclaredItem()
.
Derived classes may override this virtual function.
See also
pyVHDLModel.Design.IndexPackages()
Iterate all packages in the design and index declared items.
pyVHDLModel.Library.IndexPackages()
Iterate all packages in the library and index declared items.
pyVHDLModel.Library._IndexOtherDeclaredItem()
Iterate all packages in the library and index declared items.
- property LibraryReferences: List[LibraryClause]
Read-only property to access the sequence of library clauses (
_libraryReferences
).- Returns:
Sequence of library clauses.
- property NormalizedIdentifier: str
Returns a model entity’s normalized identifier (lower case name).
- Returns:
Normalized name of a model entity.
- property PackageReferences: List[UseClause]
Read-only property to access the sequence of use clauses (
_packageReferences
).- Returns:
Sequence of use clauses.
- 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.
- _contextItems: List['ContextUnion']
List of all context items (library, use and context clauses).
- _contextReferences: List['ContextReference']
List of context clauses.
- _dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph()
.
- _document: Document
The VHDL library, the design unit was analyzed into.
- _documentation: Nullable[str]
The associated documentation of a model entity.
- _hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]
The vertex in the hierarchy graph
- _identifier: str
The identifier of a model entity.
- _libraryReferences: List['LibraryClause']
List of library clauses.
- _normalizedIdentifier: str
The normalized (lower case) identifier of a model entity.
- _packageReferences: List['UseClause']
List of use clauses.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _referencedContexts: Dict[str, 'Context']
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries: Dict[str, 'Library']
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages: Dict[str, Dict[str, 'Package']]
Referenced packages based on explicit use clauses or implicit inheritance
- class pyVHDLModel.DesignUnit.PackageBody(packageSymbol, contextItems=None, declaredItems=None, documentation=None, parent=None)[source]
Represents a package body declaration.
Example
package body pkg is -- ... end package body;
Inheritance
- Parameters:
packageSymbol (PackageSymbol)
contextItems (Iterable[LibraryClause | UseClause | ContextReference] | None)
declaredItems (Iterable | None)
documentation (str | None)
parent (ModelEntity)
- __init__(packageSymbol, contextItems=None, declaredItems=None, documentation=None, parent=None)[source]
Initializes a design unit.
- Parameters:
identifier – Identifier (name) of the design unit.
contextItems (
Optional
[Iterable
[Union
[LibraryClause
,UseClause
,ContextReference
]]]) – A sequence of library, use or context clauses.documentation (
Optional
[str
]) – Associated documentation of the design unit.parent (
ModelEntity
) – Reference to the logical parent in the model hierarchy.packageSymbol (PackageSymbol)
declaredItems (Iterable | None)
- Return type:
None
- _declaredItems: List
List of all declared items in this concurrent declaration region.
- _types: Dict[str, FullType]
Dictionary of all types declared in this concurrent declaration region.
- _subtypes: Dict[str, Subtype]
Dictionary of all subtypes declared in this concurrent declaration region.
- _constants: Dict[str, Constant]
Dictionary of all constants declared in this concurrent declaration region.
- _signals: Dict[str, Signal]
Dictionary of all signals declared in this concurrent declaration region.
Dictionary of all shared variables declared in this concurrent declaration region.
- _files: Dict[str, File]
Dictionary of all files declared in this concurrent declaration region.
- _functions: Dict[str, Dict[str, Function]]
Dictionary of all functions declared in this concurrent declaration region.
- _procedures: Dict[str, Dict[str, Procedure]]
Dictionary of all procedures declared in this concurrent declaration region.
- property ContextItems: List[LibraryClause | UseClause | ContextReference]
Read-only property to access the sequence of all context items comprising library, use and context clauses (
_contextItems
).- Returns:
Sequence of context items.
- property ContextReferences: List[ContextReference]
Read-only property to access the sequence of context clauses (
_contextReferences
).- Returns:
Sequence of context clauses.
- property DependencyVertex: Vertex
Read-only property to access the corresponding dependency vertex (
_dependencyVertex
).The dependency vertex references this design unit by its value field.
- Returns:
The corresponding dependency vertex.
- property Documentation: str | None
Returns a model entity’s associated documentation.
- Returns:
Associated documentation of a model entity.
- property HierarchyVertex: Vertex
Read-only property to access the corresponding hierarchy vertex (
_hierarchyVertex
).The hierarchy vertex references this design unit by its value field.
- Returns:
The corresponding hierarchy vertex.
- property Identifier: str
Returns a model entity’s identifier (name).
- Returns:
Name of a model entity.
- IndexDeclaredItems()
Index declared items listed in the concurrent declaration region.
- Return type:
Algorithm
Iterate all declared items:
Every declared item is added to
_namespace
.If the declared item is a
FullType
, then add an entry to_types
.If the declared item is a
SubType
, then add an entry to_subtypes
.If the declared item is a
Function
, then add an entry to_functions
.If the declared item is a
Procedure
, then add an entry to_procedures
.If the declared item is a
Constant
, then add an entry to_constants
.If the declared item is a
Signal
, then add an entry to_signals
.If the declared item is a
Variable
, TODO.If the declared item is a
SharedVariable
, then add an entry to_sharedVariables
.If the declared item is a
File
, then add an entry to_files
.If the declared item is neither of these types, call
_IndexOtherDeclaredItem()
.
Derived classes may override this virtual function.
See also
pyVHDLModel.Design.IndexPackages()
Iterate all packages in the design and index declared items.
pyVHDLModel.Library.IndexPackages()
Iterate all packages in the library and index declared items.
pyVHDLModel.Library._IndexOtherDeclaredItem()
Iterate all packages in the library and index declared items.
- property LibraryReferences: List[LibraryClause]
Read-only property to access the sequence of library clauses (
_libraryReferences
).- Returns:
Sequence of library clauses.
- property NormalizedIdentifier: str
Returns a model entity’s normalized identifier (lower case name).
- Returns:
Normalized name of a model entity.
- property PackageReferences: List[UseClause]
Read-only property to access the sequence of use clauses (
_packageReferences
).- Returns:
Sequence of use clauses.
- 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.
- _contextItems: List['ContextUnion']
List of all context items (library, use and context clauses).
- _contextReferences: List['ContextReference']
List of context clauses.
- _dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph()
.
- _document: Document
The VHDL library, the design unit was analyzed into.
- _documentation: Nullable[str]
The associated documentation of a model entity.
- _hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]
The vertex in the hierarchy graph
- _identifier: str
The identifier of a model entity.
- _libraryReferences: List['LibraryClause']
List of library clauses.
- _normalizedIdentifier: str
The normalized (lower case) identifier of a model entity.
- _packageReferences: List['UseClause']
List of use clauses.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _referencedContexts: Dict[str, 'Context']
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries: Dict[str, 'Library']
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages: Dict[str, Dict[str, 'Package']]
Referenced packages based on explicit use clauses or implicit inheritance
- class pyVHDLModel.DesignUnit.Entity(identifier, contextItems=None, genericItems=None, portItems=None, declaredItems=None, statements=None, documentation=None, parent=None)[source]
Represents an entity declaration.
Example
entity ent is -- ... end entity;
Inheritance
- Parameters:
identifier (str)
contextItems (Iterable[LibraryClause | UseClause | ContextReference] | None)
genericItems (Iterable[GenericInterfaceItemMixin] | None)
portItems (Iterable[PortInterfaceItemMixin] | None)
declaredItems (Iterable | None)
statements (Iterable[ConcurrentStatement] | None)
documentation (str | None)
parent (ModelEntity)
- __init__(identifier, contextItems=None, genericItems=None, portItems=None, declaredItems=None, statements=None, documentation=None, parent=None)[source]
Initializes a design unit.
- Parameters:
identifier (
str
) – Identifier (name) of the design unit.contextItems (
Optional
[Iterable
[Union
[LibraryClause
,UseClause
,ContextReference
]]]) – A sequence of library, use or context clauses.documentation (
Optional
[str
]) – Associated documentation of the design unit.parent (
ModelEntity
) – Reference to the logical parent in the model hierarchy.genericItems (Iterable[GenericInterfaceItemMixin] | None)
portItems (Iterable[PortInterfaceItemMixin] | None)
declaredItems (Iterable | None)
statements (Iterable[ConcurrentStatement] | None)
- Return type:
None
- _declaredItems: List
List of all declared items in this concurrent declaration region.
- _types: Dict[str, FullType]
Dictionary of all types declared in this concurrent declaration region.
- _subtypes: Dict[str, Subtype]
Dictionary of all subtypes declared in this concurrent declaration region.
- _constants: Dict[str, Constant]
Dictionary of all constants declared in this concurrent declaration region.
- _signals: Dict[str, Signal]
Dictionary of all signals declared in this concurrent declaration region.
Dictionary of all shared variables declared in this concurrent declaration region.
- _files: Dict[str, File]
Dictionary of all files declared in this concurrent declaration region.
- _functions: Dict[str, Dict[str, Function]]
Dictionary of all functions declared in this concurrent declaration region.
- _procedures: Dict[str, Dict[str, Procedure]]
Dictionary of all procedures declared in this concurrent declaration region.
- property ContextItems: List[LibraryClause | UseClause | ContextReference]
Read-only property to access the sequence of all context items comprising library, use and context clauses (
_contextItems
).- Returns:
Sequence of context items.
- property ContextReferences: List[ContextReference]
Read-only property to access the sequence of context clauses (
_contextReferences
).- Returns:
Sequence of context clauses.
- property DependencyVertex: Vertex
Read-only property to access the corresponding dependency vertex (
_dependencyVertex
).The dependency vertex references this design unit by its value field.
- Returns:
The corresponding dependency vertex.
- property Documentation: str | None
Returns a model entity’s associated documentation.
- Returns:
Associated documentation of a model entity.
- property HierarchyVertex: Vertex
Read-only property to access the corresponding hierarchy vertex (
_hierarchyVertex
).The hierarchy vertex references this design unit by its value field.
- Returns:
The corresponding hierarchy vertex.
- property Identifier: str
Returns a model entity’s identifier (name).
- Returns:
Name of a model entity.
- IndexDeclaredItems()
Index declared items listed in the concurrent declaration region.
- Return type:
Algorithm
Iterate all declared items:
Every declared item is added to
_namespace
.If the declared item is a
FullType
, then add an entry to_types
.If the declared item is a
SubType
, then add an entry to_subtypes
.If the declared item is a
Function
, then add an entry to_functions
.If the declared item is a
Procedure
, then add an entry to_procedures
.If the declared item is a
Constant
, then add an entry to_constants
.If the declared item is a
Signal
, then add an entry to_signals
.If the declared item is a
Variable
, TODO.If the declared item is a
SharedVariable
, then add an entry to_sharedVariables
.If the declared item is a
File
, then add an entry to_files
.If the declared item is neither of these types, call
_IndexOtherDeclaredItem()
.
Derived classes may override this virtual function.
See also
pyVHDLModel.Design.IndexPackages()
Iterate all packages in the design and index declared items.
pyVHDLModel.Library.IndexPackages()
Iterate all packages in the library and index declared items.
pyVHDLModel.Library._IndexOtherDeclaredItem()
Iterate all packages in the library and index declared items.
- property LibraryReferences: List[LibraryClause]
Read-only property to access the sequence of library clauses (
_libraryReferences
).- Returns:
Sequence of library clauses.
- property NormalizedIdentifier: str
Returns a model entity’s normalized identifier (lower case name).
- Returns:
Normalized name of a model entity.
- property PackageReferences: List[UseClause]
Read-only property to access the sequence of use clauses (
_packageReferences
).- Returns:
Sequence of use clauses.
- 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.
- _contextItems: List['ContextUnion']
List of all context items (library, use and context clauses).
- _contextReferences: List['ContextReference']
List of context clauses.
- _dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph()
.
- _document: Document
The VHDL library, the design unit was analyzed into.
- _documentation: Nullable[str]
The associated documentation of a model entity.
- _hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]
The vertex in the hierarchy graph
- _identifier: str
The identifier of a model entity.
- _libraryReferences: List['LibraryClause']
List of library clauses.
- _normalizedIdentifier: str
The normalized (lower case) identifier of a model entity.
- _packageReferences: List['UseClause']
List of use clauses.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _referencedContexts: Dict[str, 'Context']
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries: Dict[str, 'Library']
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages: Dict[str, Dict[str, 'Package']]
Referenced packages based on explicit use clauses or implicit inheritance
- class pyVHDLModel.DesignUnit.Architecture(identifier, entity, contextItems=None, declaredItems=None, statements=None, documentation=None, parent=None)[source]
Represents an architecture declaration.
Example
architecture rtl of ent is -- ... begin -- ... end architecture;
Inheritance
- Parameters:
identifier (str)
entity (EntitySymbol)
declaredItems (Iterable | None)
statements (Iterable[ConcurrentStatement])
documentation (str | None)
parent (ModelEntity)
- _declaredItems: List
List of all declared items in this concurrent declaration region.
- _types: Dict[str, FullType]
Dictionary of all types declared in this concurrent declaration region.
- _subtypes: Dict[str, Subtype]
Dictionary of all subtypes declared in this concurrent declaration region.
- _constants: Dict[str, Constant]
Dictionary of all constants declared in this concurrent declaration region.
- _signals: Dict[str, Signal]
Dictionary of all signals declared in this concurrent declaration region.
Dictionary of all shared variables declared in this concurrent declaration region.
- _files: Dict[str, File]
Dictionary of all files declared in this concurrent declaration region.
- _functions: Dict[str, Dict[str, Function]]
Dictionary of all functions declared in this concurrent declaration region.
- _procedures: Dict[str, Dict[str, Procedure]]
Dictionary of all procedures declared in this concurrent declaration region.
- property ContextItems: List[LibraryClause | UseClause | ContextReference]
Read-only property to access the sequence of all context items comprising library, use and context clauses (
_contextItems
).- Returns:
Sequence of context items.
- property ContextReferences: List[ContextReference]
Read-only property to access the sequence of context clauses (
_contextReferences
).- Returns:
Sequence of context clauses.
- property DependencyVertex: Vertex
Read-only property to access the corresponding dependency vertex (
_dependencyVertex
).The dependency vertex references this design unit by its value field.
- Returns:
The corresponding dependency vertex.
- property Documentation: str | None
Returns a model entity’s associated documentation.
- Returns:
Associated documentation of a model entity.
- property HierarchyVertex: Vertex
Read-only property to access the corresponding hierarchy vertex (
_hierarchyVertex
).The hierarchy vertex references this design unit by its value field.
- Returns:
The corresponding hierarchy vertex.
- property Identifier: str
Returns a model entity’s identifier (name).
- Returns:
Name of a model entity.
- IndexDeclaredItems()
Index declared items listed in the concurrent declaration region.
- Return type:
Algorithm
Iterate all declared items:
Every declared item is added to
_namespace
.If the declared item is a
FullType
, then add an entry to_types
.If the declared item is a
SubType
, then add an entry to_subtypes
.If the declared item is a
Function
, then add an entry to_functions
.If the declared item is a
Procedure
, then add an entry to_procedures
.If the declared item is a
Constant
, then add an entry to_constants
.If the declared item is a
Signal
, then add an entry to_signals
.If the declared item is a
Variable
, TODO.If the declared item is a
SharedVariable
, then add an entry to_sharedVariables
.If the declared item is a
File
, then add an entry to_files
.If the declared item is neither of these types, call
_IndexOtherDeclaredItem()
.
Derived classes may override this virtual function.
See also
pyVHDLModel.Design.IndexPackages()
Iterate all packages in the design and index declared items.
pyVHDLModel.Library.IndexPackages()
Iterate all packages in the library and index declared items.
pyVHDLModel.Library._IndexOtherDeclaredItem()
Iterate all packages in the library and index declared items.
- property LibraryReferences: List[LibraryClause]
Read-only property to access the sequence of library clauses (
_libraryReferences
).- Returns:
Sequence of library clauses.
- property NormalizedIdentifier: str
Returns a model entity’s normalized identifier (lower case name).
- Returns:
Normalized name of a model entity.
- property PackageReferences: List[UseClause]
Read-only property to access the sequence of use clauses (
_packageReferences
).- Returns:
Sequence of use clauses.
- 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.
- _contextItems: List['ContextUnion']
List of all context items (library, use and context clauses).
- _contextReferences: List['ContextReference']
List of context clauses.
- _dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph()
.
- _document: Document
The VHDL library, the design unit was analyzed into.
- _documentation: Nullable[str]
The associated documentation of a model entity.
- _hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]
The vertex in the hierarchy graph
- _identifier: str
The identifier of a model entity.
- _libraryReferences: List['LibraryClause']
List of library clauses.
- _normalizedIdentifier: str
The normalized (lower case) identifier of a model entity.
- _packageReferences: List['UseClause']
List of use clauses.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _referencedContexts: Dict[str, 'Context']
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries: Dict[str, 'Library']
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages: Dict[str, Dict[str, 'Package']]
Referenced packages based on explicit use clauses or implicit inheritance
- __init__(identifier, entity, contextItems=None, declaredItems=None, statements=None, documentation=None, parent=None)[source]
Initializes a design unit.
- Parameters:
identifier (
str
) – Identifier (name) of the design unit.contextItems (
Optional
[Iterable
[Context
]]) – A sequence of library, use or context clauses.documentation (
Optional
[str
]) – Associated documentation of the design unit.parent (
ModelEntity
) – Reference to the logical parent in the model hierarchy.entity (EntitySymbol)
declaredItems (Iterable | None)
statements (Iterable[ConcurrentStatement])
- Return type:
None
- class pyVHDLModel.DesignUnit.Component(identifier, genericItems=None, portItems=None, documentation=None, parent=None)[source]
Represents a configuration declaration.
Example
component ent is -- ... end component;
Inheritance
- Parameters:
identifier (str)
genericItems (Iterable[GenericInterfaceItemMixin] | None)
portItems (Iterable[PortInterfaceItemMixin] | None)
documentation (str | None)
parent (ModelEntity)
- property Documentation: str | None
Returns a model entity’s associated documentation.
- Returns:
Associated documentation of a model entity.
- property Identifier: str
Returns a model entity’s identifier (name).
- Returns:
Name of a model entity.
- property NormalizedIdentifier: str
Returns a model entity’s normalized identifier (lower case name).
- Returns:
Normalized name of a model entity.
- 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.
- __init__(identifier, genericItems=None, portItems=None, documentation=None, parent=None)[source]
Initializes a VHDL model entity.
- Parameters:
parent (
ModelEntity
) – The parent model entity of this entity.identifier (str)
genericItems (Iterable[GenericInterfaceItemMixin] | None)
portItems (Iterable[PortInterfaceItemMixin] | None)
documentation (str | None)
- Return type:
None
- class pyVHDLModel.DesignUnit.Configuration(identifier, contextItems=None, documentation=None, parent=None)[source]
Represents a configuration declaration.
Example
configuration cfg of ent is for rtl -- ... end for; end configuration;
Inheritance
- Parameters:
identifier (str)
documentation (str | None)
parent (ModelEntity)
- property ContextItems: List[LibraryClause | UseClause | ContextReference]
Read-only property to access the sequence of all context items comprising library, use and context clauses (
_contextItems
).- Returns:
Sequence of context items.
- property ContextReferences: List[ContextReference]
Read-only property to access the sequence of context clauses (
_contextReferences
).- Returns:
Sequence of context clauses.
- property DependencyVertex: Vertex
Read-only property to access the corresponding dependency vertex (
_dependencyVertex
).The dependency vertex references this design unit by its value field.
- Returns:
The corresponding dependency vertex.
- property Documentation: str | None
Returns a model entity’s associated documentation.
- Returns:
Associated documentation of a model entity.
- property HierarchyVertex: Vertex
Read-only property to access the corresponding hierarchy vertex (
_hierarchyVertex
).The hierarchy vertex references this design unit by its value field.
- Returns:
The corresponding hierarchy vertex.
- property Identifier: str
Returns a model entity’s identifier (name).
- Returns:
Name of a model entity.
- property LibraryReferences: List[LibraryClause]
Read-only property to access the sequence of library clauses (
_libraryReferences
).- Returns:
Sequence of library clauses.
- property NormalizedIdentifier: str
Returns a model entity’s normalized identifier (lower case name).
- Returns:
Normalized name of a model entity.
- property PackageReferences: List[UseClause]
Read-only property to access the sequence of use clauses (
_packageReferences
).- Returns:
Sequence of use clauses.
- 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.
- _contextItems: List['ContextUnion']
List of all context items (library, use and context clauses).
- _contextReferences: List['ContextReference']
List of context clauses.
- _dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph()
.
- _document: Document
The VHDL library, the design unit was analyzed into.
- _documentation: Nullable[str]
The associated documentation of a model entity.
- _hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]
The vertex in the hierarchy graph
- _identifier: str
The identifier of a model entity.
- _libraryReferences: List['LibraryClause']
List of library clauses.
- _normalizedIdentifier: str
The normalized (lower case) identifier of a model entity.
- _packageReferences: List['UseClause']
List of use clauses.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _referencedContexts: Dict[str, 'Context']
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries: Dict[str, 'Library']
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages: Dict[str, Dict[str, 'Package']]
Referenced packages based on explicit use clauses or implicit inheritance
- __init__(identifier, contextItems=None, documentation=None, parent=None)[source]
Initializes a design unit.
- Parameters:
identifier (
str
) – Identifier (name) of the design unit.contextItems (
Optional
[Iterable
[Context
]]) – A sequence of library, use or context clauses.documentation (
Optional
[str
]) – Associated documentation of the design unit.parent (
ModelEntity
) – Reference to the logical parent in the model hierarchy.
- Return type:
None