pyGHDL.dom.InterfaceItem
Classes
GenericConstantInterfaceItem: Represents a constant in a generic clause.GenericTypeInterfaceItem: Represents a type in a generic clause.GenericPackageInterfaceItem: Represents a package in a generic clause.GenericProcedureInterfaceItem: Represents a procedure in a generic clause.GenericFunctionInterfaceItem: Represents a function in a generic clause.PortSimpleSignalInterfaceItem: Represents a port declared with a simple mode.PortViewSignalInterfaceItem: .. admonition:: ExampleParameterConstantInterfaceItem: Represents a constant parameter of a subprogram.ParameterVariableInterfaceItem: Represents a variable parameter of a subprogram.ParameterSimpleSignalInterfaceItem: Represents a signal parameter declared with a simple mode.ParameterViewSignalInterfaceItem: .. admonition:: ExampleParameterFileInterfaceItem: Represents a file parameter of a subprogram.SimpleModeViewElement: .. admonition:: ExampleCompositeModeViewElement: .. admonition:: ExampleModeViewDeclaration: .. admonition:: Example
Classes
- class pyGHDL.dom.InterfaceItem.GenericConstantInterfaceItem(node, identifiers, mode, subtype, defaultExpression, documentation=None)[source]
Inheritance
- Parameters:
node (Iir)
mode (Mode)
subtype (Symbol)
defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
documentation (str)
- __init__(node, identifiers, mode, subtype, defaultExpression, documentation=None)[source]
Initializes a constant in a generic clause.
- Parameters:
mode (
Mode) – The interface item’s mode.subtype (
Symbol) – Reference to the object’s subtype.defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The default value, or
Noneif none was given.documentation (
str) – The documentation comment associated with this declaration.parent – The parent model entity of this entity.
node (Iir)
- Return type:
None
- property DefaultExpression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal | None
Read-only property to access the default expression (
_defaultExpression).- Returns:
The default expression, or
Noneif not set.
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifiers: Tuple[str]
Read-only property to access the model entity’s identifiers (
_identifiers).- Returns:
Tuple of identifiers.
- property Mode: <pyTooling.Decorators.readonly object at 0x7c5266ab62d0>
Read-only property to access the mode (
_mode).- Returns:
The mode.
- property NormalizedIdentifiers: Tuple[str]
Read-only property to access the model entity’s normalized identifiers (
_normalizedIdentifiers).- Returns:
Tuple of normalized identifiers.
- property ObjectVertex: Vertex | None
Read-only property to access the corresponding object vertex (
_objectVertex).The object vertex references this Object by its value field.
- Returns:
The corresponding object vertex.
- 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 Subtype: Symbol
Read-only property to access the subtype (
_subtype).- Returns:
The subtype.
- _FormatInterfaceItem(mode=None, isModeView=False)
Format this interface item as a single-line declaration.
Interface items are objects, so they render like one (
signal p : bit), but an object’s own rendering cannot show the interface mode - a mode is not part of an object declaration. This adds it, for the derived class’s__str__()to return.
- __annotate_func__()
The type of the None singleton.
- __str__()[source]
Formats the generic constant.
Format:
constant G : in positive- Return type:
- Returns:
Formatted generic constant.
- _defaultExpression
The default value, or
Noneif none was given.
- _documentation
The associated documentation of a model entity.
- _identifiers
A list of identifiers.
- _mode
The interface item’s mode.
- _normalizedIdentifiers
A list of normalized (lower case) identifiers.
- _objectKeyword = 'constant'
The VHDL keyword introducing this object class.
- _objectVertex
The vertex representing this object in the design’s object graph.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _subtype
Reference to the object’s subtype.
- class pyGHDL.dom.InterfaceItem.GenericTypeInterfaceItem(node, identifier, documentation=None)[source]
Inheritance
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifier: str
Read-only property to access the model entity’s identifier (
_identifier).- Returns:
Name of a model entity.
- property NormalizedIdentifier: str
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- Returns:
Normalized name of a model entity.
- property Parent: ModelEntity
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property 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.
- _FormatInterfaceItem(mode=None, isModeView=False)
Format this interface item as a single-line declaration.
Interface items are objects, so they render like one (
signal p : bit), but an object’s own rendering cannot show the interface mode - a mode is not part of an object declaration. This adds it, for the derived class’s__str__()to return.
- __str__()
Formats the type declaration.
Format:
type myType- Return type:
- Returns:
Formatted type declaration.
- _objectVertex: Vertex
The vertex representing this type in the design’s object graph.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.InterfaceItem.GenericPackageInterfaceItem(node, name, documentation=None)[source]
Inheritance
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifier: str
Read-only property to access the model entity’s identifier (
_identifier).- Returns:
Name of a model entity.
- property NormalizedIdentifier: str
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- Returns:
Normalized name of a model entity.
- property Parent: ModelEntity
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property 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.
- _FormatInterfaceItem(mode=None, isModeView=False)
Format this interface item as a single-line declaration.
Interface items are objects, so they render like one (
signal p : bit), but an object’s own rendering cannot show the interface mode - a mode is not part of an object declaration. This adds it, for the derived class’s__str__()to return.
- __str__()
Formats the interface package.
Format:
package myPackage- Return type:
- Returns:
Formatted interface package.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.InterfaceItem.GenericProcedureInterfaceItem(node, identifier, documentation=None)[source]
Inheritance
- __init__(node, identifier, documentation=None)[source]
Initializes a procedure in a generic clause.
- 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.
- property GenericItems: List[GenericInterfaceItemMixin]
Read-only property to access the generic items (
_genericItems).- Returns:
List of generic items.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifier: str
Read-only property to access the model entity’s identifier (
_identifier).- Returns:
Name of a model entity.
- IndexDeclaredItems()
A subprogram’s generics and parameters share the declarative region of its declarative part.
- Return type:
- property IsPure: bool
Check if the subprogram is pure (
_isPure).- Returns:
True, if the subprogram is pure.
- property Namespace: <pyTooling.Decorators.readonly object at 0x7c5266bcf650>
Read-only property to access this region’s namespace (
_namespace).- Returns:
The namespace.
- property NormalizedIdentifier: str
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- Returns:
Normalized name of a model entity.
- property ParameterItems: List[ParameterInterfaceItemMixin]
Read-only property to access the parameter items (
_parameterItems).- Returns:
List of parameter 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 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 Statements: List[SequentialStatement]
Read-only property to access the statements (
_statements).- Returns:
List of 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.
- _FormatInterfaceItem(mode=None, isModeView=False)
Format this interface item as a single-line declaration.
Interface items are objects, so they render like one (
signal p : bit), but an object’s own rendering cannot show the interface mode - a mode is not part of an object declaration. This adds it, for the derived class’s__str__()to return.
- _IndexOtherDeclaredItem(item)
Hook for declared items the region doesn’t handle itself. Derived classes may override it.
- Return type:
- __annotate_func__()
The type of the None singleton.
- __str__()
Formats the subprogram declaration.
Format:
procedure myProcedure(a, b)- Return type:
- Returns:
Formatted subprogram declaration.
- _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.
- _genericItems
List of all generics, in declaration order.
- _identifier
The identifier of a model entity.
- _isPure
Trueif the subprogram was declared pure.
- _namespace
The namespace of this sequential declaration region.
- _normalizedIdentifier
The normalized (lower case) identifier of a model entity.
- _parameterItems
List of all parameters, in declaration order.
- _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.
- _statements
List of all sequential statements in the subprogram’s body.
- _subprogramKeyword = 'procedure'
The VHDL keyword introducing this subprogram kind.
- _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.InterfaceItem.GenericFunctionInterfaceItem(node, identifier, returnType, documentation=None)[source]
Inheritance
- __init__(node, identifier, returnType, documentation=None)[source]
Initializes a function in a generic clause.
- Parameters:
- 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.
- property GenericItems: List[GenericInterfaceItemMixin]
Read-only property to access the generic items (
_genericItems).- Returns:
List of generic items.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifier: str
Read-only property to access the model entity’s identifier (
_identifier).- Returns:
Name of a model entity.
- IndexDeclaredItems()
A subprogram’s generics and parameters share the declarative region of its declarative part.
- Return type:
- property IsPure: bool
Check if the subprogram is pure (
_isPure).- Returns:
True, if the subprogram is pure.
- property Namespace: <pyTooling.Decorators.readonly object at 0x7c5266bcf650>
Read-only property to access this region’s namespace (
_namespace).- Returns:
The namespace.
- property NormalizedIdentifier: str
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- Returns:
Normalized name of a model entity.
- property ParameterItems: List[ParameterInterfaceItemMixin]
Read-only property to access the parameter items (
_parameterItems).- Returns:
List of parameter 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 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 ReturnType: SubtypeSymbol
Read-only property to access the return type (
_returnType).- Returns:
The return type.
- property Statements: List[SequentialStatement]
Read-only property to access the statements (
_statements).- Returns:
List of 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.
- _FormatInterfaceItem(mode=None, isModeView=False)
Format this interface item as a single-line declaration.
Interface items are objects, so they render like one (
signal p : bit), but an object’s own rendering cannot show the interface mode - a mode is not part of an object declaration. This adds it, for the derived class’s__str__()to return.
- _IndexOtherDeclaredItem(item)
Hook for declared items the region doesn’t handle itself. Derived classes may override it.
- Return type:
- __str__()
Formats the subprogram declaration.
Format:
procedure myProcedure(a, b)- Return type:
- Returns:
Formatted subprogram declaration.
- _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.
- _genericItems
List of all generics, in declaration order.
- _identifier
The identifier of a model entity.
- _isPure
Trueif the subprogram was declared pure.
- _namespace
The namespace of this sequential declaration region.
- _normalizedIdentifier
The normalized (lower case) identifier of a model entity.
- _parameterItems
List of all parameters, in declaration order.
- _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.
- _returnType
Reference to the subtype of the function’s return value.
- _statements
List of all sequential statements in the subprogram’s body.
- _subprogramKeyword = 'function'
The VHDL keyword introducing this subprogram kind.
- _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.InterfaceItem.PortSimpleSignalInterfaceItem(node, identifiers, mode, subtype, defaultExpression=None, documentation=None)[source]
Inheritance
- Parameters:
node (Iir)
mode (Mode)
subtype (Symbol)
defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
documentation (str)
- __init__(node, identifiers, mode, subtype, defaultExpression=None, documentation=None)[source]
Initializes a port declared with a simple mode.
- Parameters:
mode (
Mode) – The interface item’s mode.subtype (
Symbol) – Reference to the object’s subtype.defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The default value, or
Noneif none was given.documentation (
str) – The documentation comment associated with this declaration.parent – The parent model entity of this entity.
node (Iir)
- Return type:
None
- property DefaultExpression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal | None
Read-only property to access the default expression (
_defaultExpression).- Returns:
The default expression, or
Noneif not set.
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifiers: Tuple[str]
Read-only property to access the model entity’s identifiers (
_identifiers).- Returns:
Tuple of identifiers.
- property Mode: <pyTooling.Decorators.readonly object at 0x7c5266ab62d0>
Read-only property to access the mode (
_mode).- Returns:
The mode.
- property NormalizedIdentifiers: Tuple[str]
Read-only property to access the model entity’s normalized identifiers (
_normalizedIdentifiers).- Returns:
Tuple of normalized identifiers.
- property ObjectVertex: Vertex | None
Read-only property to access the corresponding object vertex (
_objectVertex).The object vertex references this Object by its value field.
- Returns:
The corresponding object vertex.
- 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 Subtype: Symbol
Read-only property to access the subtype (
_subtype).- Returns:
The subtype.
- _FormatInterfaceItem(mode=None, isModeView=False)
Format this interface item as a single-line declaration.
Interface items are objects, so they render like one (
signal p : bit), but an object’s own rendering cannot show the interface mode - a mode is not part of an object declaration. This adds it, for the derived class’s__str__()to return.
- __str__()[source]
Formats the port.
Format:
signal p : in bit- Return type:
- Returns:
Formatted port.
- _defaultExpression
The default value, or
Noneif none was given.
- _documentation
The associated documentation of a model entity.
- _identifiers
A list of identifiers.
- _mode
The interface item’s mode.
- _normalizedIdentifiers
A list of normalized (lower case) identifiers.
- _objectKeyword = 'signal'
The VHDL keyword introducing this object class.
- _objectVertex
The vertex representing this object in the design’s object graph.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _subtype
Reference to the object’s subtype.
- class pyGHDL.dom.InterfaceItem.PortViewSignalInterfaceItem(node, identifiers, modeViewIndication, documentation=None)[source]
Example
port (p : view MyView);
Note
Get_Subtype_Indicationon anInterface_View_Declarationnode is only populated after semantic analysis has resolved the referenced mode view; since translation here is parse-only,SubtypestaysNone- the type is only implied by the referenced mode view.Inheritance
- Parameters:
node (Iir)
modeViewIndication (ModeViewSymbol)
documentation (str)
- __init__(node, identifiers, modeViewIndication, documentation=None)[source]
Initializes a port declared with a mode view (VHDL-2019).
- Parameters:
modeViewIndication (
ModeViewSymbol) – Reference to the mode view applied to this port.documentation (
str) – The documentation comment associated with this declaration.parent – The parent model entity of this entity.
node (Iir)
- Return type:
None
- property DefaultExpression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal | None
Read-only property to access the default expression (
_defaultExpression).- Returns:
The default expression, or
Noneif not set.
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifiers: Tuple[str]
Read-only property to access the model entity’s identifiers (
_identifiers).- Returns:
Tuple of identifiers.
- property ModeViewIndication: ModeViewSymbol
Read-only property to access the mode view indication (
_subtype).- Returns:
The mode view indication.
- property NormalizedIdentifiers: Tuple[str]
Read-only property to access the model entity’s normalized identifiers (
_normalizedIdentifiers).- Returns:
Tuple of normalized identifiers.
- property ObjectVertex: Vertex | None
Read-only property to access the corresponding object vertex (
_objectVertex).The object vertex references this Object by its value field.
- Returns:
The corresponding object vertex.
- 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 Subtype: Symbol
Read-only property to access the subtype (
_subtype).- Returns:
The subtype.
- _FormatInterfaceItem(mode=None, isModeView=False)
Format this interface item as a single-line declaration.
Interface items are objects, so they render like one (
signal p : bit), but an object’s own rendering cannot show the interface mode - a mode is not part of an object declaration. This adds it, for the derived class’s__str__()to return.
- __str__()[source]
Formats the port declared with a mode view.
Format:
signal p : view myView- Return type:
- Returns:
Formatted port declared with a mode view.
- _defaultExpression
The default value, or
Noneif none was given.
- _documentation
The associated documentation of a model entity.
- _identifiers
A list of identifiers.
- _normalizedIdentifiers
A list of normalized (lower case) identifiers.
- _objectKeyword = 'signal'
The VHDL keyword introducing this object class.
- _objectVertex
The vertex representing this object in the design’s object graph.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _subtype
Reference to the object’s subtype.
- class pyGHDL.dom.InterfaceItem.ParameterConstantInterfaceItem(node, identifiers, mode, subtype, defaultExpression=None, documentation=None)[source]
Inheritance
- Parameters:
node (Iir)
mode (Mode)
subtype (Symbol)
defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
documentation (str)
- __init__(node, identifiers, mode, subtype, defaultExpression=None, documentation=None)[source]
Initializes a constant parameter of a subprogram.
- Parameters:
mode (
Mode) – The interface item’s mode.subtype (
Symbol) – Reference to the object’s subtype.defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The default value, or
Noneif none was given.documentation (
str) – The documentation comment associated with this declaration.parent – The parent model entity of this entity.
node (Iir)
- Return type:
None
- property DefaultExpression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal | None
Read-only property to access the default expression (
_defaultExpression).- Returns:
The default expression, or
Noneif not set.
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifiers: Tuple[str]
Read-only property to access the model entity’s identifiers (
_identifiers).- Returns:
Tuple of identifiers.
- property Mode: <pyTooling.Decorators.readonly object at 0x7c5266ab62d0>
Read-only property to access the mode (
_mode).- Returns:
The mode.
- property NormalizedIdentifiers: Tuple[str]
Read-only property to access the model entity’s normalized identifiers (
_normalizedIdentifiers).- Returns:
Tuple of normalized identifiers.
- property ObjectVertex: Vertex | None
Read-only property to access the corresponding object vertex (
_objectVertex).The object vertex references this Object by its value field.
- Returns:
The corresponding object vertex.
- 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 Subtype: Symbol
Read-only property to access the subtype (
_subtype).- Returns:
The subtype.
- _FormatInterfaceItem(mode=None, isModeView=False)
Format this interface item as a single-line declaration.
Interface items are objects, so they render like one (
signal p : bit), but an object’s own rendering cannot show the interface mode - a mode is not part of an object declaration. This adds it, for the derived class’s__str__()to return.
- __str__()[source]
Formats the constant parameter.
Format:
constant a : in integer- Return type:
- Returns:
Formatted constant parameter.
- _defaultExpression
The default value, or
Noneif none was given.
- _documentation
The associated documentation of a model entity.
- _identifiers
A list of identifiers.
- _mode
The interface item’s mode.
- _normalizedIdentifiers
A list of normalized (lower case) identifiers.
- _objectKeyword = 'constant'
The VHDL keyword introducing this object class.
- _objectVertex
The vertex representing this object in the design’s object graph.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _subtype
Reference to the object’s subtype.
- class pyGHDL.dom.InterfaceItem.ParameterVariableInterfaceItem(node, identifiers, mode, subtype, defaultExpression=None, documentation=None)[source]
Inheritance
- Parameters:
node (Iir)
mode (Mode)
subtype (Symbol)
defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
documentation (str)
- __init__(node, identifiers, mode, subtype, defaultExpression=None, documentation=None)[source]
Initializes a variable parameter of a subprogram.
- Parameters:
mode (
Mode) – The interface item’s mode.subtype (
Symbol) – Reference to the object’s subtype.defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The default value, or
Noneif none was given.documentation (
str) – The documentation comment associated with this declaration.parent – The parent model entity of this entity.
node (Iir)
- Return type:
None
- property DefaultExpression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal | None
Read-only property to access the default expression (
_defaultExpression).- Returns:
The default expression, or
Noneif not set.
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifiers: Tuple[str]
Read-only property to access the model entity’s identifiers (
_identifiers).- Returns:
Tuple of identifiers.
- property Mode: <pyTooling.Decorators.readonly object at 0x7c5266ab62d0>
Read-only property to access the mode (
_mode).- Returns:
The mode.
- property NormalizedIdentifiers: Tuple[str]
Read-only property to access the model entity’s normalized identifiers (
_normalizedIdentifiers).- Returns:
Tuple of normalized identifiers.
- property ObjectVertex: Vertex | None
Read-only property to access the corresponding object vertex (
_objectVertex).The object vertex references this Object by its value field.
- Returns:
The corresponding object vertex.
- 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 Subtype: Symbol
Read-only property to access the subtype (
_subtype).- Returns:
The subtype.
- _FormatInterfaceItem(mode=None, isModeView=False)
Format this interface item as a single-line declaration.
Interface items are objects, so they render like one (
signal p : bit), but an object’s own rendering cannot show the interface mode - a mode is not part of an object declaration. This adds it, for the derived class’s__str__()to return.
- __str__()[source]
Formats the variable parameter.
Format:
variable v : inout integer- Return type:
- Returns:
Formatted variable parameter.
- _defaultExpression
The default value, or
Noneif none was given.
- _documentation
The associated documentation of a model entity.
- _identifiers
A list of identifiers.
- _mode
The interface item’s mode.
- _normalizedIdentifiers
A list of normalized (lower case) identifiers.
- _objectKeyword = 'variable'
The VHDL keyword introducing this object class.
- _objectVertex
The vertex representing this object in the design’s object graph.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _subtype
Reference to the object’s subtype.
- class pyGHDL.dom.InterfaceItem.ParameterSimpleSignalInterfaceItem(node, identifiers, mode, subtype, defaultExpression=None, documentation=None)[source]
Inheritance
- Parameters:
node (Iir)
mode (Mode)
subtype (Symbol)
defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
documentation (str)
- __init__(node, identifiers, mode, subtype, defaultExpression=None, documentation=None)[source]
Initializes a signal parameter declared with a simple mode.
- Parameters:
mode (
Mode) – The interface item’s mode.subtype (
Symbol) – Reference to the object’s subtype.defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The default value, or
Noneif none was given.documentation (
str) – The documentation comment associated with this declaration.parent – The parent model entity of this entity.
node (Iir)
- Return type:
None
- property DefaultExpression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal | None
Read-only property to access the default expression (
_defaultExpression).- Returns:
The default expression, or
Noneif not set.
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifiers: Tuple[str]
Read-only property to access the model entity’s identifiers (
_identifiers).- Returns:
Tuple of identifiers.
- property Mode: <pyTooling.Decorators.readonly object at 0x7c5266ab62d0>
Read-only property to access the mode (
_mode).- Returns:
The mode.
- property NormalizedIdentifiers: Tuple[str]
Read-only property to access the model entity’s normalized identifiers (
_normalizedIdentifiers).- Returns:
Tuple of normalized identifiers.
- property ObjectVertex: Vertex | None
Read-only property to access the corresponding object vertex (
_objectVertex).The object vertex references this Object by its value field.
- Returns:
The corresponding object vertex.
- 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 Subtype: Symbol
Read-only property to access the subtype (
_subtype).- Returns:
The subtype.
- _FormatInterfaceItem(mode=None, isModeView=False)
Format this interface item as a single-line declaration.
Interface items are objects, so they render like one (
signal p : bit), but an object’s own rendering cannot show the interface mode - a mode is not part of an object declaration. This adds it, for the derived class’s__str__()to return.
- __str__()[source]
Formats the signal parameter.
Format:
signal s : in bit- Return type:
- Returns:
Formatted signal parameter.
- _defaultExpression
The default value, or
Noneif none was given.
- _documentation
The associated documentation of a model entity.
- _identifiers
A list of identifiers.
- _mode
The interface item’s mode.
- _normalizedIdentifiers
A list of normalized (lower case) identifiers.
- _objectKeyword = 'signal'
The VHDL keyword introducing this object class.
- _objectVertex
The vertex representing this object in the design’s object graph.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _subtype
Reference to the object’s subtype.
- class pyGHDL.dom.InterfaceItem.ParameterViewSignalInterfaceItem(node, identifiers, modeViewIndication, documentation=None)[source]
Example
procedure proc(signal s : view MyView);
Note
See
PortViewSignalInterfaceItemfor whySubtypestaysNonehere.Inheritance
- Parameters:
node (Iir)
modeViewIndication (ModeViewSymbol)
documentation (str)
- __init__(node, identifiers, modeViewIndication, documentation=None)[source]
Initializes a signal parameter declared with a mode view (VHDL-2019).
- Parameters:
modeViewIndication (
ModeViewSymbol) – Reference to the mode view applied to this parameter.documentation (
str) – The documentation comment associated with this declaration.parent – The parent model entity of this entity.
node (Iir)
- Return type:
None
- property DefaultExpression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal | None
Read-only property to access the default expression (
_defaultExpression).- Returns:
The default expression, or
Noneif not set.
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifiers: Tuple[str]
Read-only property to access the model entity’s identifiers (
_identifiers).- Returns:
Tuple of identifiers.
- property ModeViewIndication: ModeViewSymbol
Read-only property to access the mode view indication (
_subtype).- Returns:
The mode view indication.
- property NormalizedIdentifiers: Tuple[str]
Read-only property to access the model entity’s normalized identifiers (
_normalizedIdentifiers).- Returns:
Tuple of normalized identifiers.
- property ObjectVertex: Vertex | None
Read-only property to access the corresponding object vertex (
_objectVertex).The object vertex references this Object by its value field.
- Returns:
The corresponding object vertex.
- 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 Subtype: Symbol
Read-only property to access the subtype (
_subtype).- Returns:
The subtype.
- _FormatInterfaceItem(mode=None, isModeView=False)
Format this interface item as a single-line declaration.
Interface items are objects, so they render like one (
signal p : bit), but an object’s own rendering cannot show the interface mode - a mode is not part of an object declaration. This adds it, for the derived class’s__str__()to return.
- __str__()[source]
Formats the signal parameter declared with a mode view.
Format:
signal s : view myView- Return type:
- Returns:
Formatted signal parameter declared with a mode view.
- _defaultExpression
The default value, or
Noneif none was given.
- _documentation
The associated documentation of a model entity.
- _identifiers
A list of identifiers.
- _normalizedIdentifiers
A list of normalized (lower case) identifiers.
- _objectKeyword = 'signal'
The VHDL keyword introducing this object class.
- _objectVertex
The vertex representing this object in the design’s object graph.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _subtype
Reference to the object’s subtype.
- class pyGHDL.dom.InterfaceItem.ParameterFileInterfaceItem(node, identifiers, subtype, documentation=None)[source]
Inheritance
- __init__(node, identifiers, subtype, documentation=None)[source]
Initializes a file parameter of a subprogram.
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifiers: Tuple[str]
Read-only property to access the model entity’s identifiers (
_identifiers).- Returns:
Tuple of identifiers.
- property NormalizedIdentifiers: Tuple[str]
Read-only property to access the model entity’s normalized identifiers (
_normalizedIdentifiers).- Returns:
Tuple of normalized identifiers.
- property ObjectVertex: Vertex | None
Read-only property to access the corresponding object vertex (
_objectVertex).The object vertex references this Object by its value field.
- Returns:
The corresponding object vertex.
- 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 Subtype: Symbol
Read-only property to access the subtype (
_subtype).- Returns:
The subtype.
- _FormatInterfaceItem(mode=None, isModeView=False)
Format this interface item as a single-line declaration.
Interface items are objects, so they render like one (
signal p : bit), but an object’s own rendering cannot show the interface mode - a mode is not part of an object declaration. This adds it, for the derived class’s__str__()to return.
- __str__()[source]
Formats the file parameter.
Format:
file f : text- Return type:
- Returns:
Formatted file parameter.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.InterfaceItem.SimpleModeViewElement(node, identifiers, mode, documentation=None)[source]
Example
view MyView of RecordType is a, b : out; end view;
Inheritance
- __init__(node, identifiers, mode, documentation=None)[source]
Initializes a simple mode view element.
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifiers: Tuple[str]
Read-only property to access the model entity’s identifiers (
_identifiers).- Returns:
Tuple of identifiers.
- property Mode: <pyTooling.Decorators.readonly object at 0x7c5266ab59d0>
Read-only property to access the mode (
_mode).- Returns:
The mode.
- property NormalizedIdentifiers: Tuple[str]
Read-only property to access the model entity’s normalized identifiers (
_normalizedIdentifiers).- Returns:
Tuple of normalized identifiers.
- 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 mode view element as its identifiers.
Format:
a, b- Return type:
- Returns:
The element’s identifiers, comma-separated.
- _mode: <pyTooling.Decorators.readonly object at 0x7c5266ab59d0>
The element’s mode.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.InterfaceItem.CompositeModeViewElement(node, identifiers, modeViewName, documentation=None)[source]
Example
view OuterView of OuterRecord is b : view InnerView; end view;
Inheritance
- Parameters:
node (Iir)
modeViewName (ModeViewSymbol)
documentation (str)
- __init__(node, identifiers, modeViewName, documentation=None)[source]
Initializes a composite mode view element.
- Parameters:
modeViewName (
ModeViewSymbol) – Reference to the mode view applied to this element.documentation (
str) – The documentation comment associated with this declaration.parent – The parent model entity of this entity.
node (Iir)
- Return type:
None
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifiers: Tuple[str]
Read-only property to access the model entity’s identifiers (
_identifiers).- Returns:
Tuple of identifiers.
- property ModeViewName: ModeViewSymbol
Read-only property to access the mode view name (
_modeViewName).- Returns:
The mode view name.
- property NormalizedIdentifiers: Tuple[str]
Read-only property to access the model entity’s normalized identifiers (
_normalizedIdentifiers).- Returns:
Tuple of normalized identifiers.
- 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 mode view element as its identifiers.
Format:
a, b- Return type:
- Returns:
The element’s identifiers, comma-separated.
- _modeViewName: ModeViewSymbol
Reference to the mode view applied to this element.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.InterfaceItem.ModeViewDeclaration(node, identifier, subtype, elements=None, documentation=None)[source]
Example
view MyView of RecordType is a : out; b : in; end view;
Inheritance
- __init__(node, identifier, subtype, elements=None, documentation=None)[source]
Initializes a mode view declaration (VHDL-2019).
- Parameters:
identifier (
str) – The identifier of a model entity.subtype (
Symbol) – Reference to the subtype this mode view applies to.elements (
List) – List of all mode view elements, in declaration order.documentation (
str) – The documentation comment associated with this declaration.parent – The parent model entity of this entity.
node (Iir)
- Return type:
None
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- property Elements: List[ModeViewElement]
Read-only property to access the elements (
_elements).- Returns:
List of elements.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifier: str
Read-only property to access the model entity’s identifier (
_identifier).- Returns:
Name of a model entity.
- property NormalizedIdentifier: str
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- Returns:
Normalized name of a model entity.
- property Parent: ModelEntity
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property 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 Subtype: SubtypeSymbol
Read-only property to access the subtype (
_subtype).- Returns:
The subtype.
- __str__()[source]
Formats the mode view declaration.
Format:
view myView of myRecord: a, b- Return type:
- Returns:
Formatted mode view declaration.
- _elements: List[ModeViewElement]
List of all mode view elements, in declaration order.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _subtype: SubtypeSymbol
Reference to the subtype this mode view applies to.