pyGHDL.dom.DesignUnit
This module contains all DOM classes for VHDL’s design units (context,
architecture, package,
package body, context and
configuration.
Classes
LibraryClause: Represents a library clause.UseClause: Represents a use clause.ContextReference: Represents a context reference.Entity: Represents an entity declaration.Architecture: Represents an architecture declaration.Component: Represents a component declaration.Package: Represents a package declaration.PackageBody: Represents a package body declaration.PackageInstantiation: Represents the instantiation of a generic package.Context: Represents a context declaration.Configuration: Represents a configuration declaration.
Classes
- class pyGHDL.dom.DesignUnit.LibraryClause(libraryNode, symbols)[source]
Represents a library clause.
Example
library std, ieee;
This class implements a
pyGHDL.domobject derived frompyVHDLModel.DesignUnit.LibraryClause.Inheritance
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Parent: ModelEntity
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Symbols: List[LibraryReferenceSymbol]
Read-only property to access the symbols this library clause references to (
_symbols).- Returns:
A list of library reference symbols.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.DesignUnit.UseClause(useNode, symbols)[source]
Represents a use clause.
Example
use std.text_io.all, ieee.numeric_std.all;
This class implements a
pyGHDL.domobject derived frompyVHDLModel.DesignUnit.UseClause.Inheritance
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Parent: ModelEntity
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Symbols: List[Symbol]
Read-only property to access the symbols this reference references to (
_symbols).- Returns:
A list of symbols.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.DesignUnit.ContextReference(contextNode, symbols)[source]
Represents a context reference.
Hint
It’s called context reference not context clause by the LRM.
Example
context ieee.ieee_std_context;
This class implements a
pyGHDL.domobject derived frompyVHDLModel.DesignUnit.ContextReference.Inheritance
- classmethod parse(contextNode)[source]
Translates the IIR node of the context to a
ContextReference.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Parent: ModelEntity
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Symbols: List[Symbol]
Read-only property to access the symbols this reference references to (
_symbols).- Returns:
A list of symbols.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.DesignUnit.Entity(node, identifier, contextItems=None, genericItems=None, portItems=None, declaredItems=None, statements=None, documentation=None)[source]
Represents an entity declaration.
Example
entity ent is -- ... end entity;
See also
This class implements a
pyGHDL.domobject derived frompyVHDLModel.DesignUnit.Entity.Inheritance
- Parameters:
node (Iir)
identifier (str)
contextItems (Iterable[LibraryClause | UseClause | ContextReference])
genericItems (Iterable[GenericInterfaceItemMixin])
portItems (Iterable[PortInterfaceItemMixin])
declaredItems (Iterable)
statements (Iterable[ConcurrentStatement])
documentation (str)
- __init__(node, identifier, contextItems=None, genericItems=None, portItems=None, declaredItems=None, statements=None, documentation=None)[source]
Initializes an entity declaration.
- Parameters:
node (
TypeVar(Iir, bound=c_int)) – The IIR node this object was translated from.identifier (
str) – The entity’s identifier.contextItems (
Iterable[LibraryClause|UseClause|ContextReference]) – List of all context items (library, use and context clauses).genericItems (
Iterable[GenericInterfaceItemMixin]) – List of all generics, in declaration order.portItems (
Iterable[PortInterfaceItemMixin]) – List of all ports, in declaration order.declaredItems (
Iterable) – List of all declared items in this concurrent declaration region.statements (
Iterable[ConcurrentStatement]) – List of all concurrent statements in this construct.documentation (
str) – The documentation comment associated with this declaration.
- Return type:
None
- classmethod parse(entityNode, contextItems)[source]
Translates the IIR node of the entity declaration to an
Entity.- Parameters:
entityNode (
TypeVar(Iir, bound=c_int)) – The IIR node of the entity declaration.contextItems (
Iterable[LibraryClause|UseClause|ContextReference]) – List of all context items (library, use and context clauses) preceding the unit.
- Returns:
The translated entity declaration.
- _iirNode
The IIR node in libghdl’s tree this DOM object was translated from.
- _position
The IIR node’s position in the source file, resolved on first access and then cached.
- property AllowBlackbox: bool
Property to return whether a design supports blackboxes, inherited from the parent if not set locally (
_allowBlackbox).Algorithm
If allow blackbox property is locally set, return the local value,
Otherwise, return allow blackbox value from parent object.
- Returns:
True, if blackboxes are allowed.- Raises:
VHDLModelException – If neither a local value is set nor a parent object is available to inherit the value from.
- property Architectures: Dict[str, Architecture]
Read-only property to access the architectures (
_architectures).- Returns:
Dictionary of architectures, indexed by normalized identifier.
- property Components: Dict[str, Any]
Read-only property to access the components (
_components).- Returns:
Dictionary of components, indexed by normalized identifier.
- property Constants: Dict[str, Constant]
Read-only property to access the constants (
_constants).- Returns:
Dictionary of constants, indexed by normalized identifier.
- 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 DeclaredItems: List
Read-only property to access the declared items (
_declaredItems).- Returns:
List of declared 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
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- property Files: Dict[str, File]
Read-only property to access the files (
_files).- Returns:
Dictionary of files, indexed by normalized identifier.
- property Functions: Dict[str, List[Function]]
Read-only property to access the functions (
_functions).- Returns:
Dictionary of functions, indexed by normalized identifier; each entry is a list of overloads.
- property GenericCount: int
Read-only property to return the number of generics in
_genericItems.- Returns:
The generic count.
- property GenericItems: List[GenericInterfaceItemMixin]
Read-only property to access the generic items (
_genericItems).- Returns:
List of generic items.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property 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
Read-only property to access the model entity’s identifier (
_identifier).- Returns:
Name of a model entity.
- IndexDeclaredItems()[source]
An entity’s generics and ports share the declarative region of its declarative part.
- Return type:
- property LibraryReferences: List[LibraryClause]
Read-only property to access the sequence of library clauses (
_libraryReferences).- Returns:
Sequence of library clauses.
- property NormalizedIdentifier: str
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- 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
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property PortCount: int
Read-only property to return the number of ports in
_portItems.- Returns:
The port count.
- property PortItems: List[PortInterfaceItemMixin]
Read-only property to access the port items (
_portItems).- Returns:
List of port items.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Procedures: Dict[str, List[Procedure]]
Read-only property to access the procedures (
_procedures).- Returns:
Dictionary of procedures, indexed by normalized identifier; each entry is a list of overloads.
- property ReferencedContexts: Dict[str, Context]
Read-only property to access the referenced contexts (
_referencedContexts).- Returns:
Dictionary of referenced contexts, indexed by normalized identifier.
- property ReferencedLibraries: Dict[str, Library]
Read-only property to access the referenced libraries (
_referencedLibraries).- Returns:
Dictionary of referenced libraries, indexed by normalized identifier.
- property ReferencedPackages: Dict[str, Package]
Read-only property to access the referenced packages (
_referencedPackages).- Returns:
Dictionary of referenced packages, indexed by normalized identifier.
Read-only property to access the shared variables (
_sharedVariables).- Returns:
Dictionary of shared variables, indexed by normalized identifier.
- property Signals: Dict[str, Signal]
Read-only property to access the signals (
_signals).- Returns:
Dictionary of signals, indexed by normalized identifier.
- property Statements: List[ConcurrentStatement]
Read-only property to access the statements (
_statements).- Returns:
List of statements.
- property Subtypes: Dict[str, Subtype]
Read-only property to access the subtypes (
_subtypes).- Returns:
Dictionary of subtypes, indexed by normalized identifier.
- property Types: Dict[str, FullType]
Read-only property to access the types (
_types).- Returns:
Dictionary of types, indexed by normalized identifier.
- _IndexOtherDeclaredItem(item)
Hook for declared items the region doesn’t handle itself. Derived classes may override it.
- Return type:
- __new__(**kwargs)
- __repr__()[source]
Formats a representation of the entity declaration.
Format:
mylib.myEntity(rtl, sim)- Return type:
- Returns:
String representation of the entity declaration.
- __str__()[source]
Formats the entity declaration.
Format:
Entity: 'mylib.myEntity(rtl, sim)'The parenthesis lists the known architectures, or
?if there are none.- Return type:
- Returns:
Formatted entity declaration.
- _allowBlackbox
Allow blackboxes for components in language entity.
- _architectures
Dictionary of all architectures of this entity, indexed by name.
- _components
Dictionary of all components declared in this concurrent declaration region.
- _constants
Dictionary of all constants declared in this concurrent declaration region.
- _contextItems
List of all context items (library, use and context clauses).
- _contextReferences
List of context clauses.
- _continuesParentRegion = False
Trueif it continues its parent’s declarative region.
- _declaredItems
List of all declared items in this concurrent declaration region.
- _dependencyVertex
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph().
- _document
The VHDL library, the design unit was analyzed into.
- _documentation
The associated documentation of a model entity.
- _files
Dictionary of all files declared in this concurrent declaration region.
- _functions
Dictionary of all functions declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.
- _genericItems
List of all generics, in declaration order.
- _hierarchy
All elements creating a hierarchy level (blocks and generates), in declaration order.
- _hierarchyVertex
The vertex in the hierarchy graph
- _identifier
The identifier of a model entity.
- _instantiations
All instantiations, indexed by label.
- _libraryReferences
List of library clauses.
- _namespace
The namespace of this design unit’s declarative region.
- _normalizedIdentifier
The normalized (lower case) identifier of a model entity.
- _packageReferences
List of use clauses.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _portItems
List of all ports, in declaration order.
- _procedures
Dictionary of all procedures declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.
- _referencedContexts
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages
Referenced packages based on explicit use clauses or implicit inheritance
Dictionary of all shared variables declared in this concurrent declaration region.
- _signals
Dictionary of all signals declared in this concurrent declaration region.
- _statements
List of all concurrent statements in this construct.
- _subtypes
Dictionary of all subtypes declared in this concurrent declaration region.
- _types
Dictionary of all types declared in this concurrent declaration region.
- class pyGHDL.dom.DesignUnit.Architecture(node, identifier, entity, contextItems=None, declaredItems=None, statements=None, documentation=None)[source]
Represents an architecture declaration.
Example
architecture rtl of ent is -- ... begin -- ... end architecture;
See also
This class implements a
pyGHDL.domobject derived frompyVHDLModel.DesignUnit.Architecture.Inheritance
- Parameters:
node (Iir)
identifier (str)
entity (EntitySymbol)
contextItems (Iterable[LibraryClause | UseClause | ContextReference])
declaredItems (Iterable)
statements (Iterable[ConcurrentStatement])
documentation (str)
- __init__(node, identifier, entity, contextItems=None, declaredItems=None, statements=None, documentation=None)[source]
Initializes an architecture declaration.
- Parameters:
node (
TypeVar(Iir, bound=c_int)) – The IIR node this object was translated from.identifier (
str) – The architecture’s identifier.entity (
EntitySymbol) – Reference to the entity this architecture implements.contextItems (
Iterable[LibraryClause|UseClause|ContextReference]) – List of all context items (library, use and context clauses).declaredItems (
Iterable) – List of all declared items in this concurrent declaration region.statements (
Iterable[ConcurrentStatement]) – List of all concurrent statements in this construct.documentation (
str) – The documentation comment associated with this declaration.
- Return type:
None
- classmethod parse(architectureNode, contextItems)[source]
Translates the IIR node of the architecture body to an
Architecture.- Parameters:
architectureNode (
TypeVar(Iir, bound=c_int)) – The IIR node of the architecture body.contextItems (
Iterable[LibraryClause|UseClause|ContextReference]) – List of all context items (library, use and context clauses) preceding the unit.
- Returns:
The translated architecture body.
- _iirNode
The IIR node in libghdl’s tree this DOM object was translated from.
- _position
The IIR node’s position in the source file, resolved on first access and then cached.
- property AllowBlackbox: bool
Property to return whether a design supports blackboxes, inherited from the parent if not set locally (
_allowBlackbox).Algorithm
If allow blackbox property is locally set, return the local value,
Otherwise, return allow blackbox value from parent object.
- Returns:
True, if blackboxes are allowed.- Raises:
VHDLModelException – If neither a local value is set nor a parent object is available to inherit the value from.
- property Components: Dict[str, Any]
Read-only property to access the components (
_components).- Returns:
Dictionary of components, indexed by normalized identifier.
- property Constants: Dict[str, Constant]
Read-only property to access the constants (
_constants).- Returns:
Dictionary of constants, indexed by normalized identifier.
- 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 DeclaredItems: List
Read-only property to access the declared items (
_declaredItems).- Returns:
List of declared 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
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- property Entity: EntitySymbol
Read-only property to access the entity (
_entity).- Returns:
The entity.
- property Files: Dict[str, File]
Read-only property to access the files (
_files).- Returns:
Dictionary of files, indexed by normalized identifier.
- property Functions: Dict[str, List[Function]]
Read-only property to access the functions (
_functions).- Returns:
Dictionary of functions, indexed by normalized identifier; each entry is a list of overloads.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property 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
Read-only property to access the model entity’s identifier (
_identifier).- 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
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- 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
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Procedures: Dict[str, List[Procedure]]
Read-only property to access the procedures (
_procedures).- Returns:
Dictionary of procedures, indexed by normalized identifier; each entry is a list of overloads.
- property ReferencedContexts: Dict[str, Context]
Read-only property to access the referenced contexts (
_referencedContexts).- Returns:
Dictionary of referenced contexts, indexed by normalized identifier.
- property ReferencedLibraries: Dict[str, Library]
Read-only property to access the referenced libraries (
_referencedLibraries).- Returns:
Dictionary of referenced libraries, indexed by normalized identifier.
- property ReferencedPackages: Dict[str, Package]
Read-only property to access the referenced packages (
_referencedPackages).- Returns:
Dictionary of referenced packages, indexed by normalized identifier.
Read-only property to access the shared variables (
_sharedVariables).- Returns:
Dictionary of shared variables, indexed by normalized identifier.
- property Signals: Dict[str, Signal]
Read-only property to access the signals (
_signals).- Returns:
Dictionary of signals, indexed by normalized identifier.
- property Statements: List[ConcurrentStatement]
Read-only property to access the statements (
_statements).- Returns:
List of statements.
- property Subtypes: Dict[str, Subtype]
Read-only property to access the subtypes (
_subtypes).- Returns:
Dictionary of subtypes, indexed by normalized identifier.
- property Types: Dict[str, FullType]
Read-only property to access the types (
_types).- Returns:
Dictionary of types, indexed by normalized identifier.
- _IndexOtherDeclaredItem(item)
Hook for declared items the region doesn’t handle itself. Derived classes may override it.
- Return type:
- __new__(**kwargs)
- __repr__()[source]
Formats a representation of the architecture declaration.
Format:
mylib.myEntity(rtl)- Return type:
- Returns:
String representation of the architecture declaration.
- __str__()[source]
Formats the architecture declaration.
Format:
Architecture: mylib.myEntity(rtl)- Return type:
- Returns:
Formatted architecture declaration.
- _allowBlackbox
Allow blackboxes for components in language entity.
- _components
Dictionary of all components declared in this concurrent declaration region.
- _constants
Dictionary of all constants declared in this concurrent declaration region.
- _contextItems
List of all context items (library, use and context clauses).
- _contextReferences
List of context clauses.
- _continuesParentRegion = True
An architecture continues its entity’s declarative region.
- _declaredItems
List of all declared items in this concurrent declaration region.
- _dependencyVertex
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph().
- _document
The VHDL library, the design unit was analyzed into.
- _documentation
The associated documentation of a model entity.
- _entity
Reference to the entity this architecture implements.
- _files
Dictionary of all files declared in this concurrent declaration region.
- _functions
Dictionary of all functions declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.
- _hierarchy
All elements creating a hierarchy level (blocks and generates), in declaration order.
- _hierarchyVertex
The vertex in the hierarchy graph
- _identifier
The identifier of a model entity.
- _instantiations
All instantiations, indexed by label.
- _libraryReferences
List of library clauses.
- _namespace
The namespace of this design unit’s declarative region.
- _normalizedIdentifier
The normalized (lower case) identifier of a model entity.
- _packageReferences
List of use clauses.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _procedures
Dictionary of all procedures declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.
- _referencedContexts
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages
Referenced packages based on explicit use clauses or implicit inheritance
Dictionary of all shared variables declared in this concurrent declaration region.
- _signals
Dictionary of all signals declared in this concurrent declaration region.
- _statements
List of all concurrent statements in this construct.
- _subtypes
Dictionary of all subtypes declared in this concurrent declaration region.
- _types
Dictionary of all types declared in this concurrent declaration region.
- class pyGHDL.dom.DesignUnit.Component(node, identifier, genericItems=None, portItems=None, documentation=None)[source]
Represents a component declaration.
Example
component ent is -- ... end component;
This class implements a
pyGHDL.domobject derived frompyVHDLModel.DesignUnit.Component.Inheritance
- Parameters:
node (Iir)
identifier (str)
genericItems (Iterable[GenericInterfaceItemMixin])
portItems (Iterable[PortInterfaceItemMixin])
documentation (str)
- __init__(node, identifier, genericItems=None, portItems=None, documentation=None)[source]
Initializes a component declaration.
- Parameters:
node (
TypeVar(Iir, bound=c_int)) – The IIR node this object was translated from.identifier (
str) – The component’s identifier.genericItems (
Iterable[GenericInterfaceItemMixin]) – List of all generics of this component, in declaration order.portItems (
Iterable[PortInterfaceItemMixin]) – List of all ports of this component, in declaration order.documentation (
str) – The documentation comment associated with this declaration.
- Return type:
None
- classmethod parse(componentNode)[source]
Translates the IIR node of the component declaration to a
Component.
- _position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
The IIR node’s position in the source file, resolved on first access and then cached.
- property AllowBlackbox: bool
Property to return whether a design supports blackboxes, inherited from the parent if not set locally (
_allowBlackbox).Algorithm
If allow blackbox property is locally set, return the local value,
Otherwise, return allow blackbox value from parent object.
- Returns:
True, if blackboxes are allowed.- Raises:
VHDLModelException – If neither a local value is set nor a parent object is available to inherit the value from.
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- property Entity: <property object at 0x7d2df1112a70> | None
Property to access the entity (
_entity).- Returns:
The entity, or
Noneif not set.
- property GenericItems: List[GenericInterfaceItemMixin]
Read-only property to access the generic items (
_genericItems).- Returns:
List of generic items.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifier: str
Read-only property to access the model entity’s identifier (
_identifier).- Returns:
Name of a model entity.
- property IsBlackbox: bool | None
Check if the component is a blackbox (
_isBlackbox).If components were not linked to matching entities, this property returns
None.- Returns:
True, if the component is a blackbox;False, if it is not;None, if components were not linked to entities yet.
- property NormalizedIdentifier: str
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- Returns:
Normalized name of a model entity.
- property Parent: ModelEntity
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property PortItems: List[PortInterfaceItemMixin]
Read-only property to access the port items (
_portItems).- Returns:
List of port items.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- __repr__()[source]
Formats a representation of the component declaration.
Format:
mylib.myPackage:myComponent- Return type:
- Returns:
String representation of the component declaration.
- __str__()[source]
Formats the component declaration.
Format:
Component: myComponent- Return type:
- Returns:
Formatted component declaration.
- _entity: <property object at 0x7d2df1112a70> | None
Linked entity, or
Noneif unresolved.
- _genericItems: List[GenericInterfaceItemMixin]
List of all generics of this component, in declaration order.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _portItems: List[PortInterfaceItemMixin]
List of all ports of this component, in declaration order.
- class pyGHDL.dom.DesignUnit.Package(node, identifier, contextItems=None, genericItems=None, declaredItems=None, documentation=None)[source]
Represents a package declaration.
Example
package pkg is -- ... end package;
This class implements a
pyGHDL.domobject derived frompyVHDLModel.DesignUnit.Package.Inheritance
- Parameters:
node (Iir)
identifier (str)
contextItems (Iterable[LibraryClause | UseClause | ContextReference])
genericItems (Iterable[GenericInterfaceItemMixin])
declaredItems (Iterable)
documentation (str)
- __init__(node, identifier, contextItems=None, genericItems=None, declaredItems=None, documentation=None)[source]
Initialize a package.
- Parameters:
node (
TypeVar(Iir, bound=c_int)) – The IIR node this object was translated from.identifier (
str) – Name of the VHDL package.contextItems (
Iterable[LibraryClause|UseClause|ContextReference]) – List of all context items (library, use and context clauses).genericItems (
Iterable[GenericInterfaceItemMixin]) – List of all generics, in declaration order.declaredItems (
Iterable) – List of all declared items in this concurrent declaration region.documentation (
str) – The documentation comment associated with this declaration.
- Return type:
None
- classmethod parse(packageNode, contextItems)[source]
Translates the IIR node of the package declaration to a
Package.- Parameters:
packageNode (
TypeVar(Iir, bound=c_int)) – The IIR node of the package declaration.contextItems (
Iterable[LibraryClause|UseClause|ContextReference]) – List of all context items (library, use and context clauses) preceding the unit.
- Returns:
The translated package declaration.
- _iirNode
The IIR node in libghdl’s tree this DOM object was translated from.
- _position
The IIR node’s position in the source file, resolved on first access and then cached.
- property AllowBlackbox: bool
Property to return whether a design supports blackboxes, inherited from the parent if not set locally (
_allowBlackbox).Algorithm
If allow blackbox property is locally set, return the local value,
Otherwise, return allow blackbox value from parent object.
- Returns:
True, if blackboxes are allowed.- Raises:
VHDLModelException – If neither a local value is set nor a parent object is available to inherit the value from.
- property Components: Dict[str, Component]
Read-only property to access the components (
_components).- Returns:
Dictionary of components, indexed by normalized identifier.
- property Constants: Dict[str, Constant]
Read-only property to access the constants (
_constants).- Returns:
Dictionary of constants, indexed by normalized identifier.
- 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 DeclaredItems: List
Read-only property to access the declared items (
_declaredItems).- Returns:
List of declared items.
- property DeferredConstants: Dict[str, DeferredConstant]
Read-only property to access the deferred constants (
_deferredConstants).- Returns:
Dictionary of deferred constants, indexed by normalized identifier.
- 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
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- property Files: Dict[str, File]
Read-only property to access the files (
_files).- Returns:
Dictionary of files, indexed by normalized identifier.
- property Functions: Dict[str, List[Function]]
Read-only property to access the functions (
_functions).- Returns:
Dictionary of functions, indexed by normalized identifier; each entry is a list of overloads.
- property GenericCount: int
Read-only property to return the number of generics in
_genericItems.- Returns:
The generic count.
- property GenericItems: List[GenericInterfaceItemMixin]
Read-only property to access the generic items (
_genericItems).- Returns:
List of generic items.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property 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
Read-only property to access the model entity’s identifier (
_identifier).- Returns:
Name of a model entity.
- IndexDeclaredItems()[source]
A generic package’s generics share the declarative region of its declarative part.
- Return type:
- property LibraryReferences: List[LibraryClause]
Read-only property to access the sequence of library clauses (
_libraryReferences).- Returns:
Sequence of library clauses.
- property NormalizedIdentifier: str
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- Returns:
Normalized name of a model entity.
- property PackageBody: PackageBody | None
Read-only property to access the package body (
_packageBody).- Returns:
The package body, or
Noneif not set.
- property PackageReferences: List[UseClause]
Read-only property to access the sequence of use clauses (
_packageReferences).- Returns:
Sequence of use clauses.
- property Parent: ModelEntity
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Procedures: Dict[str, List[Procedure]]
Read-only property to access the procedures (
_procedures).- Returns:
Dictionary of procedures, indexed by normalized identifier; each entry is a list of overloads.
- property ReferencedContexts: Dict[str, Context]
Read-only property to access the referenced contexts (
_referencedContexts).- Returns:
Dictionary of referenced contexts, indexed by normalized identifier.
- property ReferencedLibraries: Dict[str, Library]
Read-only property to access the referenced libraries (
_referencedLibraries).- Returns:
Dictionary of referenced libraries, indexed by normalized identifier.
- property ReferencedPackages: Dict[str, Package]
Read-only property to access the referenced packages (
_referencedPackages).- Returns:
Dictionary of referenced packages, indexed by normalized identifier.
Read-only property to access the shared variables (
_sharedVariables).- Returns:
Dictionary of shared variables, indexed by normalized identifier.
- property Signals: Dict[str, Signal]
Read-only property to access the signals (
_signals).- Returns:
Dictionary of signals, indexed by normalized identifier.
- property Subtypes: Dict[str, Subtype]
Read-only property to access the subtypes (
_subtypes).- Returns:
Dictionary of subtypes, indexed by normalized identifier.
- property Types: Dict[str, FullType]
Read-only property to access the types (
_types).- Returns:
Dictionary of types, indexed by normalized identifier.
- _IndexOtherDeclaredItem(item)[source]
Hook for declared items the region doesn’t handle itself. Derived classes may override it.
- Return type:
- __new__(**kwargs)
- __repr__()[source]
Formats a representation of the package declaration.
Format:
mylib.myPackage- Return type:
- Returns:
String representation of the package declaration.
- __str__()[source]
Formats the package declaration.
Format:
Package: 'mylib.myPackage'- Return type:
- Returns:
Formatted package declaration.
- _allowBlackbox
Allow blackboxes for components in language entity.
- _components
Components, indexed by name.
- _constants
Dictionary of all constants declared in this concurrent declaration region.
- _contextItems
List of all context items (library, use and context clauses).
- _contextReferences
List of context clauses.
- _continuesParentRegion = False
Trueif it continues its parent’s declarative region.
- _declaredItems
List of all declared items in this concurrent declaration region.
- _deferredConstants
Deferred constants, indexed by name.
- _dependencyVertex
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph().
- _document
The VHDL library, the design unit was analyzed into.
- _documentation
The associated documentation of a model entity.
- _files
Dictionary of all files declared in this concurrent declaration region.
- _functions
Dictionary of all functions declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.
- _genericItems
List of all generics, in declaration order.
- _hierarchyVertex
The vertex in the hierarchy graph
- _identifier
The identifier of a model entity.
- _libraryReferences
List of library clauses.
- _namespace
The namespace of this design unit’s declarative region.
- _normalizedIdentifier
The normalized (lower case) identifier of a model entity.
- _packageBody
The corresponding package body, or
Noneif none was analyzed.
- _packageReferences
List of use clauses.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _procedures
Dictionary of all procedures declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.
- _referencedContexts
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages
Referenced packages based on explicit use clauses or implicit inheritance
Dictionary of all shared variables declared in this concurrent declaration region.
- _signals
Dictionary of all signals declared in this concurrent declaration region.
- _subtypes
Dictionary of all subtypes declared in this concurrent declaration region.
- _types
Dictionary of all types declared in this concurrent declaration region.
- class pyGHDL.dom.DesignUnit.PackageBody(node, packageSymbol, contextItems=None, declaredItems=None, documentation=None)[source]
Represents a package body declaration.
Example
package body pkg is -- ... end package body;
This class implements a
pyGHDL.domobject derived frompyVHDLModel.DesignUnit.PackageBody.Inheritance
- Parameters:
node (Iir)
packageSymbol (PackageSymbol)
contextItems (Iterable[LibraryClause | UseClause | ContextReference])
declaredItems (Iterable)
documentation (str)
- __init__(node, packageSymbol, contextItems=None, declaredItems=None, documentation=None)[source]
Initializes a package body declaration.
- Parameters:
node (
TypeVar(Iir, bound=c_int)) – The IIR node this object was translated from.packageSymbol (
PackageSymbol) – Reference to the package this body implements.contextItems (
Iterable[LibraryClause|UseClause|ContextReference]) – List of all context items (library, use and context clauses).declaredItems (
Iterable) – List of all declared items in this concurrent declaration region.documentation (
str) – The documentation comment associated with this declaration.
- Return type:
None
- classmethod parse(packageBodyNode, contextItems)[source]
Translates the IIR node of the package body to a
PackageBody.- Parameters:
packageBodyNode (
TypeVar(Iir, bound=c_int)) – The IIR node of the package body.contextItems (
Iterable[LibraryClause|UseClause|ContextReference]) – List of all context items (library, use and context clauses) preceding the unit.
- Returns:
The translated package body.
- _iirNode
The IIR node in libghdl’s tree this DOM object was translated from.
- _position
The IIR node’s position in the source file, resolved on first access and then cached.
- property Components: Dict[str, Any]
Read-only property to access the components (
_components).- Returns:
Dictionary of components, indexed by normalized identifier.
- property Constants: Dict[str, Constant]
Read-only property to access the constants (
_constants).- Returns:
Dictionary of constants, indexed by normalized identifier.
- 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 DeclaredItems: List
Read-only property to access the declared items (
_declaredItems).- Returns:
List of declared 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
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- property Files: Dict[str, File]
Read-only property to access the files (
_files).- Returns:
Dictionary of files, indexed by normalized identifier.
- property Functions: Dict[str, List[Function]]
Read-only property to access the functions (
_functions).- Returns:
Dictionary of functions, indexed by normalized identifier; each entry is a list of overloads.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property 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
Read-only property to access the model entity’s identifier (
_identifier).- 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
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- Returns:
Normalized name of a model entity.
- property Package: PackageSymbol
Read-only property to access the package (
_package).- Returns:
The package.
- property PackageReferences: List[UseClause]
Read-only property to access the sequence of use clauses (
_packageReferences).- Returns:
Sequence of use clauses.
- property Parent: ModelEntity
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Procedures: Dict[str, List[Procedure]]
Read-only property to access the procedures (
_procedures).- Returns:
Dictionary of procedures, indexed by normalized identifier; each entry is a list of overloads.
- property ReferencedContexts: Dict[str, Context]
Read-only property to access the referenced contexts (
_referencedContexts).- Returns:
Dictionary of referenced contexts, indexed by normalized identifier.
- property ReferencedLibraries: Dict[str, Library]
Read-only property to access the referenced libraries (
_referencedLibraries).- Returns:
Dictionary of referenced libraries, indexed by normalized identifier.
- property ReferencedPackages: Dict[str, Package]
Read-only property to access the referenced packages (
_referencedPackages).- Returns:
Dictionary of referenced packages, indexed by normalized identifier.
Read-only property to access the shared variables (
_sharedVariables).- Returns:
Dictionary of shared variables, indexed by normalized identifier.
- property Signals: Dict[str, Signal]
Read-only property to access the signals (
_signals).- Returns:
Dictionary of signals, indexed by normalized identifier.
- property Subtypes: Dict[str, Subtype]
Read-only property to access the subtypes (
_subtypes).- Returns:
Dictionary of subtypes, indexed by normalized identifier.
- property Types: Dict[str, FullType]
Read-only property to access the types (
_types).- Returns:
Dictionary of types, indexed by normalized identifier.
- _IndexOtherDeclaredItem(item)
Hook for declared items the region doesn’t handle itself. Derived classes may override it.
- Return type:
- __new__(**kwargs)
- __repr__()[source]
Formats a representation of the package body declaration.
Format:
mylib.myPackage(body)- Return type:
- Returns:
String representation of the package body declaration.
- __str__()[source]
Formats the package body declaration.
Format:
Package Body: mylib.myPackage(body)- Return type:
- Returns:
Formatted package body declaration.
- _components
Dictionary of all components declared in this concurrent declaration region.
- _constants
Dictionary of all constants declared in this concurrent declaration region.
- _contextItems
List of all context items (library, use and context clauses).
- _contextReferences
List of context clauses.
- _continuesParentRegion = True
A package body continues its package’s declarative region.
- _declaredItems
List of all declared items in this concurrent declaration region.
- _dependencyVertex
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph().
- _document
The VHDL library, the design unit was analyzed into.
- _documentation
The associated documentation of a model entity.
- _files
Dictionary of all files declared in this concurrent declaration region.
- _functions
Dictionary of all functions declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.
- _hierarchyVertex
The vertex in the hierarchy graph
- _identifier
The identifier of a model entity.
- _libraryReferences
List of library clauses.
- _namespace
The namespace of this design unit’s declarative region.
- _normalizedIdentifier
The normalized (lower case) identifier of a model entity.
- _package
Reference to the package this body implements.
- _packageReferences
List of use clauses.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _procedures
Dictionary of all procedures declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.
- _referencedContexts
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages
Referenced packages based on explicit use clauses or implicit inheritance
Dictionary of all shared variables declared in this concurrent declaration region.
- _signals
Dictionary of all signals declared in this concurrent declaration region.
- _subtypes
Dictionary of all subtypes declared in this concurrent declaration region.
- _types
Dictionary of all types declared in this concurrent declaration region.
- class pyGHDL.dom.DesignUnit.PackageInstantiation(node, identifier, uninstantiatedPackageName, contextItems=None, genericAssociationItems=None, documentation=None)[source]
Represents the instantiation of a generic package.
Example
package p is new gp generic map (N => 1); -- ^ <- Identifier -- ^^ <- PackageReference
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Instantiation.PackageInstantiation.Inheritance
- Parameters:
node (Iir)
identifier (str)
uninstantiatedPackageName (Symbol)
contextItems (Iterable[LibraryClause | UseClause | ContextReference])
genericAssociationItems (Iterable[GenericAssociationItem])
documentation (str)
- __init__(node, identifier, uninstantiatedPackageName, contextItems=None, genericAssociationItems=None, documentation=None)[source]
Initializes a package instantiation.
- Parameters:
node (
TypeVar(Iir, bound=c_int)) – The IIR node this object was translated from.identifier (
str) – The instantiated package’s identifier.uninstantiatedPackageName (
Symbol) – The name of the uninstantiated generic package.contextItems (
Iterable[LibraryClause|UseClause|ContextReference]) – List of all context items (library, use and context clauses).genericAssociationItems (
Iterable[GenericAssociationItem]) – List of all generic associations in the generic map aspect.documentation (
str) – The documentation comment associated with this declaration.
- Return type:
None
- classmethod parse(packageNode, contextItems=None)[source]
Translates the IIR node of the package declaration to a
PackageInstantiation.- Parameters:
packageNode (
TypeVar(Iir, bound=c_int)) – The IIR node of the package declaration.contextItems (
Iterable[LibraryClause|UseClause|ContextReference]) – List of all context items (library, use and context clauses) preceding the unit.
- Returns:
The translated package declaration.
- _iirNode
The IIR node in libghdl’s tree this DOM object was translated from.
- _position
The IIR node’s position in the source file, resolved on first access and then cached.
- property AllowBlackbox: bool
Property to return whether a design supports blackboxes, inherited from the parent if not set locally (
_allowBlackbox).Algorithm
If allow blackbox property is locally set, return the local value,
Otherwise, return allow blackbox value from parent object.
- Returns:
True, if blackboxes are allowed.- Raises:
VHDLModelException – If neither a local value is set nor a parent object is available to inherit the value from.
- property Components: Dict[str, Component]
Read-only property to access the components (
_components).- Returns:
Dictionary of components, indexed by normalized identifier.
- property Constants: Dict[str, Constant]
Read-only property to access the constants (
_constants).- Returns:
Dictionary of constants, indexed by normalized identifier.
- 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 DeclaredItems: List
Read-only property to access the declared items (
_declaredItems).- Returns:
List of declared items.
- property DeferredConstants: Dict[str, DeferredConstant]
Read-only property to access the deferred constants (
_deferredConstants).- Returns:
Dictionary of deferred constants, indexed by normalized identifier.
- 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
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- property Files: Dict[str, File]
Read-only property to access the files (
_files).- Returns:
Dictionary of files, indexed by normalized identifier.
- property Functions: Dict[str, List[Function]]
Read-only property to access the functions (
_functions).- Returns:
Dictionary of functions, indexed by normalized identifier; each entry is a list of overloads.
- property GenericAssociationItems: List[GenericAssociationItem]
Read-only property to access the generic associations (
_genericAssociationItems).- Returns:
List of generic association items.
- property GenericCount: int
Read-only property to return the number of generics in
_genericItems.- Returns:
The generic count.
- property GenericItems: List[GenericInterfaceItemMixin]
Read-only property to access the generic items (
_genericItems).- Returns:
List of generic items.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property 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
Read-only property to access the model entity’s identifier (
_identifier).- Returns:
Name of a model entity.
- IndexDeclaredItems()
A generic package’s generics share the declarative region of its declarative part.
- Return type:
- property LibraryReferences: List[LibraryClause]
Read-only property to access the sequence of library clauses (
_libraryReferences).- Returns:
Sequence of library clauses.
- property NormalizedIdentifier: str
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- Returns:
Normalized name of a model entity.
- property PackageBody: PackageBody | None
Read-only property to access the package body (
_packageBody).- Returns:
The package body, or
Noneif not set.
- property PackageReference: PackageReferenceSymbol
Read-only property to access the package reference (
_packageReference).- Returns:
The package reference.
- property PackageReferences: List[UseClause]
Read-only property to access the sequence of use clauses (
_packageReferences).- Returns:
Sequence of use clauses.
- property Parent: ModelEntity
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property Procedures: Dict[str, List[Procedure]]
Read-only property to access the procedures (
_procedures).- Returns:
Dictionary of procedures, indexed by normalized identifier; each entry is a list of overloads.
- property ReferencedContexts: Dict[str, Context]
Read-only property to access the referenced contexts (
_referencedContexts).- Returns:
Dictionary of referenced contexts, indexed by normalized identifier.
- property ReferencedLibraries: Dict[str, Library]
Read-only property to access the referenced libraries (
_referencedLibraries).- Returns:
Dictionary of referenced libraries, indexed by normalized identifier.
- property ReferencedPackages: Dict[str, Package]
Read-only property to access the referenced packages (
_referencedPackages).- Returns:
Dictionary of referenced packages, indexed by normalized identifier.
Read-only property to access the shared variables (
_sharedVariables).- Returns:
Dictionary of shared variables, indexed by normalized identifier.
- property Signals: Dict[str, Signal]
Read-only property to access the signals (
_signals).- Returns:
Dictionary of signals, indexed by normalized identifier.
- property Subtypes: Dict[str, Subtype]
Read-only property to access the subtypes (
_subtypes).- Returns:
Dictionary of subtypes, indexed by normalized identifier.
- property Types: Dict[str, FullType]
Read-only property to access the types (
_types).- Returns:
Dictionary of types, indexed by normalized identifier.
- _IndexOtherDeclaredItem(item)
Hook for declared items the region doesn’t handle itself. Derived classes may override it.
- Return type:
- __new__(**kwargs)
- __repr__()
Formats a representation of the package declaration.
Format:
mylib.myPackage- Return type:
- Returns:
String representation of the package declaration.
- __str__()
Formats the package declaration.
Format:
Package: 'mylib.myPackage'- Return type:
- Returns:
Formatted package declaration.
- _allowBlackbox
Allow blackboxes for components in language entity.
- _components
Components, indexed by name.
- _constants
Dictionary of all constants declared in this concurrent declaration region.
- _contextItems
List of all context items (library, use and context clauses).
- _contextReferences
List of context clauses.
- _continuesParentRegion = False
Trueif it continues its parent’s declarative region.
- _declaredItems
List of all declared items in this concurrent declaration region.
- _deferredConstants
Deferred constants, indexed by name.
- _dependencyVertex
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph().
- _document
The VHDL library, the design unit was analyzed into.
- _documentation
The associated documentation of a model entity.
- _files
Dictionary of all files declared in this concurrent declaration region.
- _functions
Dictionary of all functions declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.
- _genericAssociationItems
List of all generic associations.
- _genericItems
List of all generics, in declaration order.
- _hierarchyVertex
The vertex in the hierarchy graph
- _identifier
The identifier of a model entity.
- _libraryReferences
List of library clauses.
- _namespace
The namespace of this design unit’s declarative region.
- _normalizedIdentifier
The normalized (lower case) identifier of a model entity.
- _packageBody
The corresponding package body, or
Noneif none was analyzed.
- _packageReference
Reference to the instantiated generic package.
- _packageReferences
List of use clauses.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _procedures
Dictionary of all procedures declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.
- _referencedContexts
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages
Referenced packages based on explicit use clauses or implicit inheritance
Dictionary of all shared variables declared in this concurrent declaration region.
- _signals
Dictionary of all signals declared in this concurrent declaration region.
- _subtypes
Dictionary of all subtypes declared in this concurrent declaration region.
- _types
Dictionary of all types declared in this concurrent declaration region.
- class pyGHDL.dom.DesignUnit.Context(node, identifier, references=None, documentation=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;
See also
This class implements a
pyGHDL.domobject derived frompyVHDLModel.DesignUnit.Context.Inheritance
- Parameters:
node (Iir)
identifier (str)
references (Iterable[LibraryClause | UseClause | ContextReference])
documentation (str)
- __init__(node, identifier, references=None, documentation=None)[source]
Initializes a context declaration.
- Parameters:
node (
TypeVar(Iir, bound=c_int)) – The IIR node this object was translated from.identifier (
str) – The context’s identifier.references (
Iterable[LibraryClause|UseClause|ContextReference]) – All context items, in declaration order.documentation (
str) – The documentation comment associated with this declaration.
- Return type:
None
- _iirNode
The IIR node in libghdl’s tree this DOM object was translated from.
- _position
The IIR node’s position in the source file, resolved on first access and then cached.
- 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 context references (
_contextReferences).- Returns:
List of context references.
- 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
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property 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
Read-only property to access the model entity’s identifier (
_identifier).- Returns:
Name of a model entity.
- property LibraryReferences: List[LibraryClause]
Read-only property to access the library references (
_libraryReferences).- Returns:
List of library references.
- property NormalizedIdentifier: str
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- Returns:
Normalized name of a model entity.
- property PackageReferences: List[UseClause]
Read-only property to access the package references (
_packageReferences).- Returns:
List of package references.
- property Parent: ModelEntity
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property ReferencedContexts: Dict[str, Context]
Read-only property to access the referenced contexts (
_referencedContexts).- Returns:
Dictionary of referenced contexts, indexed by normalized identifier.
- property ReferencedLibraries: Dict[str, Library]
Read-only property to access the referenced libraries (
_referencedLibraries).- Returns:
Dictionary of referenced libraries, indexed by normalized identifier.
- property ReferencedPackages: Dict[str, Package]
Read-only property to access the referenced packages (
_referencedPackages).- Returns:
Dictionary of referenced packages, indexed by normalized identifier.
- __new__(**kwargs)
- __str__()[source]
Formats the context declaration.
Format:
Context: mylib.myContext- Return type:
- Returns:
Formatted context declaration.
- _contextItems
List of all context items (library, use and context clauses).
- _contextReferences
List of context clauses.
- _continuesParentRegion = False
Trueif it continues its parent’s declarative region.
- _dependencyVertex
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph().
- _document
The VHDL library, the design unit was analyzed into.
- _documentation
The associated documentation of a model entity.
- _hierarchyVertex
The vertex in the hierarchy graph
- _identifier
The identifier of a model entity.
- _libraryReferences
List of library clauses.
- _namespace
The namespace of this design unit’s declarative region.
- _normalizedIdentifier
The normalized (lower case) identifier of a model entity.
- _packageReferences
List of use clauses.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _referencedContexts
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages
Referenced packages based on explicit use clauses or implicit inheritance
- _references
All context items, in declaration order.
- class pyGHDL.dom.DesignUnit.Configuration(node, identifier, entity, blockConfiguration, contextItems=None, documentation=None)[source]
Represents a configuration declaration.
Example
configuration cfg of ent is for rtl -- ... end for; end configuration;
See also
This class implements a
pyGHDL.domobject derived frompyVHDLModel.DesignUnit.Configuration.Inheritance
- Parameters:
node (Iir)
identifier (str)
entity (EntitySymbol)
blockConfiguration (BlockConfiguration)
documentation (str)
- __init__(node, identifier, entity, blockConfiguration, contextItems=None, documentation=None)[source]
Initializes a configuration declaration.
- Parameters:
node (
TypeVar(Iir, bound=c_int)) – The IIR node this object was translated from.identifier (
str) – The configuration’s identifier.entity (
EntitySymbol) – Reference to the entity this configuration configures.blockConfiguration (
BlockConfiguration) – The configuration of the entity’s architecture.contextItems (
Iterable[Context]) – List of all context items (library, use and context clauses).documentation (
str) – The documentation comment associated with this declaration.
- Return type:
None
- classmethod parse(configurationNode, contextItems)[source]
Translates the IIR node of the configuration declaration to a
Configuration.- Parameters:
- Return type:
- Returns:
The translated configuration declaration.
- _iirNode
The IIR node in libghdl’s tree this DOM object was translated from.
- _position
The IIR node’s position in the source file, resolved on first access and then cached.
- property BlockConfiguration: <pyTooling.Decorators.readonly object at 0x7d2df1139850>
Read-only property to access the block configuration (
_blockConfiguration).- Returns:
The block configuration.
- 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
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- property Entity: EntitySymbol
Read-only property to access the entity (
_entity).- Returns:
The entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property 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
Read-only property to access the model entity’s identifier (
_identifier).- 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
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- 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
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property ReferencedContexts: Dict[str, Context]
Read-only property to access the referenced contexts (
_referencedContexts).- Returns:
Dictionary of referenced contexts, indexed by normalized identifier.
- property ReferencedLibraries: Dict[str, Library]
Read-only property to access the referenced libraries (
_referencedLibraries).- Returns:
Dictionary of referenced libraries, indexed by normalized identifier.
- property ReferencedPackages: Dict[str, Package]
Read-only property to access the referenced packages (
_referencedPackages).- Returns:
Dictionary of referenced packages, indexed by normalized identifier.
- __new__(**kwargs)
- __repr__()[source]
Formats a representation of the configuration declaration.
Format:
mylib.myConfiguration- Return type:
- Returns:
String representation of the configuration declaration.
- __str__()[source]
Formats the configuration declaration.
Format:
Configuration: mylib.myConfiguration- Return type:
- Returns:
Formatted configuration declaration.
- _blockConfiguration
The configuration of the entity’s architecture.
- _contextItems
List of all context items (library, use and context clauses).
- _contextReferences
List of context clauses.
- _continuesParentRegion = False
Trueif it continues its parent’s declarative region.
- _dependencyVertex
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph().
- _document
The VHDL library, the design unit was analyzed into.
- _documentation
The associated documentation of a model entity.
- _entity
Reference to the entity this configuration configures.
- _hierarchyVertex
The vertex in the hierarchy graph
- _identifier
The identifier of a model entity.
- _libraryReferences
List of library clauses.
- _namespace
The namespace of this design unit’s declarative region.
- _normalizedIdentifier
The normalized (lower case) identifier of a model entity.
- _packageReferences
List of use clauses.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _referencedContexts
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages
Referenced packages based on explicit use clauses or implicit inheritance