pyGHDL.dom.Configuration
This module implements derived configuration classes from pyVHDLModel.Configuration.
Classes
EntityAspectEntity: This class implements apyGHDL.domobject derived frompyVHDLModel.Configuration.EntityAspectEntity.EntityAspectConfiguration: This class implements apyGHDL.domobject derived frompyVHDLModel.Configuration.EntityAspectConfiguration.EntityAspectOpen: This class implements apyGHDL.domobject derived frompyVHDLModel.Configuration.EntityAspectOpen.BindingIndication: This class implements apyGHDL.domobject derived frompyVHDLModel.Configuration.BindingIndication.AllInstantiationList: This class implements apyGHDL.domobject derived frompyVHDLModel.Configuration.AllInstantiationList.OthersInstantiationList: This class implements apyGHDL.domobject derived frompyVHDLModel.Configuration.OthersInstantiationList.ComponentConfiguration: .. note:BlockConfiguration: This class implements apyGHDL.domobject derived frompyVHDLModel.Configuration.BlockConfiguration.
Classes
- class pyGHDL.dom.Configuration.EntityAspectEntity(node, entity, architecture=None)[source]
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Configuration.EntityAspectEntity.Represents an entity aspect naming an entity, optionally with an architecture.
Example
use entity work.e_rest(rtl); -- ^^^^^^^^^^^ <- Entity -- ^^^ <- Architecture
Inheritance
- Parameters:
node (Iir)
entity (EntitySymbol)
architecture (ArchitectureSymbol)
- __init__(node, entity, architecture=None)[source]
Initializes an entity aspect naming an entity, optionally with an architecture.
- Parameters:
node (
Iir) – The IIR node this object was translated from.entity (
EntitySymbol) – Reference to the named entity.architecture (
ArchitectureSymbol) – Optional, reference to the selected architecture, orNoneif none was given.
- Return type:
None
- classmethod parse(entityAspectNode)[source]
Translates the IIR node of the entity aspect to an
EntityAspectEntity.
- _position: Position
The IIR node’s position in the source file, resolved on first access and then cached.
- property Architecture: ArchitectureSymbol | None
Read-only property to access the architecture (
_architecture).- Returns:
The architecture, or
Noneif not set.
- DenoteBy(name, region, place, symbol)
Determine the model entity a name denoting this declaration denotes, as a part of a type mark (
Name.Denote).A declaration, which a name in a type mark can denote, overrides this method and returns itself: an object, an alias, a type or subtype, a record element, a package. Any other declaration (e.g. a subprogram) is reported.
- Parameters:
name (
Name) – The name denoting this declaration, a part of the type mark.region (
DeclarativeRegionMixin) – The declarative region containing the type mark.place (
ModelEntity) – The declaration containing the type mark.symbol (
Symbol) – The type mark.
- Return type:
- Returns:
None, as a name in a type mark can’t denote this declaration (reported as a warning).- Raises:
UnhandledCriticalWarningError – Always, if no
WarningCollectorcollects theUnresolvedTypeMarkWarning.
- 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:
AncestorNotFoundError – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate=None)
Return the class’ methods that carry at least one matching attribute.
- Parameters:
predicate (
type[TAttr] |Iterable[type[TAttr]] |None) – Optional, 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 IsOverloadable: bool
Check if this model entity is an overloadable declaration: it may share its designator with other overloadable declarations.
Subprograms, enumeration literals and aliases, which may denote one of them, are overloadable; they override this property.
- Returns:
True, if this model entity is an overloadable declaration.
- IterateImplicitDeclarations()
Iterate the declarations this declaration implies.
An enumerated type implies its enumeration literals, a physical type its units; they override this method.
- Return type:
- Returns:
A generator to iterate (normalized designator, declaration) pairs, in declaration order: none.
- IterateTypeMarks(region)
Iterate the type marks of this declaration, each with the region and the place to look it up.
The place of a type mark is the declaration containing it. Declarations with type marks override this method, e.g. an object yields the type mark of its subtype indication, an array type its index and element subtypes.
- Parameters:
region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.- Return type:
Generator[tuple[DeclarativeRegionMixin,ModelEntity,SubtypeSymbol]]- Returns:
A generator to iterate (region, place, type mark) tuples, in declaration order: none.
- 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: Position
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.
- ResetReferences(designUnit, region)
Reset the references
ResolveReferences()derived: the references of this declaration’s type marks.A use clause, an alias and a subtype extend this method.
- Parameters:
designUnit (
DesignUnit) – The design unit containing this declaration.region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.
- Return type:
- ResolveReferences(designUnit, region)
Resolve the references of this declaration: its type marks (
IterateTypeMarks()).Each type mark is resolved at its place by the region it is looked up in (
ResolveTypeMark()). An incomplete type, an alias and a subtype extend this method.- Parameters:
designUnit (
DesignUnit) – The design unit containing this declaration.region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.
- Raises:
UnhandledCriticalWarningError – If a type mark can’t be resolved, and no
WarningCollectorcollects theUnresolvedTypeMarkWarning.- Return type:
- Visit(visitor)[source]
Walk this entity aspect, its entity and its architecture (if any) with a visitor.
- __getstate__()
Return the object’s state for pickling, collecting every slot of the class hierarchy.
- __new__(**kwargs)
- __setstate__(state)
Restore the object’s state from unpickling, requiring exactly the slots of the class hierarchy.
- _architecture: ArchitectureSymbol | None
Reference to the selected architecture, or
Noneif none was given.
- _entity: EntitySymbol
Reference to the named entity.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Configuration.EntityAspectConfiguration(node, configuration)[source]
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Configuration.EntityAspectConfiguration.Represents an entity aspect naming a configuration.
Example
use configuration work.cfg; -- ^^^^^^^^ <- Configuration
Inheritance
- Parameters:
node (Iir)
configuration (ConfigurationSymbol)
- __init__(node, configuration)[source]
Initializes an entity aspect naming a configuration.
- Parameters:
node (
Iir) – The IIR node this object was translated from.configuration (
ConfigurationSymbol) – Reference to the named configuration.
- Return type:
None
- classmethod parse(entityAspectNode)[source]
Translates the IIR node of the entity aspect to an
EntityAspectConfiguration.
- _position: Position
The IIR node’s position in the source file, resolved on first access and then cached.
- property Configuration: ConfigurationSymbol
Read-only property to access the configuration (
_configuration).- Returns:
The configuration.
- DenoteBy(name, region, place, symbol)
Determine the model entity a name denoting this declaration denotes, as a part of a type mark (
Name.Denote).A declaration, which a name in a type mark can denote, overrides this method and returns itself: an object, an alias, a type or subtype, a record element, a package. Any other declaration (e.g. a subprogram) is reported.
- Parameters:
name (
Name) – The name denoting this declaration, a part of the type mark.region (
DeclarativeRegionMixin) – The declarative region containing the type mark.place (
ModelEntity) – The declaration containing the type mark.symbol (
Symbol) – The type mark.
- Return type:
- Returns:
None, as a name in a type mark can’t denote this declaration (reported as a warning).- Raises:
UnhandledCriticalWarningError – Always, if no
WarningCollectorcollects theUnresolvedTypeMarkWarning.
- 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:
AncestorNotFoundError – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate=None)
Return the class’ methods that carry at least one matching attribute.
- Parameters:
predicate (
type[TAttr] |Iterable[type[TAttr]] |None) – Optional, 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 IsOverloadable: bool
Check if this model entity is an overloadable declaration: it may share its designator with other overloadable declarations.
Subprograms, enumeration literals and aliases, which may denote one of them, are overloadable; they override this property.
- Returns:
True, if this model entity is an overloadable declaration.
- IterateImplicitDeclarations()
Iterate the declarations this declaration implies.
An enumerated type implies its enumeration literals, a physical type its units; they override this method.
- Return type:
- Returns:
A generator to iterate (normalized designator, declaration) pairs, in declaration order: none.
- IterateTypeMarks(region)
Iterate the type marks of this declaration, each with the region and the place to look it up.
The place of a type mark is the declaration containing it. Declarations with type marks override this method, e.g. an object yields the type mark of its subtype indication, an array type its index and element subtypes.
- Parameters:
region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.- Return type:
Generator[tuple[DeclarativeRegionMixin,ModelEntity,SubtypeSymbol]]- Returns:
A generator to iterate (region, place, type mark) tuples, in declaration order: none.
- 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: Position
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.
- ResetReferences(designUnit, region)
Reset the references
ResolveReferences()derived: the references of this declaration’s type marks.A use clause, an alias and a subtype extend this method.
- Parameters:
designUnit (
DesignUnit) – The design unit containing this declaration.region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.
- Return type:
- ResolveReferences(designUnit, region)
Resolve the references of this declaration: its type marks (
IterateTypeMarks()).Each type mark is resolved at its place by the region it is looked up in (
ResolveTypeMark()). An incomplete type, an alias and a subtype extend this method.- Parameters:
designUnit (
DesignUnit) – The design unit containing this declaration.region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.
- Raises:
UnhandledCriticalWarningError – If a type mark can’t be resolved, and no
WarningCollectorcollects theUnresolvedTypeMarkWarning.- Return type:
- __getstate__()
Return the object’s state for pickling, collecting every slot of the class hierarchy.
- __new__(**kwargs)
- __setstate__(state)
Restore the object’s state from unpickling, requiring exactly the slots of the class hierarchy.
- _configuration: ConfigurationSymbol
Reference to the named configuration.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Configuration.EntityAspectOpen(node)[source]
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Configuration.EntityAspectOpen.Represents an open entity aspect, leaving the binding unspecified.
Example
use open; -- ^^^^ <- the aspect
Inheritance
- Parameters:
node (Iir)
- __init__(node)[source]
Initializes an entity aspect denoting open.
- Parameters:
node (
Iir) – The IIR node this object was translated from.- Return type:
None
- classmethod parse(entityAspectNode)[source]
Translates the IIR node of the entity aspect to an
EntityAspectOpen.
- _position: Position
The IIR node’s position in the source file, resolved on first access and then cached.
- DenoteBy(name, region, place, symbol)
Determine the model entity a name denoting this declaration denotes, as a part of a type mark (
Name.Denote).A declaration, which a name in a type mark can denote, overrides this method and returns itself: an object, an alias, a type or subtype, a record element, a package. Any other declaration (e.g. a subprogram) is reported.
- Parameters:
name (
Name) – The name denoting this declaration, a part of the type mark.region (
DeclarativeRegionMixin) – The declarative region containing the type mark.place (
ModelEntity) – The declaration containing the type mark.symbol (
Symbol) – The type mark.
- Return type:
- Returns:
None, as a name in a type mark can’t denote this declaration (reported as a warning).- Raises:
UnhandledCriticalWarningError – Always, if no
WarningCollectorcollects theUnresolvedTypeMarkWarning.
- 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:
AncestorNotFoundError – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate=None)
Return the class’ methods that carry at least one matching attribute.
- Parameters:
predicate (
type[TAttr] |Iterable[type[TAttr]] |None) – Optional, 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 IsOverloadable: bool
Check if this model entity is an overloadable declaration: it may share its designator with other overloadable declarations.
Subprograms, enumeration literals and aliases, which may denote one of them, are overloadable; they override this property.
- Returns:
True, if this model entity is an overloadable declaration.
- IterateImplicitDeclarations()
Iterate the declarations this declaration implies.
An enumerated type implies its enumeration literals, a physical type its units; they override this method.
- Return type:
- Returns:
A generator to iterate (normalized designator, declaration) pairs, in declaration order: none.
- IterateTypeMarks(region)
Iterate the type marks of this declaration, each with the region and the place to look it up.
The place of a type mark is the declaration containing it. Declarations with type marks override this method, e.g. an object yields the type mark of its subtype indication, an array type its index and element subtypes.
- Parameters:
region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.- Return type:
Generator[tuple[DeclarativeRegionMixin,ModelEntity,SubtypeSymbol]]- Returns:
A generator to iterate (region, place, type mark) tuples, in declaration order: none.
- 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: Position
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.
- ResetReferences(designUnit, region)
Reset the references
ResolveReferences()derived: the references of this declaration’s type marks.A use clause, an alias and a subtype extend this method.
- Parameters:
designUnit (
DesignUnit) – The design unit containing this declaration.region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.
- Return type:
- ResolveReferences(designUnit, region)
Resolve the references of this declaration: its type marks (
IterateTypeMarks()).Each type mark is resolved at its place by the region it is looked up in (
ResolveTypeMark()). An incomplete type, an alias and a subtype extend this method.- Parameters:
designUnit (
DesignUnit) – The design unit containing this declaration.region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.
- Raises:
UnhandledCriticalWarningError – If a type mark can’t be resolved, and no
WarningCollectorcollects theUnresolvedTypeMarkWarning.- Return type:
- __getstate__()
Return the object’s state for pickling, collecting every slot of the class hierarchy.
- __new__(**kwargs)
- __setstate__(state)
Restore the object’s state from unpickling, requiring exactly the slots of the class hierarchy.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Configuration.BindingIndication(node, entityAspect=None, genericAssociationItems=None, portAssociationItems=None)[source]
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Configuration.BindingIndication.Represents a binding indication: which design entity a component is bound to.
The entity aspect is available as
EntityAspect, together with the generic and port maps (GenericAssociationItems,PortAssociationItems).Inheritance
- Parameters:
node (Iir)
entityAspect (VHDLModel_EntityAspect)
genericAssociationItems (List[GenericAssociationItem])
portAssociationItems (List[PortAssociationItem])
- __init__(node, entityAspect=None, genericAssociationItems=None, portAssociationItems=None)[source]
Initializes a binding indication.
- Parameters:
node (
Iir) – The IIR node this object was translated from.entityAspect (
EntityAspect) – Optional, the bound design entity, orNoneif not given.genericAssociationItems (
List[GenericAssociationItem]) – Optional, list of all generic associations in the generic map aspect.portAssociationItems (
List[PortAssociationItem]) – Optional, list of all port associations in the port map aspect.
- Return type:
None
- classmethod parse(bindingIndicationNode)[source]
Translates the IIR node of the binding indication to a
BindingIndication.
- _position: Position
The IIR node’s position in the source file, resolved on first access and then cached.
- AddGenericAssociationItem(genericAssociationItem)
Add a generic association at the end of the generic map aspect.
The association’s parent is set to this language construct.
- Parameters:
genericAssociationItem (
GenericAssociationItem) – The generic association to add.- Raises:
ValueError – If parameter ‘genericAssociationItem’ is
None.TypeError – If parameter ‘genericAssociationItem’ is not of type
GenericAssociationItem.AlreadyInDesignError – If parameter ‘genericAssociationItem’ already has a parent.
DuplicateGenericAssociationError – If the association is named, and another named association of the generic map aspect has the same formal.
AssociationOrderError – If the association is positional, and the generic map aspect has a named association.
- Return type:
See also
InsertGenericAssociationItem()→ Insert a generic association at a position of the generic map aspect.
RemoveGenericAssociationItem()→ Remove a generic association from the generic map aspect.
- AddPortAssociationItem(portAssociationItem)
Add a port association at the end of the port map aspect.
The association’s parent is set to this language construct.
- Parameters:
portAssociationItem (
PortAssociationItem) – The port association to add.- Raises:
ValueError – If parameter ‘portAssociationItem’ is
None.TypeError – If parameter ‘portAssociationItem’ is not of type
PortAssociationItem.AlreadyInDesignError – If parameter ‘portAssociationItem’ already has a parent.
DuplicatePortAssociationError – If the association is named, and another named association of the port map aspect has the same formal.
AssociationOrderError – If the association is positional, and the port map aspect has a named association.
- Return type:
See also
InsertPortAssociationItem()→ Insert a port association at a position of the port map aspect.
RemovePortAssociationItem()→ Remove a port association from the port map aspect.
- DenoteBy(name, region, place, symbol)
Determine the model entity a name denoting this declaration denotes, as a part of a type mark (
Name.Denote).A declaration, which a name in a type mark can denote, overrides this method and returns itself: an object, an alias, a type or subtype, a record element, a package. Any other declaration (e.g. a subprogram) is reported.
- Parameters:
name (
Name) – The name denoting this declaration, a part of the type mark.region (
DeclarativeRegionMixin) – The declarative region containing the type mark.place (
ModelEntity) – The declaration containing the type mark.symbol (
Symbol) – The type mark.
- Return type:
- Returns:
None, as a name in a type mark can’t denote this declaration (reported as a warning).- Raises:
UnhandledCriticalWarningError – Always, if no
WarningCollectorcollects theUnresolvedTypeMarkWarning.
- property EntityAspect: EntityAspect | None
Read-only property to access the entity aspect (
_entityAspect).- Returns:
The entity aspect, or
Noneif not set.
- property GenericAssociationItems: list[GenericAssociationItem]
Read-only property to access the generic associations (
_genericAssociationItems).- Returns:
List of generic association 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:
AncestorNotFoundError – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate=None)
Return the class’ methods that carry at least one matching attribute.
- Parameters:
predicate (
type[TAttr] |Iterable[type[TAttr]] |None) – Optional, 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.
- InsertGenericAssociationItem(index, genericAssociationItem)
Insert a generic association at a position of the generic map aspect.
The association’s parent is set to this language construct.
A named association (
formal => actual) can’t repeat the formal of another named association of the generic map aspect. Only formals given as a simple name are compared: a partial association (a(0) => x) or a conversion function (to_integer(a) => x) is accepted. All positional associations precede the named associations.- Parameters:
index (
int) – Position, from0(first) to the number of generic associations (append). A negative index counts from the end, as forlist.insert():-1inserts before the last generic association.genericAssociationItem (
GenericAssociationItem) – The generic association to insert.
- Raises:
ValueError – If parameter ‘index’ is
None.ValueError – If parameter ‘index’ is out of range.
ValueError – If parameter ‘genericAssociationItem’ is
None.TypeError – If parameter ‘genericAssociationItem’ is not of type
GenericAssociationItem.AlreadyInDesignError – If parameter ‘genericAssociationItem’ already has a parent.
DuplicateGenericAssociationError – If the association is named, and another named association of the generic map aspect has the same formal.
AssociationOrderError – If the association is positional, and a named association precedes the position.
AssociationOrderError – If the association is named, and a positional association follows the position.
- Return type:
See also
AddGenericAssociationItem()→ Add a generic association at the end of the generic map aspect.
RemoveGenericAssociationItem()→ Remove a generic association from the generic map aspect.
- InsertPortAssociationItem(index, portAssociationItem)
Insert a port association at a position of the port map aspect.
The association’s parent is set to this language construct.
A named association (
formal => actual) can’t repeat the formal of another named association of the port map aspect. Only formals given as a simple name are compared: a partial association (a(0) => x) or a conversion function (to_integer(a) => x) is accepted. All positional associations precede the named associations.- Parameters:
index (
int) – Position, from0(first) to the number of port associations (append). A negative index counts from the end, as forlist.insert():-1inserts before the last port association.portAssociationItem (
PortAssociationItem) – The port association to insert.
- Raises:
ValueError – If parameter ‘index’ is
None.ValueError – If parameter ‘index’ is out of range.
ValueError – If parameter ‘portAssociationItem’ is
None.TypeError – If parameter ‘portAssociationItem’ is not of type
PortAssociationItem.AlreadyInDesignError – If parameter ‘portAssociationItem’ already has a parent.
DuplicatePortAssociationError – If the association is named, and another named association of the port map aspect has the same formal.
AssociationOrderError – If the association is positional, and a named association precedes the position.
AssociationOrderError – If the association is named, and a positional association follows the position.
- Return type:
See also
AddPortAssociationItem()→ Add a port association at the end of the port map aspect.
RemovePortAssociationItem()→ Remove a port association from the port map aspect.
- property IsOverloadable: bool
Check if this model entity is an overloadable declaration: it may share its designator with other overloadable declarations.
Subprograms, enumeration literals and aliases, which may denote one of them, are overloadable; they override this property.
- Returns:
True, if this model entity is an overloadable declaration.
- IterateImplicitDeclarations()
Iterate the declarations this declaration implies.
An enumerated type implies its enumeration literals, a physical type its units; they override this method.
- Return type:
- Returns:
A generator to iterate (normalized designator, declaration) pairs, in declaration order: none.
- IterateTypeMarks(region)
Iterate the type marks of this declaration, each with the region and the place to look it up.
The place of a type mark is the declaration containing it. Declarations with type marks override this method, e.g. an object yields the type mark of its subtype indication, an array type its index and element subtypes.
- Parameters:
region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.- Return type:
Generator[tuple[DeclarativeRegionMixin,ModelEntity,SubtypeSymbol]]- Returns:
A generator to iterate (region, place, type mark) tuples, in declaration order: none.
- 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 PortAssociationItems: list[PortAssociationItem]
Read-only property to access the port associations (
_portAssociationItems).- Returns:
List of port association items.
- property Position: Position
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.
- RemoveGenericAssociationItem(genericAssociationItem)
Remove a generic association from the generic map aspect.
The association is detached: its parent is cleared. The association itself is unchanged and can be added to another language construct, or inserted at another position.
- Parameters:
genericAssociationItem (
GenericAssociationItem) – The generic association to remove.- Raises:
ValueError – If parameter ‘genericAssociationItem’ is
None.TypeError – If parameter ‘genericAssociationItem’ is not of type
GenericAssociationItem.NotAChildError – If parameter ‘genericAssociationItem’ is not a generic association of this language construct.
- Return type:
See also
AddGenericAssociationItem()→ Add a generic association at the end of the generic map aspect.
InsertGenericAssociationItem()→ Insert a generic association at a position of the generic map aspect.
- RemovePortAssociationItem(portAssociationItem)
Remove a port association from the port map aspect.
The association is detached: its parent is cleared. The association itself is unchanged and can be added to another language construct, or inserted at another position.
- Parameters:
portAssociationItem (
PortAssociationItem) – The port association to remove.- Raises:
ValueError – If parameter ‘portAssociationItem’ is
None.TypeError – If parameter ‘portAssociationItem’ is not of type
PortAssociationItem.NotAChildError – If parameter ‘portAssociationItem’ is not a port association of this language construct.
- Return type:
See also
AddPortAssociationItem()→ Add a port association at the end of the port map aspect.
InsertPortAssociationItem()→ Insert a port association at a position of the port map aspect.
- ResetReferences(designUnit, region)
Reset the references
ResolveReferences()derived: the references of this declaration’s type marks.A use clause, an alias and a subtype extend this method.
- Parameters:
designUnit (
DesignUnit) – The design unit containing this declaration.region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.
- Return type:
- ResolveReferences(designUnit, region)
Resolve the references of this declaration: its type marks (
IterateTypeMarks()).Each type mark is resolved at its place by the region it is looked up in (
ResolveTypeMark()). An incomplete type, an alias and a subtype extend this method.- Parameters:
designUnit (
DesignUnit) – The design unit containing this declaration.region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.
- Raises:
UnhandledCriticalWarningError – If a type mark can’t be resolved, and no
WarningCollectorcollects theUnresolvedTypeMarkWarning.- Return type:
- Visit(visitor)[source]
Walk this binding indication, its entity aspect and its map aspects with a visitor.
- _VisitGenericMapAspect(visitor)
Walk the generic map aspect, if there are generic associations, with a visitor.
The associations are separated by commas.
- _VisitPortMapAspect(visitor)
Walk the port map aspect, if there are port associations, with a visitor.
The associations are separated by commas.
- __getstate__()
Return the object’s state for pickling, collecting every slot of the class hierarchy.
- __new__(**kwargs)
- __setstate__(state)
Restore the object’s state from unpickling, requiring exactly the slots of the class hierarchy.
- _entityAspect: EntityAspect | None
The bound design entity, or
Noneif not given.
- _genericAssociationItems: list[GenericAssociationItem]
List of all generic associations.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _portAssociationItems: list[PortAssociationItem]
List of all port associations.
- class pyGHDL.dom.Configuration.AllInstantiationList(node)[source]
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Configuration.AllInstantiationList.Represents an instantiation list naming
allinstances of a component.Example
for all : comp use entity work.sub(behav); -- ^^^ <- the instantiation list
Inheritance
- Parameters:
node (Iir)
- __init__(node)[source]
Initializes an instantiation list denoting all.
- Parameters:
node (
Iir) – The IIR node this object was translated from.- Return type:
None
- _position: Position
The IIR node’s position in the source file, resolved on first access and then cached.
- DenoteBy(name, region, place, symbol)
Determine the model entity a name denoting this declaration denotes, as a part of a type mark (
Name.Denote).A declaration, which a name in a type mark can denote, overrides this method and returns itself: an object, an alias, a type or subtype, a record element, a package. Any other declaration (e.g. a subprogram) is reported.
- Parameters:
name (
Name) – The name denoting this declaration, a part of the type mark.region (
DeclarativeRegionMixin) – The declarative region containing the type mark.place (
ModelEntity) – The declaration containing the type mark.symbol (
Symbol) – The type mark.
- Return type:
- Returns:
None, as a name in a type mark can’t denote this declaration (reported as a warning).- Raises:
UnhandledCriticalWarningError – Always, if no
WarningCollectorcollects theUnresolvedTypeMarkWarning.
- 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:
AncestorNotFoundError – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate=None)
Return the class’ methods that carry at least one matching attribute.
- Parameters:
predicate (
type[TAttr] |Iterable[type[TAttr]] |None) – Optional, 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 IsOverloadable: bool
Check if this model entity is an overloadable declaration: it may share its designator with other overloadable declarations.
Subprograms, enumeration literals and aliases, which may denote one of them, are overloadable; they override this property.
- Returns:
True, if this model entity is an overloadable declaration.
- IterateImplicitDeclarations()
Iterate the declarations this declaration implies.
An enumerated type implies its enumeration literals, a physical type its units; they override this method.
- Return type:
- Returns:
A generator to iterate (normalized designator, declaration) pairs, in declaration order: none.
- IterateTypeMarks(region)
Iterate the type marks of this declaration, each with the region and the place to look it up.
The place of a type mark is the declaration containing it. Declarations with type marks override this method, e.g. an object yields the type mark of its subtype indication, an array type its index and element subtypes.
- Parameters:
region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.- Return type:
Generator[tuple[DeclarativeRegionMixin,ModelEntity,SubtypeSymbol]]- Returns:
A generator to iterate (region, place, type mark) tuples, in declaration order: none.
- 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: Position
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.
- ResetReferences(designUnit, region)
Reset the references
ResolveReferences()derived: the references of this declaration’s type marks.A use clause, an alias and a subtype extend this method.
- Parameters:
designUnit (
DesignUnit) – The design unit containing this declaration.region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.
- Return type:
- ResolveReferences(designUnit, region)
Resolve the references of this declaration: its type marks (
IterateTypeMarks()).Each type mark is resolved at its place by the region it is looked up in (
ResolveTypeMark()). An incomplete type, an alias and a subtype extend this method.- Parameters:
designUnit (
DesignUnit) – The design unit containing this declaration.region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.
- Raises:
UnhandledCriticalWarningError – If a type mark can’t be resolved, and no
WarningCollectorcollects theUnresolvedTypeMarkWarning.- Return type:
- __getstate__()
Return the object’s state for pickling, collecting every slot of the class hierarchy.
- __new__(**kwargs)
- __setstate__(state)
Restore the object’s state from unpickling, requiring exactly the slots of the class hierarchy.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Configuration.OthersInstantiationList(node)[source]
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Configuration.OthersInstantiationList.Represents an instantiation list naming all instances not configured elsewhere.
Example
for others : comp use entity work.sub(behav); -- ^^^^^^ <- the instantiation list
Inheritance
- Parameters:
node (Iir)
- __init__(node)[source]
Initializes an instantiation list denoting others.
- Parameters:
node (
Iir) – The IIR node this object was translated from.- Return type:
None
- _position: Position
The IIR node’s position in the source file, resolved on first access and then cached.
- DenoteBy(name, region, place, symbol)
Determine the model entity a name denoting this declaration denotes, as a part of a type mark (
Name.Denote).A declaration, which a name in a type mark can denote, overrides this method and returns itself: an object, an alias, a type or subtype, a record element, a package. Any other declaration (e.g. a subprogram) is reported.
- Parameters:
name (
Name) – The name denoting this declaration, a part of the type mark.region (
DeclarativeRegionMixin) – The declarative region containing the type mark.place (
ModelEntity) – The declaration containing the type mark.symbol (
Symbol) – The type mark.
- Return type:
- Returns:
None, as a name in a type mark can’t denote this declaration (reported as a warning).- Raises:
UnhandledCriticalWarningError – Always, if no
WarningCollectorcollects theUnresolvedTypeMarkWarning.
- 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:
AncestorNotFoundError – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate=None)
Return the class’ methods that carry at least one matching attribute.
- Parameters:
predicate (
type[TAttr] |Iterable[type[TAttr]] |None) – Optional, 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 IsOverloadable: bool
Check if this model entity is an overloadable declaration: it may share its designator with other overloadable declarations.
Subprograms, enumeration literals and aliases, which may denote one of them, are overloadable; they override this property.
- Returns:
True, if this model entity is an overloadable declaration.
- IterateImplicitDeclarations()
Iterate the declarations this declaration implies.
An enumerated type implies its enumeration literals, a physical type its units; they override this method.
- Return type:
- Returns:
A generator to iterate (normalized designator, declaration) pairs, in declaration order: none.
- IterateTypeMarks(region)
Iterate the type marks of this declaration, each with the region and the place to look it up.
The place of a type mark is the declaration containing it. Declarations with type marks override this method, e.g. an object yields the type mark of its subtype indication, an array type its index and element subtypes.
- Parameters:
region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.- Return type:
Generator[tuple[DeclarativeRegionMixin,ModelEntity,SubtypeSymbol]]- Returns:
A generator to iterate (region, place, type mark) tuples, in declaration order: none.
- 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: Position
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.
- ResetReferences(designUnit, region)
Reset the references
ResolveReferences()derived: the references of this declaration’s type marks.A use clause, an alias and a subtype extend this method.
- Parameters:
designUnit (
DesignUnit) – The design unit containing this declaration.region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.
- Return type:
- ResolveReferences(designUnit, region)
Resolve the references of this declaration: its type marks (
IterateTypeMarks()).Each type mark is resolved at its place by the region it is looked up in (
ResolveTypeMark()). An incomplete type, an alias and a subtype extend this method.- Parameters:
designUnit (
DesignUnit) – The design unit containing this declaration.region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.
- Raises:
UnhandledCriticalWarningError – If a type mark can’t be resolved, and no
WarningCollectorcollects theUnresolvedTypeMarkWarning.- Return type:
- __getstate__()
Return the object’s state for pickling, collecting every slot of the class hierarchy.
- __new__(**kwargs)
- __setstate__(state)
Restore the object’s state from unpickling, requiring exactly the slots of the class hierarchy.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Configuration.ComponentConfiguration(node, instantiationList, componentName, bindingIndication=None)[source]
Note
Also used for configuration specifications (
for U1 : comp use entity ...;declared directly in an architecture’s declarative part) - GHDL represents both with the identical field structure (Instantiation_List,Component_Name,Binding_Indication).Inheritance
- Parameters:
node (Iir)
instantiationList (Union[List[Name], AllInstantiationList, OthersInstantiationList])
componentName (ComponentInstantiationSymbol)
bindingIndication (BindingIndication)
- __init__(node, instantiationList, componentName, bindingIndication=None)[source]
Initializes a component configuration.
- Parameters:
node (
Iir) – The IIR node this object was translated from.instantiationList (
List[Name] |AllInstantiationList|OthersInstantiationList) – The instances this configuration applies to.componentName (
ComponentInstantiationSymbol) – Reference to the component being configured.bindingIndication (
BindingIndication) – Optional, the binding indication, orNoneif none was given.
- Return type:
None
- classmethod parse(node)[source]
Translates an IIR node to a
ComponentConfiguration.
- _position: Position
The IIR node’s position in the source file, resolved on first access and then cached.
- property BindingIndication: BindingIndication | None
Read-only property to access the binding indication (
_bindingIndication).- Returns:
The binding indication, or
Noneif not set.
- property ComponentName: ComponentInstantiationSymbol
Read-only property to access the component name (
_componentName).- Returns:
The component name.
- DenoteBy(name, region, place, symbol)
Determine the model entity a name denoting this declaration denotes, as a part of a type mark (
Name.Denote).A declaration, which a name in a type mark can denote, overrides this method and returns itself: an object, an alias, a type or subtype, a record element, a package. Any other declaration (e.g. a subprogram) is reported.
- Parameters:
name (
Name) – The name denoting this declaration, a part of the type mark.region (
DeclarativeRegionMixin) – The declarative region containing the type mark.place (
ModelEntity) – The declaration containing the type mark.symbol (
Symbol) – The type mark.
- Return type:
- Returns:
None, as a name in a type mark can’t denote this declaration (reported as a warning).- Raises:
UnhandledCriticalWarningError – Always, if no
WarningCollectorcollects theUnresolvedTypeMarkWarning.
- 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:
AncestorNotFoundError – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate=None)
Return the class’ methods that carry at least one matching attribute.
- Parameters:
predicate (
type[TAttr] |Iterable[type[TAttr]] |None) – Optional, 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 InstantiationList: list[Name] | AllInstantiationList | OthersInstantiationList
Read-only property to access the instantiation list (
_instantiationList).- Returns:
The instantiation list.
- property IsOverloadable: bool
Check if this model entity is an overloadable declaration: it may share its designator with other overloadable declarations.
Subprograms, enumeration literals and aliases, which may denote one of them, are overloadable; they override this property.
- Returns:
True, if this model entity is an overloadable declaration.
- IterateImplicitDeclarations()
Iterate the declarations this declaration implies.
An enumerated type implies its enumeration literals, a physical type its units; they override this method.
- Return type:
- Returns:
A generator to iterate (normalized designator, declaration) pairs, in declaration order: none.
- IterateTypeMarks(region)
Iterate the type marks of this declaration, each with the region and the place to look it up.
The place of a type mark is the declaration containing it. Declarations with type marks override this method, e.g. an object yields the type mark of its subtype indication, an array type its index and element subtypes.
- Parameters:
region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.- Return type:
Generator[tuple[DeclarativeRegionMixin,ModelEntity,SubtypeSymbol]]- Returns:
A generator to iterate (region, place, type mark) tuples, in declaration order: none.
- 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: Position
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.
- ResetReferences(designUnit, region)
Reset the references
ResolveReferences()derived: the references of this declaration’s type marks.A use clause, an alias and a subtype extend this method.
- Parameters:
designUnit (
DesignUnit) – The design unit containing this declaration.region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.
- Return type:
- ResolveReferences(designUnit, region)
Resolve the references of this declaration: its type marks (
IterateTypeMarks()).Each type mark is resolved at its place by the region it is looked up in (
ResolveTypeMark()). An incomplete type, an alias and a subtype extend this method.- Parameters:
designUnit (
DesignUnit) – The design unit containing this declaration.region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.
- Raises:
UnhandledCriticalWarningError – If a type mark can’t be resolved, and no
WarningCollectorcollects theUnresolvedTypeMarkWarning.- Return type:
- Visit(visitor)[source]
Walk this component configuration, its component specification and its binding indication with a visitor.
- _END_KEYWORDS: ClassVar[tuple[ReservedWord, ...]] = (ReservedWord.For,)
Reserved words after
end.
- __getstate__()
Return the object’s state for pickling, collecting every slot of the class hierarchy.
- __new__(**kwargs)
- __setstate__(state)
Restore the object’s state from unpickling, requiring exactly the slots of the class hierarchy.
- _bindingIndication: BindingIndication | None
The binding indication, or
Noneif none was given.
- _componentName: ComponentInstantiationSymbol
Reference to the component being configured.
- _instantiationList: list[Name] | AllInstantiationList | OthersInstantiationList
The instances this configuration applies to.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Configuration.BlockConfiguration(node, blockSpecification, items=None)[source]
This class implements a
pyGHDL.domobject derived frompyVHDLModel.Configuration.BlockConfiguration.Represents the configuration of one block: an architecture, a block statement or a generate body.
Nested configurations are available as
Items.Example
for rtl -- ^^^ <- Block end for;
Inheritance
- Parameters:
node (Iir)
blockSpecification (Symbol)
items (List[Union[BlockConfiguration, ComponentConfiguration]])
- __init__(node, blockSpecification, items=None)[source]
Initializes a block configuration.
- Parameters:
node (
Iir) – The IIR node this object was translated from.blockSpecification (
Symbol) – The configured block.items (
List[BlockConfiguration|ComponentConfiguration]) – Optional, nested configurations.
- Return type:
None
- classmethod parse(node)[source]
Translates an IIR node to a
BlockConfiguration.
- _position: Position
The IIR node’s position in the source file, resolved on first access and then cached.
- property BlockSpecification: Symbol
Read-only property to access the block specification (
_blockSpecification).- Returns:
The block specification.
- DenoteBy(name, region, place, symbol)
Determine the model entity a name denoting this declaration denotes, as a part of a type mark (
Name.Denote).A declaration, which a name in a type mark can denote, overrides this method and returns itself: an object, an alias, a type or subtype, a record element, a package. Any other declaration (e.g. a subprogram) is reported.
- Parameters:
name (
Name) – The name denoting this declaration, a part of the type mark.region (
DeclarativeRegionMixin) – The declarative region containing the type mark.place (
ModelEntity) – The declaration containing the type mark.symbol (
Symbol) – The type mark.
- Return type:
- Returns:
None, as a name in a type mark can’t denote this declaration (reported as a warning).- Raises:
UnhandledCriticalWarningError – Always, if no
WarningCollectorcollects theUnresolvedTypeMarkWarning.
- 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:
AncestorNotFoundError – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate=None)
Return the class’ methods that carry at least one matching attribute.
- Parameters:
predicate (
type[TAttr] |Iterable[type[TAttr]] |None) – Optional, 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 IsOverloadable: bool
Check if this model entity is an overloadable declaration: it may share its designator with other overloadable declarations.
Subprograms, enumeration literals and aliases, which may denote one of them, are overloadable; they override this property.
- Returns:
True, if this model entity is an overloadable declaration.
- property Items: list[BlockConfiguration | ComponentConfiguration]
Read-only property to access the items (
_items).- Returns:
List of items.
- IterateImplicitDeclarations()
Iterate the declarations this declaration implies.
An enumerated type implies its enumeration literals, a physical type its units; they override this method.
- Return type:
- Returns:
A generator to iterate (normalized designator, declaration) pairs, in declaration order: none.
- IterateTypeMarks(region)
Iterate the type marks of this declaration, each with the region and the place to look it up.
The place of a type mark is the declaration containing it. Declarations with type marks override this method, e.g. an object yields the type mark of its subtype indication, an array type its index and element subtypes.
- Parameters:
region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.- Return type:
Generator[tuple[DeclarativeRegionMixin,ModelEntity,SubtypeSymbol]]- Returns:
A generator to iterate (region, place, type mark) tuples, in declaration order: none.
- 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: Position
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.
- ResetReferences(designUnit, region)
Reset the references
ResolveReferences()derived: the references of this declaration’s type marks.A use clause, an alias and a subtype extend this method.
- Parameters:
designUnit (
DesignUnit) – The design unit containing this declaration.region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.
- Return type:
- ResolveReferences(designUnit, region)
Resolve the references of this declaration: its type marks (
IterateTypeMarks()).Each type mark is resolved at its place by the region it is looked up in (
ResolveTypeMark()). An incomplete type, an alias and a subtype extend this method.- Parameters:
designUnit (
DesignUnit) – The design unit containing this declaration.region (
DeclarativeRegionMixin) – The declarative region declaring this declaration.
- Raises:
UnhandledCriticalWarningError – If a type mark can’t be resolved, and no
WarningCollectorcollects theUnresolvedTypeMarkWarning.- Return type:
- Visit(visitor)[source]
Walk this block configuration, its block specification and its nested configurations with a visitor.
- _END_KEYWORDS: ClassVar[tuple[ReservedWord, ...]] = (ReservedWord.For,)
Reserved words after
end.
- __getstate__()
Return the object’s state for pickling, collecting every slot of the class hierarchy.
- __new__(**kwargs)
- __setstate__(state)
Restore the object’s state from unpickling, requiring exactly the slots of the class hierarchy.
- _items: list[BlockConfiguration | ComponentConfiguration]
Nested configurations.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.