pyVHDLModel.Base
This module contains parts of an abstract document language model for VHDL.
Base-classes for the VHDL language model.
Variables
Classes
Direction
: An enumeration representing a direction in a range (to
ordownto
).Mode
: AMode
is an enumeration. It represents the direction of data exchange (in
,out
, …) for objects inModelEntity
:ModelEntity
is the base-class for all classes in the VHDL language model, except for mixin classes (see multipleNamedEntityMixin
: ANamedEntityMixin
is a mixin class for all VHDL entities that have identifiers.MultipleNamedEntityMixin
: AMultipleNamedEntityMixin
is a mixin class for all VHDL entities that declare multiple instances at once byLabeledEntityMixin
: ALabeledEntityMixin
is a mixin class for all VHDL entities that can have labels.DocumentedEntityMixin
: ADocumentedEntityMixin
is a mixin class for all VHDL entities that can have an associated documentation.ConditionalMixin
: ABaseConditional
is a mixin-class for all statements with a condition.BranchMixin
: ABaseBranch
is a mixin-class for all statements with branches.ConditionalBranchMixin
: ABaseBranch
is a mixin-class for all branch statements with a condition.IfBranchMixin
: ABaseIfBranch
is a mixin-class for all if-branches.ElsifBranchMixin
: ABaseElsifBranch
is a mixin-class for all elsif-branches.ElseBranchMixin
: ABaseElseBranch
is a mixin-class for all else-branches.ReportStatementMixin
: AMixinReportStatement
is a mixin-class for all report and assert statements.AssertStatementMixin
: AMixinAssertStatement
is a mixin-class for all assert statements.BaseChoice
: AChoice
is a base-class for all choices.BaseCase
: ACase
is a base-class for all cases.Range
:ModelEntity
is the base-class for all classes in the VHDL language model, except for mixin classes (see multipleWaveformElement
:ModelEntity
is the base-class for all classes in the VHDL language model, except for mixin classes (see multiple
Variables
- pyVHDLModel.Base.ExpressionUnion
typing.Union[ForwardRef('BaseExpression'), ForwardRef('QualifiedExpression'), ForwardRef('FunctionCall'), ForwardRef('TypeConversion'), ForwardRef('Literal')]
alias of
BaseExpression
|QualifiedExpression
|FunctionCall
|TypeConversion
|Literal
Classes
- class pyVHDLModel.Base.Direction(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
An enumeration representing a direction in a range (
to
ordownto
).Inheritance
- To = 0
Ascending direction
- DownTo = 1
Descending direction
- class pyVHDLModel.Base.Mode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
A
Mode
is an enumeration. It represents the direction of data exchange (in
,out
, …) for objects in generic, port or parameter lists.In case no mode is defined,
Default
is used, so the mode is inferred from context.Inheritance
- Default = 0
Mode not defined, thus it’s context dependent.
- In = 1
Input
- Out = 2
Output
- InOut = 3
Bi-directional
- Buffer = 4
Buffered output
- Linkage = 5
undocumented
- class pyVHDLModel.Base.ModelEntity[source]
ModelEntity
is the base-class for all classes in the VHDL language model, except for mixin classes (see multiple inheritance) and enumerations.Each entity in this model has a reference to its parent entity. Therefore, a protected variable
_parent
is available and a readonly propertyParent
.Inheritance
-
_parent:
ModelEntity
Reference to a parent entity in the model.
- property Parent: ModelEntity
Returns a reference to the parent entity.
- Returns:
Parent entity.
-
_parent:
- class pyVHDLModel.Base.NamedEntityMixin(identifier)[source]
A
NamedEntityMixin
is a mixin class for all VHDL entities that have identifiers.Protected variables
_identifier
and_normalizedIdentifier
are available to derived classes as well as two readonly propertiesIdentifier
andNormalizedIdentifier
for public access.Inheritance
- Parameters:
identifier (str)
- __init__(identifier)[source]
Initializes a named entity.
- Parameters:
identifier (
str
) – Identifier (name) of the model entity.
- property Identifier: str
Returns a model entity’s identifier (name).
- Returns:
Name of a model entity.
- property NormalizedIdentifier: str
Returns a model entity’s normalized identifier (lower case name).
- Returns:
Normalized name of a model entity.
- class pyVHDLModel.Base.MultipleNamedEntityMixin(identifiers)[source]
A
MultipleNamedEntityMixin
is a mixin class for all VHDL entities that declare multiple instances at once by defining multiple identifiers.Protected variables
_identifiers
and_normalizedIdentifiers
are available to derived classes as well as two readonly propertiesIdentifiers
andNormalizedIdentifiers
for public access.Inheritance
- property Identifiers: Tuple[str]
Returns a model entity’s tuple of identifiers (names).
- Returns:
Tuple of identifiers.
- property NormalizedIdentifiers: Tuple[str]
Returns a model entity’s tuple of normalized identifiers (lower case names).
- Returns:
Tuple of normalized identifiers.
- class pyVHDLModel.Base.LabeledEntityMixin(label)[source]
A
LabeledEntityMixin
is a mixin class for all VHDL entities that can have labels.protected variables
_label
and_normalizedLabel
are available to derived classes as well as two readonly propertiesLabel
andNormalizedLabel
for public access.Inheritance
- Parameters:
label (str | None)
- property NormalizedLabel: str | None
Returns a model entity’s normalized (lower case) label.
- Returns:
Normalized label of a model entity.
- class pyVHDLModel.Base.DocumentedEntityMixin(documentation)[source]
A
DocumentedEntityMixin
is a mixin class for all VHDL entities that can have an associated documentation.A protected variable
_documentation
is available to derived classes as well as a readonly propertyDocumentation
for public access.Inheritance
- Parameters:
documentation (str | None)
- property Documentation: str | None
Returns a model entity’s associated documentation.
- Returns:
Associated documentation of a model entity.
- class pyVHDLModel.Base.ConditionalMixin(condition=None)[source]
A
BaseConditional
is a mixin-class for all statements with a condition.Inheritance
- Parameters:
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- __init__(condition=None)[source]
- Parameters:
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- class pyVHDLModel.Base.BranchMixin[source]
A
BaseBranch
is a mixin-class for all statements with branches.Inheritance
- class pyVHDLModel.Base.ConditionalBranchMixin(condition)[source]
A
BaseBranch
is a mixin-class for all branch statements with a condition.Inheritance
- Parameters:
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- __init__(condition)[source]
- Parameters:
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- class pyVHDLModel.Base.IfBranchMixin(condition)[source]
A
BaseIfBranch
is a mixin-class for all if-branches.Inheritance
- Parameters:
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
- __init__(condition)
- Parameters:
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- class pyVHDLModel.Base.ElsifBranchMixin(condition)[source]
A
BaseElsifBranch
is a mixin-class for all elsif-branches.Inheritance
- Parameters:
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
- __init__(condition)
- Parameters:
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- class pyVHDLModel.Base.ElseBranchMixin[source]
A
BaseElseBranch
is a mixin-class for all else-branches.Inheritance
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
- __init__()
- class pyVHDLModel.Base.ReportStatementMixin(message=None, severity=None)[source]
A
MixinReportStatement
is a mixin-class for all report and assert statements.Inheritance
- Parameters:
message (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
severity (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- __init__(message=None, severity=None)[source]
- Parameters:
message (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
severity (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- class pyVHDLModel.Base.AssertStatementMixin(condition, message=None, severity=None)[source]
A
MixinAssertStatement
is a mixin-class for all assert statements.Inheritance
- Parameters:
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
message (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
severity (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- __init__(condition, message=None, severity=None)[source]
- Parameters:
condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
message (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
severity (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- class pyVHDLModel.Base.BaseChoice[source]
A
Choice
is a base-class for all choices.Inheritance
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
- property Parent: ModelEntity
Returns a reference to the parent entity.
- Returns:
Parent entity.
- __init__()
Initializes a VHDL model entity.
-
_parent:
ModelEntity
Reference to a parent entity in the model.
- class pyVHDLModel.Base.BaseCase[source]
A
Case
is a base-class for all cases.Inheritance
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
- property Parent: ModelEntity
Returns a reference to the parent entity.
- Returns:
Parent entity.
- __init__()
Initializes a VHDL model entity.
-
_parent:
ModelEntity
Reference to a parent entity in the model.
- class pyVHDLModel.Base.Range(leftBound, rightBound, direction)[source]
Inheritance
- Parameters:
leftBound (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
rightBound (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
direction (Direction)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
- property Parent: ModelEntity
Returns a reference to the parent entity.
- Returns:
Parent entity.
- __init__(leftBound, rightBound, direction)[source]
Initializes a VHDL model entity.
- Parameters:
leftBound (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
rightBound (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
direction (Direction)
- _parent: ModelEntity
Reference to a parent entity in the model.
- class pyVHDLModel.Base.WaveformElement(expression, after=None)[source]
Inheritance
- Parameters:
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
after (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- class property HasClassAttributes: bool
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
- class property HasMethodAttributes: bool
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
- property Parent: ModelEntity
Returns a reference to the parent entity.
- Returns:
Parent entity.
- _parent: ModelEntity
Reference to a parent entity in the model.
- __init__(expression, after=None)[source]
Initializes a VHDL model entity.
- Parameters:
expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
after (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)