pyGHDL.dom.Concurrent
Classes
GenericAssociationItem: A base-class for all generic association items used in generic map aspects.PortAssociationItem: A base-class for all port association items used in port map aspects.ParameterAssociationItem: A base-class for all parameter association items used in parameter map aspects.ComponentInstantiation: Represents a component instantiation.EntityInstantiation: Represents a direct entity instantiation.ConfigurationInstantiation: Represents a configuration instantiation.ConcurrentBlockStatement: Represents a block statement.ProcessStatement: Represents a process statement.IfGenerateBranch: Represents if-generate branch in a generate statement with a concurrent declaration region and concurrent statements.ElsifGenerateBranch: Represents elsif-generate branch in a generate statement with a concurrent declaration region and concurrent statements.ElseGenerateBranch: Represents else-generate branch in a generate statement with a concurrent declaration region and concurrent statements.IfGenerateStatement: Represents an if-generate statement.IndexedGenerateChoice: Represents a case-generate choice given by a single value.RangedGenerateChoice: Represents a case-generate choice given by a range.GenerateCase: Represents one alternative of a case-generate statement, selected by its choices.OthersGenerateCase: Represents theothersalternative of a case-generate statement.CaseGenerateStatement: Represents a case-generate statement.ForGenerateStatement: Represents a for-generate statement.WaveformElement: Represents one element of a waveform in a signal assignment.ConditionalWaveform: Represents one branch of a conditional signal assignment.SelectedWaveform: Represents one alternative of a selected signal assignment.OthersSelectedWaveform: Represents theothersalternative of a selected signal assignment.ConcurrentSimpleSignalAssignment: Represents a simple concurrent signal assignment.ConcurrentConditionalSignalAssignment: Represents a conditional concurrent signal assignment.ConcurrentSelectedSignalAssignment: Represents a selected concurrent signal assignment.ConcurrentProcedureCall: Represents a concurrent procedure call.ConcurrentAssertStatement: Represents a concurrent assertion statement.
Classes
- class pyGHDL.dom.Concurrent.GenericAssociationItem(associationNode, formal, actual)[source]
Inheritance
- Parameters:
associationNode (Iir)
formal (Symbol)
actual (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- property Actual: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
Read-only property to access the actual (
_actual).- Returns:
The actual.
- property Formal: Symbol | None
Read-only property to access the formal (
_formal).- Returns:
The formal, or
Noneif not set.
- 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 0x7c526738b7d0>
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.
- __str__()
Formats the association item.
Format:
formal => actual, oractualalone when positional- Return type:
- Returns:
Formatted association item.
- _actual: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
The actual part of this association.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Concurrent.PortAssociationItem(associationNode, formal, actual)[source]
Inheritance
- Parameters:
associationNode (Iir)
formal (Symbol)
actual (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- property Actual: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
Read-only property to access the actual (
_actual).- Returns:
The actual.
- property Formal: Symbol | None
Read-only property to access the formal (
_formal).- Returns:
The formal, or
Noneif not set.
- 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 0x7c526738b7d0>
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.
- __str__()
Formats the association item.
Format:
formal => actual, oractualalone when positional- Return type:
- Returns:
Formatted association item.
- _actual: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
The actual part of this association.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Concurrent.ParameterAssociationItem(associationNode, formal, actual)[source]
Inheritance
- Parameters:
associationNode (Iir)
formal (Symbol)
actual (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- property Actual: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
Read-only property to access the actual (
_actual).- Returns:
The actual.
- property Formal: Symbol | None
Read-only property to access the formal (
_formal).- Returns:
The formal, or
Noneif not set.
- 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 0x7c526738b7d0>
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.
- __str__()
Formats the association item.
Format:
formal => actual, oractualalone when positional- Return type:
- Returns:
Formatted association item.
- _actual: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
The actual part of this association.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Concurrent.ComponentInstantiation(instantiationNode, label, componentSymbol, genericAssociationItems=None, portAssociationItems=None)[source]
Inheritance
- Parameters:
instantiationNode (Iir)
label (str)
componentSymbol (ComponentInstantiationSymbol)
genericAssociationItems (Iterable[AssociationItem])
portAssociationItems (Iterable[AssociationItem])
- __init__(instantiationNode, label, componentSymbol, genericAssociationItems=None, portAssociationItems=None)[source]
Initializes a component instantiation.
- Parameters:
label (
str) – The label of a model entity.componentSymbol (
ComponentInstantiationSymbol) – Reference to the instantiated component.genericAssociationItems (
Iterable[AssociationItem]) – List of all generic associations in the generic map aspect.portAssociationItems (
Iterable[AssociationItem]) – List of all port associations in the port map aspect.parent – The parent model entity of this entity.
instantiationNode (Iir)
- Return type:
None
- property Component: ComponentInstantiationSymbol
Read-only property to access the component (
_component).- Returns:
The component.
- 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:
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 Label: str | None
Read-only property to access the model entity’s label (
_label).- Returns:
Label of a model entity.
- property NormalizedLabel: str | None
Read-only property to access the model entity’s normalized label (
_normalizedLabel).- Returns:
Normalized label 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 PortAssociationItems: List[PortAssociationItem]
Read-only property to access the port associations (
_portAssociationItems).- Returns:
List of port association items.
- property Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
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.
- _component: ComponentInstantiationSymbol
Reference to the instantiated component.
- _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.Concurrent.EntityInstantiation(instantiationNode, label, entitySymbol, architectureSymbol=None, genericAssociationItems=None, portAssociationItems=None)[source]
Inheritance
- Parameters:
instantiationNode (Iir)
label (str)
entitySymbol (EntityInstantiationSymbol)
architectureSymbol (ArchitectureSymbol)
genericAssociationItems (Iterable[AssociationItem])
portAssociationItems (Iterable[AssociationItem])
- __init__(instantiationNode, label, entitySymbol, architectureSymbol=None, genericAssociationItems=None, portAssociationItems=None)[source]
Initializes a direct entity instantiation.
- Parameters:
label (
str) – The label of a model entity.entitySymbol (
EntityInstantiationSymbol) – Reference to the directly instantiated entity.architectureSymbol (
ArchitectureSymbol) – Reference to the selected architecture, if one was given.genericAssociationItems (
Iterable[AssociationItem]) – List of all generic associations in the generic map aspect.portAssociationItems (
Iterable[AssociationItem]) – List of all port associations in the port map aspect.parent – The parent model entity of this entity.
instantiationNode (Iir)
- Return type:
None
- property Architecture: ArchitectureSymbol
Read-only property to access the architecture (
_architecture).- Returns:
The architecture.
- property Entity: EntityInstantiationSymbol
Read-only property to access the entity (
_entity).- Returns:
The entity.
- 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:
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 Label: str | None
Read-only property to access the model entity’s label (
_label).- Returns:
Label of a model entity.
- property NormalizedLabel: str | None
Read-only property to access the model entity’s normalized label (
_normalizedLabel).- Returns:
Normalized label 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 PortAssociationItems: List[PortAssociationItem]
Read-only property to access the port associations (
_portAssociationItems).- Returns:
List of port association items.
- property Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
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.
- _architecture: ArchitectureSymbol
Reference to the selected architecture, if one was given.
- _entity: EntityInstantiationSymbol
Reference to the directly instantiated entity.
- _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.Concurrent.ConfigurationInstantiation(instantiationNode, label, configurationSymbol, genericAssociationItems=None, portAssociationItems=None)[source]
Inheritance
- Parameters:
instantiationNode (Iir)
label (str)
configurationSymbol (ConfigurationInstantiationSymbol)
genericAssociationItems (Iterable[AssociationItem])
portAssociationItems (Iterable[AssociationItem])
- __init__(instantiationNode, label, configurationSymbol, genericAssociationItems=None, portAssociationItems=None)[source]
Initializes a configuration instantiation.
- Parameters:
label (
str) – The label of a model entity.configurationSymbol (
ConfigurationInstantiationSymbol) – Reference to the instantiated configuration.genericAssociationItems (
Iterable[AssociationItem]) – List of all generic associations in the generic map aspect.portAssociationItems (
Iterable[AssociationItem]) – List of all port associations in the port map aspect.parent – The parent model entity of this entity.
instantiationNode (Iir)
- Return type:
None
- property Configuration: ConfigurationInstantiationSymbol
Read-only property to access the configuration (
_configuration).- Returns:
The configuration.
- 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:
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 Label: str | None
Read-only property to access the model entity’s label (
_label).- Returns:
Label of a model entity.
- property NormalizedLabel: str | None
Read-only property to access the model entity’s normalized label (
_normalizedLabel).- Returns:
Normalized label 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 PortAssociationItems: List[PortAssociationItem]
Read-only property to access the port associations (
_portAssociationItems).- Returns:
List of port association items.
- property Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
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.
- _configuration: ConfigurationInstantiationSymbol
Reference to the instantiated configuration.
- _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.Concurrent.ConcurrentBlockStatement(blockNode, label, genericItems=None, genericAssociationItems=None, portItems=None, portAssociationItems=None, declaredItems=None, statements=None)[source]
Inheritance
- Parameters:
- __init__(blockNode, label, genericItems=None, genericAssociationItems=None, portItems=None, portAssociationItems=None, declaredItems=None, statements=None)[source]
Initializes a block statement.
- Parameters:
label (
str) – The label of a model entity.genericItems (
Iterable) – List of all generics, in declaration order.genericAssociationItems (
Iterable) – List of all generic associations in the generic map aspect.portItems (
Iterable) – List of all ports, in declaration order.portAssociationItems (
Iterable) – List of all port associations in the port map aspect.declaredItems (
Iterable) – List of all declared items in this concurrent declaration region.statements (
Iterable[ConcurrentStatement]) – List of all concurrent statements in this construct.documentation – The documentation comment associated with this declaration.
allowBlackbox – Allow blackboxes for components in language entity.
parent – The parent model entity of this entity.
blockNode (Iir)
- Return type:
None
- 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 DeclaredItems: List
Read-only property to access the declared items (
_declaredItems).- Returns:
List of declared items.
- 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.
- IndexDeclaredItems()[source]
A block’s ports share the declarative region of its declarative part.
- Return type:
- property Label: str | None
Read-only property to access the model entity’s label (
_label).- Returns:
Label of a model entity.
- property NormalizedLabel: str | None
Read-only property to access the model entity’s normalized label (
_normalizedLabel).- Returns:
Normalized label 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 PortAssociationItems: List[PortAssociationItem]
Read-only property to access the port associations (
_portAssociationItems).- Returns:
List of port association items.
- 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 0x7c526738b7d0>
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.
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:
- _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.
- _declaredItems
List of all declared items in this concurrent declaration region.
- _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.
- _hierarchy
All elements creating a hierarchy level (blocks and generates), in declaration order.
- _instantiations
All instantiations, indexed by label.
- _label
The label of a model entity.
- _namespace
The namespace of this block’s declarative region.
- _normalizedLabel
The normalized (lower case) label of a model entity.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _portAssociationItems
List of all port associations.
- _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.
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.Concurrent.ProcessStatement(processNode, label=None, declaredItems=None, statements=None, sensitivityList=None)[source]
Inheritance
- Parameters:
- __init__(processNode, label=None, declaredItems=None, statements=None, sensitivityList=None)[source]
Initializes a process statement.
- Parameters:
label (
str) – The label of a model entity.declaredItems (
Iterable) – List of all declared items in this sequential declaration region.statements (
Iterable[SequentialStatement]) – List of all sequential statements in this construct.sensitivityList (
Iterable[Symbol]) – List of all signal names in the sensitivity list, orNoneif none was given.documentation – The documentation comment associated with this declaration.
parent – The parent model entity of this entity.
processNode (Iir)
- Return type:
None
- property Constants: Dict[str, Constant]
Read-only property to access the declared constants (
_constants).- Returns:
Dictionary of constants, indexed by normalized identifier.
- property DeclaredItems: List
Read-only property to access the declared items (
_declaredItems).- Returns:
List of declared items.
- 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 declared files (
_files).- Returns:
Dictionary of files, indexed by normalized identifier.
- property Functions: Dict[str, List[Function]]
Read-only property to access the declared 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.
- IndexDeclaredItems()
Index declared items listed in the sequential declaration region.
Every declared item is added to
_namespace, and additionally to the lookup table matching its kind. Items of an unhandled kind are passed to_IndexOtherDeclaredItem().See also
ConcurrentDeclarationRegionMixin.IndexDeclaredItems()The same algorithm for a concurrent declaration region.
- Return type:
- property Label: str | None
Read-only property to access the model entity’s label (
_label).- Returns:
Label of a model entity.
- property Namespace: <pyTooling.Decorators.readonly object at 0x7c5266bcf650>
Read-only property to access this region’s namespace (
_namespace).- Returns:
The namespace.
- property NormalizedLabel: str | None
Read-only property to access the model entity’s normalized label (
_normalizedLabel).- Returns:
Normalized label 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 Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
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 declared procedures (
_procedures).- Returns:
Dictionary of procedures, indexed by normalized identifier; each entry is a list of overloads.
- property SensitivityList: List[Name]
Read-only property to access the sensitivity list (
_sensitivityList).- Returns:
List of sensitivity list.
- property Statements: List[SequentialStatement]
Read-only property to access the list of sequential statements (
_statements).- Returns:
A list of sequential statements.
- property Subtypes: Dict[str, Subtype]
Read-only property to access the declared subtypes (
_subtypes).- Returns:
Dictionary of subtypes, indexed by normalized identifier.
- property Types: Dict[str, FullType]
Read-only property to access the declared types (
_types).- Returns:
Dictionary of types, indexed by normalized identifier.
- property Variables: Dict[str, Variable]
Read-only property to access the declared variables (
_variables).- Returns:
Dictionary of variables, indexed by normalized identifier.
- _IndexOtherDeclaredItem(item)
Hook for declared items the region doesn’t handle itself. Derived classes may override it.
- Return type:
- _constants
Dictionary of all constants declared in this sequential declaration region.
- _declaredItems
List of all declared items in this sequential declaration region.
- _documentation
The associated documentation of a model entity.
- _files
Dictionary of all files declared in this sequential declaration region.
- _functions
Dictionary of all functions declared in this sequential declaration region, indexed by name; each entry is a list of overloads.
- _label
The label of a model entity.
- _namespace
The namespace of this sequential declaration region.
- _normalizedLabel
The normalized (lower case) label of a model entity.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _procedures
Dictionary of all procedures declared in this sequential declaration region, indexed by name; each entry is a list of overloads.
- _sensitivityList
List of all signal names in the sensitivity list, or
Noneif none was given.
- _statements
List of all sequential statements in this construct.
- _subtypes
Dictionary of all subtypes declared in this sequential declaration region.
- _types
Dictionary of all types declared in this sequential declaration region.
- _variables
Dictionary of all variables declared in this sequential declaration region.
- class pyGHDL.dom.Concurrent.IfGenerateBranch(branchNode, condition, declaredItems=None, statements=None, alternativeLabel=None)[source]
Inheritance
- Parameters:
branchNode (Iir)
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
declaredItems (Iterable)
statements (Iterable[ConcurrentStatement])
alternativeLabel (str)
- __init__(branchNode, condition, declaredItems=None, statements=None, alternativeLabel=None)[source]
Initializes an if generate branch.
- Parameters:
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The condition guarding this statement.
declaredItems (
Iterable) – List of all declared items in this concurrent declaration region.statements (
Iterable[ConcurrentStatement]) – List of all concurrent statements in this construct.alternativeLabel (
str) – The branch’s alternative label, if one was given.allowBlackbox – Allow blackboxes for components in language entity.
parent – The parent model entity of this entity.
branchNode (Iir)
- Return type:
None
- 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 AlternativeLabel: str | None
Read-only property to access the alternative label (
_alternativeLabel).- Returns:
The alternative label, or
Noneif not set.
- property Components: Dict[str, Any]
Read-only property to access the components (
_components).- Returns:
Dictionary of components, indexed by normalized identifier.
- property Condition: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
Read-only property to access the condition of a statement (
_condition).- Returns:
The expression representing the condition of a statement.
- property Constants: Dict[str, Constant]
Read-only property to access the constants (
_constants).- Returns:
Dictionary of constants, indexed by normalized identifier.
- property DeclaredItems: List
Read-only property to access the declared items (
_declaredItems).- Returns:
List of declared items.
- 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.
- 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 NormalizedAlternativeLabel: str | None
Read-only property to access the normalized alternative label (
_normalizedAlternativeLabel).- Returns:
The normalized alternative label, or
Noneif not set.
- 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 0x7c526738b7d0>
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.
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:
- _allowBlackbox
Allow blackboxes for components in language entity.
- _alternativeLabel
The branch’s alternative label, if one was given.
- _components
Dictionary of all components declared in this concurrent declaration region.
- _condition
The condition guarding this statement.
- _constants
Dictionary of all constants declared in this concurrent declaration region.
- _declaredItems
List of all declared items in this concurrent declaration region.
- _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.
- _instantiations
All instantiations, indexed by label.
- _namespace
The namespace of this branch’s declarative region.
- _normalizedAlternativeLabel
The normalized (lower case) alternative label.
- _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.
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.Concurrent.ElsifGenerateBranch(branchNode, condition, declaredItems=None, statements=None, alternativeLabel=None)[source]
Inheritance
- Parameters:
branchNode (Iir)
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
declaredItems (Iterable)
statements (Iterable[ConcurrentStatement])
alternativeLabel (str)
- __init__(branchNode, condition, declaredItems=None, statements=None, alternativeLabel=None)[source]
Initializes an elsif generate branch.
- Parameters:
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The condition guarding this statement.
declaredItems (
Iterable) – List of all declared items in this concurrent declaration region.statements (
Iterable[ConcurrentStatement]) – List of all concurrent statements in this construct.alternativeLabel (
str) – The branch’s alternative label, if one was given.allowBlackbox – Allow blackboxes for components in language entity.
parent – The parent model entity of this entity.
branchNode (Iir)
- Return type:
None
- 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 AlternativeLabel: str | None
Read-only property to access the alternative label (
_alternativeLabel).- Returns:
The alternative label, or
Noneif not set.
- property Components: Dict[str, Any]
Read-only property to access the components (
_components).- Returns:
Dictionary of components, indexed by normalized identifier.
- property Condition: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
Read-only property to access the condition of a statement (
_condition).- Returns:
The expression representing the condition of a statement.
- property Constants: Dict[str, Constant]
Read-only property to access the constants (
_constants).- Returns:
Dictionary of constants, indexed by normalized identifier.
- property DeclaredItems: List
Read-only property to access the declared items (
_declaredItems).- Returns:
List of declared items.
- 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.
- 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 NormalizedAlternativeLabel: str | None
Read-only property to access the normalized alternative label (
_normalizedAlternativeLabel).- Returns:
The normalized alternative label, or
Noneif not set.
- 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 0x7c526738b7d0>
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.
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:
- _allowBlackbox
Allow blackboxes for components in language entity.
- _alternativeLabel
The branch’s alternative label, if one was given.
- _components
Dictionary of all components declared in this concurrent declaration region.
- _condition
The condition guarding this statement.
- _constants
Dictionary of all constants declared in this concurrent declaration region.
- _declaredItems
List of all declared items in this concurrent declaration region.
- _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.
- _instantiations
All instantiations, indexed by label.
- _namespace
The namespace of this branch’s declarative region.
- _normalizedAlternativeLabel
The normalized (lower case) alternative label.
- _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.
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.Concurrent.ElseGenerateBranch(branchNode, declaredItems=None, statements=None, alternativeLabel=None)[source]
Inheritance
- Parameters:
branchNode (Iir)
declaredItems (Iterable)
statements (Iterable[ConcurrentStatement])
alternativeLabel (str)
- __init__(branchNode, declaredItems=None, statements=None, alternativeLabel=None)[source]
Initializes an else generate branch.
- Parameters:
declaredItems (
Iterable) – List of all declared items in this concurrent declaration region.statements (
Iterable[ConcurrentStatement]) – List of all concurrent statements in this construct.alternativeLabel (
str) – The branch’s alternative label, if one was given.allowBlackbox – Allow blackboxes for components in language entity.
parent – The parent model entity of this entity.
branchNode (Iir)
- Return type:
None
- 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 AlternativeLabel: str | None
Read-only property to access the alternative label (
_alternativeLabel).- Returns:
The alternative label, or
Noneif not set.
- 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 DeclaredItems: List
Read-only property to access the declared items (
_declaredItems).- Returns:
List of declared items.
- 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.
- 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 NormalizedAlternativeLabel: str | None
Read-only property to access the normalized alternative label (
_normalizedAlternativeLabel).- Returns:
The normalized alternative label, or
Noneif not set.
- 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 0x7c526738b7d0>
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.
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:
- _allowBlackbox
Allow blackboxes for components in language entity.
- _alternativeLabel
The branch’s alternative label, if one was given.
- _components
Dictionary of all components declared in this concurrent declaration region.
- _constants
Dictionary of all constants declared in this concurrent declaration region.
- _declaredItems
List of all declared items in this concurrent declaration region.
- _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.
- _instantiations
All instantiations, indexed by label.
- _namespace
The namespace of this branch’s declarative region.
- _normalizedAlternativeLabel
The normalized (lower case) alternative label.
- _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.
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.Concurrent.IfGenerateStatement(generateNode, label, ifBranch, elsifBranches=None, elseBranch=None)[source]
Inheritance
- Parameters:
generateNode (Iir)
label (str)
ifBranch (IfGenerateBranch)
elsifBranches (Iterable[ElsifGenerateBranch])
elseBranch (ElseGenerateBranch)
- __init__(generateNode, label, ifBranch, elsifBranches=None, elseBranch=None)[source]
Initializes an if-generate statement.
- Parameters:
label (
str) – The label of a model entity.ifBranch (
IfGenerateBranch) – The mandatoryifbranch.elsifBranches (
Iterable[ElsifGenerateBranch]) – List of allelsifbranches, in the order they were written.elseBranch (
ElseGenerateBranch) – The optionalelsebranch, orNoneif none was given.allowBlackbox – Allow blackboxes for components in language entity.
parent – The parent model entity of this entity.
generateNode (Iir)
- Return type:
None
- 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 ElseBranch: ElseGenerateBranch | None
Read-only property to access the else branch (
_elseBranch).- Returns:
The else branch, or
Noneif not set.
- property ElsifBranches: List[ElsifGenerateBranch]
Read-only property to access the elsif branches (
_elsifBranches).- Returns:
List of elsif branches.
- 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 IfBranch: IfGenerateBranch
Read-only property to access the if branch (
_ifBranch).- Returns:
The if branch.
- property Label: str | None
Read-only property to access the model entity’s label (
_label).- Returns:
Label of a model entity.
- property NormalizedLabel: str | None
Read-only property to access the model entity’s normalized label (
_normalizedLabel).- Returns:
Normalized label 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 Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
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.
- _elseBranch: ElseGenerateBranch | None
The optional
elsebranch, orNoneif none was given.
- _elsifBranches: List[ElsifGenerateBranch]
List of all
elsifbranches, in the order they were written.
- _ifBranch: IfGenerateBranch
The mandatory
ifbranch.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Concurrent.IndexedGenerateChoice(node, expression)[source]
Inheritance
- Parameters:
node (Iir)
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- __init__(node, expression)[source]
Initializes a case-generate choice given by a single value.
- Parameters:
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression this choice selects on.
parent – The parent model entity of this entity.
node (Iir)
- Return type:
None
- property Expression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
Read-only property to access the expression (
_expression).- Returns:
The expression.
- 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 0x7c526738b7d0>
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.
- __str__()[source]
Formats the indexed case-generate choice.
Format:
0- Return type:
- Returns:
Formatted indexed case-generate choice.
- _expression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
The expression this choice selects on.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Concurrent.RangedGenerateChoice(node, rng)[source]
Inheritance
- 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 0x7c526738b7d0>
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.
- __str__()[source]
Formats the ranged case-generate choice.
Format:
0 to 3- Return type:
- Returns:
Formatted ranged case-generate choice.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Concurrent.GenerateCase(node, choices, declaredItems=None, statements=None, alternativeLabel=None)[source]
Inheritance
- Parameters:
node (Iir)
choices (Iterable[ConcurrentChoice])
declaredItems (Iterable)
statements (Iterable[ConcurrentStatement])
alternativeLabel (str)
- __init__(node, choices, declaredItems=None, statements=None, alternativeLabel=None)[source]
Initializes a generate case.
- Parameters:
choices (
Iterable[ConcurrentChoice]) – List of all choices selecting this alternative.declaredItems (
Iterable) – List of all declared items in this concurrent declaration region.statements (
Iterable[ConcurrentStatement]) – List of all concurrent statements in this construct.alternativeLabel (
str) – The alternative’s label.allowBlackbox – Allow blackboxes for components in language entity.
parent – The parent model entity of this entity.
node (Iir)
- Return type:
None
- 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 Choices: List[BaseChoice]
Read-only property to access the choices (
_choices).- Returns:
List of choices.
- 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 DeclaredItems: List
Read-only property to access the declared items (
_declaredItems).- Returns:
List of declared items.
- 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.
- 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 Label: str | None
Read-only property to access the model entity’s label (
_label).- Returns:
Label of a model entity.
- property NormalizedLabel: str | None
Read-only property to access the model entity’s normalized label (
_normalizedLabel).- Returns:
Normalized label 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 Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
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.
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:
- __str__()[source]
Formats the case-generate alternative.
Format:
when 0 | 1 =>- Return type:
- Returns:
Formatted case-generate alternative.
- _allowBlackbox
Allow blackboxes for components in language entity.
- _choices
List of all choices selecting this alternative.
- _components
Dictionary of all components declared in this concurrent declaration region.
- _constants
Dictionary of all constants declared in this concurrent declaration region.
- _declaredItems
List of all declared items in this concurrent declaration region.
- _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.
- _instantiations
All instantiations, indexed by label.
- _label
The label of a model entity.
- _namespace
The namespace of this alternative’s declarative region.
- _normalizedLabel
The normalized (lower case) label of a model entity.
- _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.
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.Concurrent.OthersGenerateCase(caseNode, declaredItems=None, statements=None, alternativeLabel=None)[source]
Inheritance
- Parameters:
caseNode (Iir)
declaredItems (Iterable)
statements (Iterable[ConcurrentStatement])
alternativeLabel (str)
- __init__(caseNode, declaredItems=None, statements=None, alternativeLabel=None)[source]
Initializes a concurrent case.
- Parameters:
declaredItems (
Iterable) – List of all declared items in this concurrent declaration region.statements (
Iterable[ConcurrentStatement]) – List of all concurrent statements in this construct.alternativeLabel (
str) – The alternative’s label.choices – List of all choices selecting this alternative.
allowBlackbox – Allow blackboxes for components in language entity.
parent – The parent model entity of this entity.
caseNode (Iir)
- Return type:
None
- 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 Choices: List[BaseChoice]
Read-only property to access the choices (
_choices).- Returns:
List of choices.
- 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 DeclaredItems: List
Read-only property to access the declared items (
_declaredItems).- Returns:
List of declared items.
- 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.
- 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 Label: str | None
Read-only property to access the model entity’s label (
_label).- Returns:
Label of a model entity.
- property NormalizedLabel: str | None
Read-only property to access the model entity’s normalized label (
_normalizedLabel).- Returns:
Normalized label 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 Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
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.
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:
- __str__()[source]
Formats the
otherscase-generate alternative.Format:
when others =>- Return type:
- Returns:
Formatted
otherscase-generate alternative.
- _allowBlackbox
Allow blackboxes for components in language entity.
- _choices
List of all choices selecting this alternative.
- _components
Dictionary of all components declared in this concurrent declaration region.
- _constants
Dictionary of all constants declared in this concurrent declaration region.
- _declaredItems
List of all declared items in this concurrent declaration region.
- _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.
- _instantiations
All instantiations, indexed by label.
- _label
The label of a model entity.
- _namespace
The namespace of this alternative’s declarative region.
- _normalizedLabel
The normalized (lower case) label of a model entity.
- _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.
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.Concurrent.CaseGenerateStatement(generateNode, label, expression, cases)[source]
Inheritance
- Parameters:
generateNode (Iir)
label (str)
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
cases (Iterable[ConcurrentCase])
- __init__(generateNode, label, expression, cases)[source]
Initializes a case-generate statement.
- Parameters:
label (
str) – The label of a model entity.expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression being tested; it must be static.
cases (
Iterable[ConcurrentCase]) – List of all alternatives, in the order they were written.allowBlackbox – Allow blackboxes for components in language entity.
parent – The parent model entity of this entity.
generateNode (Iir)
- Return type:
None
- 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 Cases: List[GenerateCase]
Read-only property to access the cases (
_cases).- Returns:
List of cases.
- 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 Label: str | None
Read-only property to access the model entity’s label (
_label).- Returns:
Label of a model entity.
- property NormalizedLabel: str | None
Read-only property to access the model entity’s normalized label (
_normalizedLabel).- Returns:
Normalized label 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 Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
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 SelectExpression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
Read-only property to access the select expression (
_expression).- Returns:
The select expression.
- _cases: List[GenerateCase]
List of all alternatives, in the order they were written.
- _expression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
The expression being tested; it must be static.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Concurrent.ForGenerateStatement(generateNode, label, loopIndex, rng, declaredItems=None, statements=None, parent=None)[source]
Inheritance
- Parameters:
generateNode (Iir)
label (str)
loopIndex (str)
rng (Range)
declaredItems (Iterable)
statements (Iterable[ConcurrentStatement])
parent (ModelEntity | None)
- __init__(generateNode, label, loopIndex, rng, declaredItems=None, statements=None, parent=None)[source]
Initializes a for-generate statement.
- Parameters:
label (
str) – The label of a model entity.loopIndex (
str) – The name of the generate loop’s index.rng (
Range) – The range the generate loop iterates over.declaredItems (
Iterable) – List of all declared items in this concurrent declaration region.statements (
Iterable[ConcurrentStatement]) – List of all concurrent statements in this construct.allowBlackbox – Allow blackboxes for components in language entity.
parent (
ModelEntity|None) – The parent model entity of this entity.generateNode (Iir)
- Return type:
None
- 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 DeclaredItems: List
Read-only property to access the declared items (
_declaredItems).- Returns:
List of declared items.
- 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.
- 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 Label: str | None
Read-only property to access the model entity’s label (
_label).- Returns:
Label of a model entity.
- property LoopIndex: str
Read-only property to access the loop index (
_loopIndex).- Returns:
The loop index.
- property NormalizedLabel: str | None
Read-only property to access the model entity’s normalized label (
_normalizedLabel).- Returns:
Normalized label 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 Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
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 Range: <pyTooling.Decorators.readonly object at 0x7c5266adf7d0>
Read-only property to access the range (
_range).- Returns:
The range.
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:
- _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.
- _declaredItems
List of all declared items in this concurrent declaration region.
- _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.
- _instantiations
All instantiations, indexed by label.
- _label
The label of a model entity.
- _loopIndex
The name of the generate loop’s index.
- _namespace
The namespace of the generate loop’s declarative region.
- _normalizedLabel
The normalized (lower case) label of a model entity.
- _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.
- _range
The range the generate loop iterates over.
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.Concurrent.WaveformElement(waveNode, expression, after)[source]
Inheritance
- Parameters:
waveNode (Iir)
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
after (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- __init__(waveNode, expression, after)[source]
Initializes a waveform element.
- Parameters:
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The value this waveform element assigns.
after (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The delay after which the value is assigned, or
Noneif none was given.parent – The parent model entity of this entity.
waveNode (Iir)
- Return type:
None
- property After: <pyTooling.Decorators.readonly object at 0x7c5266cb99d0>
Read-only property to access the waveform element’s delay (
_after).- Returns:
The after.
- property Expression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
Read-only property to access the expression (
_expression).- Returns:
The expression.
- 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 0x7c526738b7d0>
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.
- _after
The delay after which the value is assigned, or
Noneif none was given.
- _expression
The value this waveform element assigns.
- _parent
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Concurrent.ConditionalWaveform(node, waveform, condition=None)[source]
Inheritance
- Parameters:
node (Iir)
waveform (Iterable[WaveformElement])
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- __init__(node, waveform, condition=None)[source]
Initializes a conditional waveform.
- Parameters:
waveform (
Iterable[WaveformElement]) – List of all waveform elements, in the order they were written.condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The condition selecting this alternative.
parent – The parent model entity of this entity.
node (Iir)
- Return type:
None
- property Condition: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
Read-only property to access the condition of a statement (
_condition).- Returns:
The expression representing the condition of a statement.
- 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 0x7c526738b7d0>
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 Waveform: List[WaveformElement]
Read-only property to access the waveform (
_waveform).- Returns:
List of waveform.
- _condition
The condition guarding this statement.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _waveform
List of all waveform elements, in the order they were written.
- class pyGHDL.dom.Concurrent.SelectedWaveform(node, choices, waveform)[source]
Inheritance
- Parameters:
node (Iir)
choices (Iterable)
waveform (Iterable[WaveformElement])
- __init__(node, choices, waveform)[source]
Initializes a selected waveform.
- Parameters:
choices (
Iterable) – List of all choices selecting this alternative.waveform (
Iterable[WaveformElement]) – List of all waveform elements, in the order they were written.parent – The parent model entity of this entity.
node (Iir)
- Return type:
None
- property Choices: List[BaseChoice]
Read-only property to access the choices (
_choices).- Returns:
List of choices.
- 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 0x7c526738b7d0>
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 Waveform: List[WaveformElement]
Read-only property to access the waveform (
_waveform).- Returns:
List of waveform.
- _choices: List[BaseChoice]
List of all choices selecting this alternative.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _waveform: List[WaveformElement]
List of all waveform elements, in the order they were written.
- class pyGHDL.dom.Concurrent.OthersSelectedWaveform(node, waveform)[source]
Inheritance
- Parameters:
node (Iir)
waveform (Iterable[WaveformElement])
- __init__(node, waveform)[source]
Initializes an others selected waveform.
- Parameters:
waveform (
Iterable[WaveformElement]) – List of all waveform elements, in the order they were written.parent – The parent model entity of this entity.
node (Iir)
- Return type:
None
- 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 0x7c526738b7d0>
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 Waveform: List[WaveformElement]
Read-only property to access the waveform (
_waveform).- Returns:
List of waveform.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _waveform: List[WaveformElement]
List of all waveform elements, in the order they were written.
- class pyGHDL.dom.Concurrent.ConcurrentSimpleSignalAssignment(assignmentNode, label, target, waveform)[source]
Inheritance
- Parameters:
assignmentNode (Iir)
label (str)
target (SignalSymbol)
waveform (Iterable[WaveformElement])
- __init__(assignmentNode, label, target, waveform)[source]
Initializes a simple concurrent signal assignment.
- Parameters:
label (
str) – The label of a model entity.target (
SignalSymbol) – Reference to the assignment’s destination.waveform (
Iterable[WaveformElement]) – List of all waveform elements, in the order they were written.parent – The parent model entity of this entity.
assignmentNode (Iir)
- Return type:
None
- 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 Label: str | None
Read-only property to access the model entity’s label (
_label).- Returns:
Label of a model entity.
- property NormalizedLabel: str | None
Read-only property to access the model entity’s normalized label (
_normalizedLabel).- Returns:
Normalized label 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 Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
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 Target: SignalSymbol
Read-only property to access the target (
_target).- Returns:
The target.
- property Waveform: List[WaveformElement]
Read-only property to access the waveform (
_waveform).- Returns:
List of waveform.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _waveform: List[WaveformElement]
List of all waveform elements, in the order they were written.
- class pyGHDL.dom.Concurrent.ConcurrentConditionalSignalAssignment(assignmentNode, label, target, conditionalWaveforms)[source]
Inheritance
- Parameters:
assignmentNode (Iir)
label (str)
target (SignalSymbol)
conditionalWaveforms (Iterable[ConditionalWaveform])
- __init__(assignmentNode, label, target, conditionalWaveforms)[source]
Initializes a conditional concurrent signal assignment.
- Parameters:
label (
str) – The label of a model entity.target (
SignalSymbol) – Reference to the assignment’s destination.conditionalWaveforms (
Iterable[ConditionalWaveform]) – All alternatives, in order.parent – The parent model entity of this entity.
assignmentNode (Iir)
- Return type:
None
- property ConditionalWaveforms: List[ConditionalWaveform]
Read-only property to access the conditional waveforms (
_conditionalWaveforms).- Returns:
List of conditional waveforms.
- 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 Label: str | None
Read-only property to access the model entity’s label (
_label).- Returns:
Label of a model entity.
- property NormalizedLabel: str | None
Read-only property to access the model entity’s normalized label (
_normalizedLabel).- Returns:
Normalized label 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 Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
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 Target: SignalSymbol
Read-only property to access the target (
_target).- Returns:
The target.
- _conditionalWaveforms: List[ConditionalWaveform]
All alternatives, in order.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Concurrent.ConcurrentSelectedSignalAssignment(assignmentNode, label, target, expression, selectedWaveforms)[source]
Inheritance
- Parameters:
assignmentNode (Iir)
label (str)
target (SignalSymbol)
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
selectedWaveforms (Iterable)
- __init__(assignmentNode, label, target, expression, selectedWaveforms)[source]
Initializes a selected concurrent signal assignment.
- Parameters:
label (
str) – The label of a model entity.target (
SignalSymbol) – Reference to the assignment’s destination.expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The selector expression.
selectedWaveforms (
Iterable) – All alternatives, in order.parent – The parent model entity of this entity.
assignmentNode (Iir)
- Return type:
None
- property Expression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
Read-only property to access the expression (
_expression).- Returns:
The expression.
- 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 Label: str | None
Read-only property to access the model entity’s label (
_label).- Returns:
Label of a model entity.
- property NormalizedLabel: str | None
Read-only property to access the model entity’s normalized label (
_normalizedLabel).- Returns:
Normalized label 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 Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
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 SelectedWaveforms: List[SelectedWaveform | OthersSelectedWaveform]
Read-only property to access the selected waveforms (
_selectedWaveforms).- Returns:
List of selected waveforms.
- property Target: SignalSymbol
Read-only property to access the target (
_target).- Returns:
The target.
- _expression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
The expression held by this construct.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _selectedWaveforms: List[SelectedWaveform | OthersSelectedWaveform]
All alternatives, in order.
- class pyGHDL.dom.Concurrent.ConcurrentProcedureCall(callNode, label, procedureName, parameterAssociationItems)[source]
Inheritance
- __init__(callNode, label, procedureName, parameterAssociationItems)[source]
Initializes a concurrent procedure call.
- 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 Label: str | None
Read-only property to access the model entity’s label (
_label).- Returns:
Label of a model entity.
- property NormalizedLabel: str | None
Read-only property to access the model entity’s normalized label (
_normalizedLabel).- Returns:
Normalized label of a model entity.
- property ParameterAssociationItems: List[ParameterAssociationItem]
Read-only property to access the parameter association items (
_parameterAssociationItems).- Returns:
List of parameter association items.
- 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 0x7c526738b7d0>
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 Procedure: Symbol
Read-only property to access the procedure (
_procedure).- Returns:
The procedure.
- _parameterAssociationItems: List[ParameterAssociationItem]
List of all parameter associations of the call.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Concurrent.ConcurrentAssertStatement(assertNode, condition, message=None, severity=None, label=None)[source]
Inheritance
- Parameters:
assertNode (Iir)
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
message (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
severity (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
label (str)
- __init__(assertNode, condition, message=None, severity=None, label=None)[source]
Initializes a concurrent assertion statement.
- Parameters:
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The condition guarding this statement.
message (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The reported message, or
Noneif none was given.severity (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The reported severity level, or
Noneif none was given.label (
str) – The label of a model entity.parent – The parent model entity of this entity.
assertNode (Iir)
- Return type:
None
- property Condition: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
Read-only property to access the condition of a statement (
_condition).- Returns:
The expression representing the condition of a statement.
- 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 Label: str | None
Read-only property to access the model entity’s label (
_label).- Returns:
Label of a model entity.
- property Message: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal | None
Read-only property to access the message (
_message).- Returns:
The message, or
Noneif not set.
- property NormalizedLabel: str | None
Read-only property to access the model entity’s normalized label (
_normalizedLabel).- Returns:
Normalized label 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 Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
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 Severity: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal | None
Read-only property to access the severity (
_severity).- Returns:
The severity, or
Noneif not set.
- _condition
The condition guarding this statement.
- _label
The label of a model entity.
- _message
The reported message, or
Noneif none was given.
- _normalizedLabel
The normalized (lower case) label of a model entity.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _severity
The reported severity level, or
Noneif none was given.