pyGHDL.dom.Sequential
Classes
IfBranch: Represents theifbranch of an if statement.ElsifBranch: Represents anelsifbranch of an if statement.ElseBranch: Represents theelsebranch of an if statement.IfStatement: Represents an if statement.IndexedChoice: Represents a case choice given by a single value.RangedChoice: Represents a case choice given by a range.Case: Represents one alternative of a case statement, selected by its choices.OthersCase: Represents theothersalternative of a case statement.CaseStatement: Represents a case statement.ForLoopStatement: Represents a for-loop statement.WhileLoopStatement: Represents a while-loop statement.SequentialSimpleSignalAssignment: Represents a simple sequential signal assignment.ConditionalExpression: Represents one branch of a conditional variable assignment.SelectedExpression: Represents one alternative of a selected variable assignment.OthersSelectedExpression: Represents theothersalternative of a selected variable assignment.SequentialVariableAssignment: Represents a simple sequential variable assignment.SequentialConditionalVariableAssignment: Represents a conditional sequential variable assignment.SequentialConditionalSignalAssignment: Represents a conditional sequential signal assignment.SequentialSelectedVariableAssignment: Represents a selected sequential variable assignment.SequentialSelectedSignalAssignment: Represents a selected sequential signal assignment.SignalForceAssignment: Represents a signal force assignment.SignalReleaseAssignment: Represents a signal release assignment.SequentialProcedureCall: Represents a procedure call as a sequential statement.SequentialAssertStatement: Represents a sequential assertion statement.SequentialReportStatement: Represents a sequential report statement.ReturnStatement: Represents a return statement.NullStatement: Represents a null statement.NextStatement: Represents a next statement.ExitStatement: Represents an exit statement.WaitStatement: Represents a wait statement.
Classes
- class pyGHDL.dom.Sequential.IfBranch(branchNode, condition, statements=None)[source]
Inheritance
- Parameters:
branchNode (Iir)
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
statements (Iterable[SequentialStatement])
- __init__(branchNode, condition, statements=None)[source]
Initializes an if branch.
- Parameters:
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The condition guarding this statement.
statements (
Iterable[SequentialStatement]) – List of all sequential statements in this construct.parent – The parent model entity of this entity.
branchNode (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 Statements: List[SequentialStatement]
Read-only property to access the list of sequential statements (
_statements).- Returns:
A list of sequential statements.
- _condition
The condition guarding this statement.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _statements
List of all sequential statements in this construct.
- class pyGHDL.dom.Sequential.ElsifBranch(branchNode, condition, statements=None)[source]
Inheritance
- Parameters:
branchNode (Iir)
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
statements (Iterable[SequentialStatement])
- __init__(branchNode, condition, statements=None)[source]
Initializes an
elsifbranch of an if statement.- Parameters:
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The condition guarding this statement.
statements (
Iterable[SequentialStatement]) – List of all sequential statements in this construct.parent – The parent model entity of this entity.
branchNode (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 Statements: List[SequentialStatement]
Read-only property to access the list of sequential statements (
_statements).- Returns:
A list of sequential statements.
- _condition
The condition guarding this statement.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _statements
List of all sequential statements in this construct.
- class pyGHDL.dom.Sequential.ElseBranch(branchNode, statements=None)[source]
Inheritance
- Parameters:
branchNode (Iir)
statements (Iterable[SequentialStatement])
- __init__(branchNode, statements=None)[source]
Initializes an else branch.
- Parameters:
statements (
Iterable[SequentialStatement]) – List of all sequential statements in this construct.parent – The parent model entity of this entity.
branchNode (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 Statements: List[SequentialStatement]
Read-only property to access the list of sequential statements (
_statements).- Returns:
A list of sequential statements.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _statements: List[SequentialStatement]
List of all sequential statements in this construct.
- class pyGHDL.dom.Sequential.IfStatement(ifNode, ifBranch, elsifBranches=None, elseBranch=None, label=None)[source]
Inheritance
- Parameters:
ifNode (Iir)
ifBranch (IfBranch)
elsifBranches (Iterable[ElsifBranch])
elseBranch (ElseBranch)
label (str)
- __init__(ifNode, ifBranch, elsifBranches=None, elseBranch=None, label=None)[source]
Initializes an if statement.
- Parameters:
ifBranch (
IfBranch) – The mandatoryifbranch.elsifBranches (
Iterable[ElsifBranch]) – List of allelsifbranches, in the order they were written.elseBranch (
ElseBranch) – The optionalelsebranch, orNoneif none was given.label (
str) – The label of a model entity.parent – The parent model entity of this entity.
ifNode (Iir)
- Return type:
None
- property ElsIfBranches: List[ElsifBranch]
Read-only property to access the elsif-branch of the if-statement (
_elsifBranch).- Returns:
The elsif-branch.
- property ElseBranch: <pyTooling.Decorators.readonly object at 0x7c5266a66f50> | None
Read-only property to access the else-branch of the if-statement (
_elseBranch).- Returns:
The else-branch.
- 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: <pyTooling.Decorators.readonly object at 0x7c5266a66e50>
Read-only property to access the if-branch of the if-statement (
_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: <pyTooling.Decorators.readonly object at 0x7c5266a66f50> | None
The optional
elsebranch, orNoneif none was given.
- _elsifBranches: List[ElsifBranch]
List of all
elsifbranches, in the order they were written.
- _ifBranch: <pyTooling.Decorators.readonly object at 0x7c5266a66e50>
The mandatory
ifbranch.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Sequential.IndexedChoice(node, expression)[source]
Inheritance
- Parameters:
node (Iir)
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- __init__(node, expression)[source]
Initializes a case 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 choice.
Format:
0- Return type:
- Returns:
Formatted indexed case choice.
- _expression
The expression this choice selects on.
- _parent
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Sequential.RangedChoice(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 choice.
Format:
0 to 3- Return type:
- Returns:
Formatted ranged case choice.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Sequential.Case(node, choices, statements=None)[source]
Inheritance
- Parameters:
node (Iir)
choices (Iterable[SequentialChoice])
statements (Iterable[SequentialStatement])
- __init__(node, choices, statements=None)[source]
Initializes a case.
- Parameters:
choices (
Iterable[SequentialChoice]) – List of all choices selecting this alternative.statements (
Iterable[SequentialStatement]) – List of all sequential statements in this construct.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 Statements: List[SequentialStatement]
Read-only property to access the list of sequential statements (
_statements).- Returns:
A list of sequential statements.
- __str__()[source]
Formats the case alternative.
Format:
when 0 | 1 =>- Return type:
- Returns:
Formatted case alternative.
- _choices: List[BaseChoice]
List of all choices selecting this alternative.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _statements: List[SequentialStatement]
List of all sequential statements in this construct.
- class pyGHDL.dom.Sequential.OthersCase(caseNode, statements=None)[source]
Inheritance
- Parameters:
caseNode (Iir)
statements (Iterable[SequentialStatement])
- __init__(caseNode, statements=None)[source]
Initializes a sequential case.
- Parameters:
statements (
Iterable[SequentialStatement]) – List of all sequential statements in this construct.choices – List of all choices selecting this alternative.
parent – The parent model entity of this entity.
caseNode (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 Statements: List[SequentialStatement]
Read-only property to access the list of sequential statements (
_statements).- Returns:
A list of sequential statements.
- __str__()[source]
Formats the
otherscase alternative.Format:
when others =>- Return type:
- Returns:
Formatted
otherscase alternative.
- _choices: List[BaseChoice]
List of all choices selecting this alternative.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _statements: List[SequentialStatement]
List of all sequential statements in this construct.
- class pyGHDL.dom.Sequential.CaseStatement(caseNode, label, expression, cases)[source]
Inheritance
- Parameters:
caseNode (Iir)
label (str)
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
cases (Iterable[SequentialCase])
- __init__(caseNode, label, expression, cases)[source]
Initializes a case statement.
- Parameters:
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression being tested.
cases (
Iterable[SequentialCase]) – List of all alternatives, in the order they were written.label (
str) – The label of a model entity.parent – The parent model entity of this entity.
caseNode (Iir)
- Return type:
None
- property Cases: List[SequentialCase]
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 of all alternatives, in the order they were written.
- _expression
The expression being tested.
- _label
The label of a model entity.
- _normalizedLabel
The normalized (lower case) label of a model entity.
- _parent
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Sequential.ForLoopStatement(loopNode, loopIndex, rng, statements=None, label=None)[source]
Inheritance
- Parameters:
- __init__(loopNode, loopIndex, rng, statements=None, label=None)[source]
Initializes a for-loop statement.
- Parameters:
loopIndex (
str) – The name of the loop’s index.rng (
Range) – The range the loop iterates over.statements (
Iterable[SequentialStatement]) – List of all sequential statements in this construct.label (
str) – The label of a model entity.parent – The parent model entity of this entity.
loopNode (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 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 Range: <pyTooling.Decorators.readonly object at 0x7c5266ab4150>
Read-only property to access the range (
_range).- Returns:
The range.
- property Statements: List[SequentialStatement]
Read-only property to access the list of sequential statements (
_statements).- Returns:
A list of sequential statements.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _range: <pyTooling.Decorators.readonly object at 0x7c5266ab4150>
The range the loop iterates over.
- _statements: List[SequentialStatement]
List of all sequential statements in this construct.
- class pyGHDL.dom.Sequential.WhileLoopStatement(loopNode, condition, statements=None, label=None)[source]
Inheritance
- Parameters:
loopNode (Iir)
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
statements (Iterable[SequentialStatement])
label (str)
- __init__(loopNode, condition, statements=None, label=None)[source]
Initializes a while-loop statement.
- Parameters:
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The condition guarding this statement.
statements (
Iterable[SequentialStatement]) – List of all sequential statements in this construct.label (
str) – The label of a model entity.parent – The parent model entity of this entity.
loopNode (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 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 Statements: List[SequentialStatement]
Read-only property to access the list of sequential statements (
_statements).- Returns:
A list of sequential statements.
- _condition
The condition guarding this statement.
- _label
The label of a model entity.
- _normalizedLabel
The normalized (lower case) label of a model entity.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _statements
List of all sequential statements in this construct.
- class pyGHDL.dom.Sequential.SequentialSimpleSignalAssignment(assignmentNode, target, waveform, label=None)[source]
Inheritance
- Parameters:
assignmentNode (Iir)
target (SignalSymbol)
waveform (Iterable[WaveformElement])
label (str)
- __init__(assignmentNode, target, waveform, label=None)[source]
Initializes a simple sequential signal assignment.
- Parameters:
target (
SignalSymbol) – Reference to the assignment’s destination.waveform (
Iterable[WaveformElement]) – List of all waveform elements, in the order they were written.label (
str) – The label of a model entity.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.Sequential.ConditionalExpression(node, expression, condition=None)[source]
Inheritance
- Parameters:
node (Iir)
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- __init__(node, expression, condition=None)[source]
Initializes a conditional expression.
- Parameters:
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The value assigned when the condition holds.
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.
- 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.
- _condition
The condition guarding this statement.
- _expression
The expression held by this construct.
- _parent
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Sequential.SelectedExpression(node, choices, expression)[source]
Inheritance
- Parameters:
node (Iir)
choices (Iterable)
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- property Choices: List[BaseChoice]
Read-only property to access the choices (
_choices).- Returns:
List of choices.
- 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.
- _choices: List[BaseChoice]
List of all choices selecting this alternative.
- _expression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
The expression held by this construct.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Sequential.OthersSelectedExpression(node, expression)[source]
Inheritance
- Parameters:
node (Iir)
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- __init__(node, expression)[source]
Initializes an others selected expression.
- Parameters:
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The value assigned for every unnamed choice.
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.
- _expression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
The expression held by this construct.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Sequential.SequentialVariableAssignment(assignmentNode, target, expression, label=None)[source]
Inheritance
- Parameters:
assignmentNode (Iir)
target (VariableSymbol)
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
label (str)
- __init__(assignmentNode, target, expression, label=None)[source]
Initializes a simple sequential variable assignment.
- Parameters:
target (
VariableSymbol) – Reference to the assignment’s destination.expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The assigned expression.
label (
str) – The label of a model entity.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 Target: VariableSymbol
Read-only property to access the target (
_target).- Returns:
The target.
- _expression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
The assigned expression.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Sequential.SequentialConditionalVariableAssignment(assignmentNode, target, conditionalExpressions, label=None)[source]
Inheritance
- Parameters:
assignmentNode (Iir)
target (VariableSymbol)
conditionalExpressions (Iterable[ConditionalExpression])
label (str)
- __init__(assignmentNode, target, conditionalExpressions, label=None)[source]
Initializes a conditional sequential variable assignment.
- Parameters:
target (
VariableSymbol) – Reference to the assignment’s destination.conditionalExpressions (
Iterable[ConditionalExpression]) – List of all alternatives, in the order they were written.label (
str) – The label of a model entity.parent – The parent model entity of this entity.
assignmentNode (Iir)
- Return type:
None
- property ConditionalExpressions: List[ConditionalExpression]
Read-only property to access the conditional expressions (
_conditionalExpressions).- Returns:
List of conditional expressions.
- 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.
- _conditionalExpressions: List[ConditionalExpression]
List of all alternatives, in the order they were written.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Sequential.SequentialConditionalSignalAssignment(assignmentNode, target, conditionalWaveforms, label=None)[source]
Inheritance
- Parameters:
assignmentNode (Iir)
target (SignalSymbol)
conditionalWaveforms (Iterable)
label (str)
- __init__(assignmentNode, target, conditionalWaveforms, label=None)[source]
Initializes a conditional sequential signal assignment.
- Parameters:
target (
SignalSymbol) – Reference to the assignment’s destination.conditionalWaveforms (
Iterable) – All alternatives, in order.label (
str) – The label of a model entity.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.Sequential.SequentialSelectedVariableAssignment(assignmentNode, target, expression, selectedExpressions, label=None)[source]
Inheritance
- Parameters:
assignmentNode (Iir)
target (VariableSymbol)
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
selectedExpressions (Iterable)
label (str)
- __init__(assignmentNode, target, expression, selectedExpressions, label=None)[source]
Initializes a selected sequential variable assignment.
- Parameters:
target (
VariableSymbol) – Reference to the assignment’s destination.expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The selector expression.
selectedExpressions (
Iterable) – All alternatives, in order.label (
str) – The label of a model entity.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 SelectedExpressions: List[SelectedExpression | OthersSelectedExpression]
Read-only property to access the selected expressions (
_selectedExpressions).- Returns:
List of selected expressions.
- _expression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
The expression held by this construct.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- _selectedExpressions: List[SelectedExpression | OthersSelectedExpression]
All alternatives, in order.
- class pyGHDL.dom.Sequential.SequentialSelectedSignalAssignment(assignmentNode, target, expression, selectedWaveforms, label=None)[source]
Inheritance
- Parameters:
assignmentNode (Iir)
target (SignalSymbol)
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
selectedWaveforms (Iterable)
label (str)
- __init__(assignmentNode, target, expression, selectedWaveforms, label=None)[source]
Initializes a selected sequential signal assignment.
- Parameters:
target (
SignalSymbol) – Reference to the assignment’s destination.expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The selector expression.
selectedWaveforms (
Iterable) – All alternatives, in order.label (
str) – The label of a model entity.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.Sequential.SignalForceAssignment(assignmentNode, target, expression, label=None)[source]
Inheritance
- Parameters:
assignmentNode (Iir)
target (SignalSymbol)
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
label (str)
- __init__(assignmentNode, target, expression, label=None)[source]
Initializes a signal force assignment.
- Parameters:
target (
SignalSymbol) – Reference to the assignment’s destination.expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The value forced onto the signal.
label (
str) – The label of a model entity.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 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.
- class pyGHDL.dom.Sequential.SignalReleaseAssignment(assignmentNode, target, label=None)[source]
Inheritance
- Parameters:
assignmentNode (Iir)
target (SignalSymbol)
label (str)
- __init__(assignmentNode, target, label=None)[source]
Initializes a signal release assignment.
- Parameters:
target (
SignalSymbol) – Reference to the assignment’s destination.label (
str) – The label of a model entity.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.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Sequential.SequentialProcedureCall(callNode, procedureName, parameterAssociationItems, label=None)[source]
Inheritance
- Parameters:
callNode (Iir)
procedureName (Symbol)
parameterAssociationItems (Iterable[ParameterAssociationItem])
label (str)
- __init__(callNode, procedureName, parameterAssociationItems, label=None)[source]
Initializes a procedure call as a sequential statement.
- Parameters:
procedureName (
Symbol) – Reference to the called procedure.parameterAssociationItems (
Iterable[ParameterAssociationItem]) – List of all parameter associations of the call.label (
str) – The label of a model entity.parent – The parent model entity of this entity.
callNode (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 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.Sequential.SequentialAssertStatement(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 sequential 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.
- class pyGHDL.dom.Sequential.SequentialReportStatement(reportNode, message, severity=None, label=None)[source]
Inheritance
- Parameters:
reportNode (Iir)
message (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
severity (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
label (str)
- __init__(reportNode, message, severity=None, label=None)[source]
Initializes a sequential report statement.
- Parameters:
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.
reportNode (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 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.
- _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.
- class pyGHDL.dom.Sequential.ReturnStatement(returnNode, returnValue=None, label=None)[source]
Inheritance
- Parameters:
returnNode (Iir)
returnValue (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
label (str)
- 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 ReturnValue: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal | None
Read-only property to access the return value (
_returnValue).- Returns:
The return value, or
Noneif not set.
- _label
The label of a model entity.
- _normalizedLabel
The normalized (lower case) label of a model entity.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _returnValue
The returned expression, or
Nonefor a procedure.
- class pyGHDL.dom.Sequential.NullStatement(waitNode, label=None)[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 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.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Sequential.NextStatement(exitNode, condition=None, label=None)[source]
Inheritance
- Parameters:
exitNode (Iir)
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
label (str)
- __init__(exitNode, condition=None, label=None)[source]
Initializes a loop control statement.
- Parameters:
- 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 LoopReference: LoopStatement
Read-only property to access the loop reference (
_loopReference).- Returns:
The loop reference.
- 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.
- _condition
The condition guarding this statement.
- _label
The label of a model entity.
- _loopReference
Reference to the loop this statement controls.
- _normalizedLabel
The normalized (lower case) label of a model entity.
- _parent
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Sequential.ExitStatement(exitNode, condition=None, label=None)[source]
Inheritance
- Parameters:
exitNode (Iir)
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
label (str)
- __init__(exitNode, condition=None, label=None)[source]
Initializes a loop control statement.
- Parameters:
- 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 LoopReference: LoopStatement
Read-only property to access the loop reference (
_loopReference).- Returns:
The loop reference.
- 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.
- _condition
The condition guarding this statement.
- _label
The label of a model entity.
- _loopReference
Reference to the loop this statement controls.
- _normalizedLabel
The normalized (lower case) label of a model entity.
- _parent
Reference to a parent entity in the logical model hierarchy.
- class pyGHDL.dom.Sequential.WaitStatement(waitNode, sensitivityList=None, condition=None, timeout=None, label=None)[source]
Inheritance
- Parameters:
waitNode (Iir)
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
timeout (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
label (str)
- __init__(waitNode, sensitivityList=None, condition=None, timeout=None, label=None)[source]
Initializes a wait statement.
- Parameters:
sensitivityList (
Iterable[Symbol]) – List of all signal names to wait on, orNoneif none was given.condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The condition guarding this statement.
timeout (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The timeout expression, or
Noneif none was given.label (
str) – The label of a model entity.parent – The parent model entity of this entity.
waitNode (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 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 SensitivityList: List[Symbol]
Read-only property to access the sensitivity list (
_sensitivityList).- Returns:
List of sensitivity list.
- property Timeout: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal
Read-only property to access the timeout (
_timeout).- Returns:
The timeout.
- _condition
The condition guarding this statement.
- _label
The label of a model entity.
- _normalizedLabel
The normalized (lower case) label of a model entity.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _sensitivityList
List of all signal names to wait on, or
Noneif none was given.
- _timeout
The timeout expression, or
Noneif none was given.