Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
e877222
Bumped dependencies.
Paebbels Jul 11, 2026
3240bcb
Fix crashes in GetAncestor/AllowBlackbox, TopLevel hierarchy check, a…
claude Jul 16, 2026
40b13d4
Address review feedback on #126
claude Jul 17, 2026
5765141
Apply suggestions from code review
Paebbels Jul 17, 2026
192e0f2
Fix crashes in GetAncestor/AllowBlackbox, TopLevel hierarchy check, a…
Paebbels Jul 17, 2026
6a7f76c
PackageInstantiation: accept and forward genericAssociations
claude Jul 18, 2026
881461d
Address review feedback on #127
claude Jul 18, 2026
547c8c3
AssociationItem: swap parameter order to (formal, actual)
claude Jul 18, 2026
31f1ab8
PackageInstantiation: accept and forward genericAssociations
Paebbels Jul 18, 2026
62aa05e
Rename genericAssociations/portAssociations/parameterMappings to *Ass…
claude Jul 18, 2026
9e6f075
Address review feedback on #128
claude Jul 21, 2026
05650fc
Rename genericAssociations/portAssociations/parameterMappings to *Ass…
Paebbels Jul 21, 2026
5d5a5b3
Fix Subprogram/Function constructors: crashing ReturnType, unusable g…
claude Jul 20, 2026
3e86276
Fix ReturnStatement.ReturnValue crash and missing label support
claude Jul 20, 2026
0a984af
Restore VHDLVersion.__hash__, lost when __eq__ was overridden
claude Jul 21, 2026
8307528
Address review feedback on #129
claude Jul 21, 2026
ada7c92
Apply suggestions from code review
Paebbels Jul 21, 2026
3e815eb
Fix Function.ReturnType crash and Subprogram genericItems/parameterIt…
Paebbels Jul 21, 2026
a96c1a0
Bumped version to v0.38.0.
Paebbels Jul 21, 2026
9673e10
Add VHDL-2019 mode view classes and split Port/Parameter signal inter…
claude Jul 21, 2026
807ded9
Address review feedback on #134
claude Jul 22, 2026
8046d44
Update pyVHDLModel/Interface.py
Paebbels Jul 22, 2026
a7b6cd8
Add VHDL-2019 mode view classes and split Port/Parameter signal inter…
Paebbels Jul 22, 2026
cb81c05
Fix Alias: previously had no field for what's being aliased at all
claude Jul 22, 2026
255274e
Add subprogram instantiation support (VHDL-2008 generic subprograms)
claude Jul 22, 2026
a832530
Address review feedback on #135: Alias.Name is now a Symbol, not a ba…
claude Jul 22, 2026
daa6e1d
Subprogram instantiation (VHDL-2008 generic subprograms) and Alias (#…
Paebbels Jul 22, 2026
7375e78
Fix ConstrainedScalarSubtypeSymbol: range constraint was read by pyGH…
claude Jul 22, 2026
68d2c0a
Address review feedback on #136: Constraint/*Constraint mixins need t…
claude Jul 22, 2026
98e72f9
Fix ConstrainedScalarSubtypeSymbol: range constraint had nowhere to g…
Paebbels Jul 22, 2026
f3d3b38
Add full configuration/binding model (configurations, block/component…
claude Jul 22, 2026
bf279c8
Add configuration/binding model (#137)
Paebbels Jul 22, 2026
7291227
Add conditional/selected/force/release assignment statements
claude Jul 22, 2026
277ccff
Address review feedback on #138
claude Jul 22, 2026
3139562
Address second round of review feedback on #138
claude Jul 22, 2026
c653b03
Address third round of review feedback on #138
claude Jul 23, 2026
51ef98b
Address fourth round of review feedback on #138: extract ChoicesMixin
claude Jul 23, 2026
b841d13
Add conditional/selected/force/release assignment statements (#138)
Paebbels Jul 23, 2026
ac44274
Bumped dependencies.
Paebbels Jul 23, 2026
ea4eed8
Add level-1 construction/property/parent-wiring tests across the model
Paebbels Jul 24, 2026
9e18f04
Add level-1 construction/property/parent-wiring tests across the mode…
Paebbels Jul 24, 2026
a2f8714
Three small cleanups from the test-strategy findings
Paebbels Jul 24, 2026
a7b80ac
Fix four expression/interface/region gaps from the test-strategy find…
Paebbels Jul 24, 2026
812965d
Update pyVHDLModel/Expression.py
Paebbels Jul 24, 2026
bf80c69
Three small cleanups from the test-strategy findings (#140)
Paebbels Jul 24, 2026
efde898
Fix four expression/interface/region gaps from the test-strategy find…
Paebbels Jul 24, 2026
846abb4
Remove private-notes-file references from test docstrings
Paebbels Jul 24, 2026
7a84e05
Remove private-notes-file references from test docstrings (#142)
Paebbels Jul 24, 2026
44ea3ee
Fix GenericFunctionInterfaceItem crash on real VHDL-2008 generic func…
Paebbels Jul 24, 2026
401bd47
Apply suggestions from code review
Paebbels Jul 24, 2026
e7e8761
Fix GenericFunctionInterfaceItem crash on real VHDL-2008 generic func…
Paebbels Jul 24, 2026
e8668c9
Fix regression: GenericProcedureInterfaceItem/GenericFunctionInterfac…
Paebbels Jul 24, 2026
c6e1688
Fix regression: GenericProcedureInterfaceItem/GenericFunctionInterfac…
Paebbels Jul 24, 2026
f434d4c
Split Range into SimpleRange and RangeFromName
claude-code Jul 26, 2026
b1d2003
Add RangeAttributeSymbol for range attributes
claude-code Jul 26, 2026
83f0a62
Address review: docstrings and test variable naming
claude-code Jul 26, 2026
f03e768
Split Range into SimpleRange and RangeFromName (#145)
Paebbels Jul 26, 2026
a7255af
Fix NameError on Python < 3.14 from a stale Range annotation
claude-code Jul 26, 2026
5a78dce
Fix NameError on Python < 3.14 from a stale Range annotation (#146)
Paebbels Jul 26, 2026
7ef7336
Group instantiation tests into a tests/unit/Instantiation package
claude-code Jul 26, 2026
a67bc2c
Chain ExtendedKeyError in FindSubtype/FindObject and fix copy-pasted …
claude-code Jul 26, 2026
2d70fd6
Move namespace-usage assertions into the Namespace package
claude-code Jul 26, 2026
36570b1
Address review: copyright headers and hiding/nesting tests
claude-code Jul 26, 2026
6ac7e5e
Namespace tests, ExtendedKeyError chaining, and the Instantiation tes…
Paebbels Jul 26, 2026
03018ab
Give sequential declaration regions a namespace
claude-code Jul 26, 2026
dad024d
Reframe the entity/architecture test: that shadowing is illegal VHDL
claude-code Jul 26, 2026
6e70e39
Index generics, ports and parameters into their region's namespace
claude-code Jul 26, 2026
eeeda20
Address review: shared identifier helpers, isinstance, three indexers
claude-code Jul 26, 2026
d402eba
Address review: shared RegionBaseMixin, dispatch in the derived classes
claude-code Jul 26, 2026
5b23f94
Namespaces for sequential declaration regions, and for generics/ports…
Paebbels Jul 26, 2026
29988df
Apply the TypeError message+note pattern and drop the version guards
claude-code Jul 26, 2026
36c5563
Mark read-only properties with @readonly
claude-code Jul 26, 2026
42b39e2
Document every property
claude-code Jul 26, 2026
79ce362
Address review: drop setter doc-strings, mark read-only per class
claude-code Jul 26, 2026
e47d367
Exception pattern, @readonly marking and property doc-strings (#149)
Paebbels Jul 26, 2026
84803a8
Bring the remaining property doc-strings onto the pattern, and fix st…
claude-code Jul 26, 2026
ef4c5d0
Address review: Check-if form, boolean returns, indexed by
claude-code Jul 26, 2026
ffabe02
Use the Check-if form for Has*** properties too
claude-code Jul 26, 2026
c61464e
Give every property a :returns: line
claude-code Jul 26, 2026
c154bec
Add the missing return type annotations
claude-code Jul 26, 2026
646a009
Bring the remaining property doc-strings onto the pattern, and fix st…
Paebbels Jul 26, 2026
7688fbb
Document all classes in Type.py (pilot for the class doc-string pass)
claude-code Jul 26, 2026
f6a66f5
Rework Type.py class doc-strings after review
claude-code Jul 26, 2026
6b83177
Document all classes in Expression.py
claude-code Jul 26, 2026
311a25d
Document all classes in Sequential.py; drop pre-2019 revision mentions
claude-code Jul 27, 2026
7347736
Document the remaining classes; fix three misaligned pre-existing exa…
claude-code Jul 27, 2026
f64d026
Cross-link related classes with seealso blocks
claude-code Jul 27, 2026
811ac5f
Doc: Address review feedback on class doc-strings
claude-code Jul 27, 2026
77e5235
Doc: Second review round on class doc-strings
claude-code Jul 27, 2026
791fcc1
Doc: Show the statement label everywhere, use "optional X" wording
claude-code Jul 27, 2026
3f7b551
Document every class, with VHDL examples (#151)
Paebbels Jul 27, 2026
c392201
Doc: Document every class field with a `#:` comment
claude-code Jul 27, 2026
b7c1049
Document every class field with a `#:` comment (#152)
Paebbels Jul 27, 2026
be48b74
Doc: Document all 246 `__init__` methods, exclude nested functions
claude-code Jul 27, 2026
7092d70
Doc: Fix the generated `__init__` summaries
claude-code Jul 27, 2026
a646e61
Document all 246 `__init__` methods, exclude nested functions from in…
Paebbels Jul 27, 2026
50de871
Doc: Document all 75 dunder methods
claude-code Jul 27, 2026
7f46bab
Fix the design-unit formatting placeholder, repair dangling references
claude-code Jul 27, 2026
1361481
Doc: Name the specific class in every dunder summary
claude-code Jul 27, 2026
f051544
Document all 75 dunder methods (#154)
Paebbels Jul 27, 2026
5d5fa28
Fix two `__str__` defects, unify boolean naming, de-duplicate IEEE cl…
claude-code Jul 27, 2026
9dca48a
Simplify the interface-group format strings, drop redundant `parent=N…
claude-code Jul 28, 2026
1945bf1
Fix two `__str__` defects, unify boolean naming, de-duplicate IEEE cl…
Paebbels Jul 28, 2026
4dbeac0
[Dependabot]: Update twine requirement from ~=6.2 to ~=7.0
dependabot[bot] Jul 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
wheel ~= 0.47.0
twine ~= 6.2
twine ~= 7.0
12 changes: 6 additions & 6 deletions doc/Dependency.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pyVHDLModel Package
+--------------------------------------------------------+-------------+------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
| **Package** | **Version** | **License** | **Dependencies** |
+========================================================+=============+==========================================================================================+=================================================================================================================================+
| `pyTooling <https://GitHub.com/pyTooling/pyTooling>`__ | ≥8.15 | `Apache License, 2.0 <https://GitHub.com/pyTooling/pyTooling/blob/master/LICENSE.txt>`__ | *None* |
| `pyTooling <https://GitHub.com/pyTooling/pyTooling>`__ | ≥8.17 | `Apache License, 2.0 <https://GitHub.com/pyTooling/pyTooling/blob/master/LICENSE.txt>`__ | *None* |
+--------------------------------------------------------+-------------+------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+


Expand Down Expand Up @@ -57,7 +57,7 @@ the mandatory dependencies too.
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `Coverage <https://GitHub.com/nedbat/coveragepy>`__ | ≥7.15 | `Apache License, 2.0 <https://GitHub.com/nedbat/coveragepy/blob/master/LICENSE.txt>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `mypy <https://GitHub.com/python/mypy>`__ | ≥2.1 | `MIT <https://GitHub.com/python/mypy/blob/master/LICENSE>`__ | *Not yet evaluated.* |
| `mypy <https://GitHub.com/python/mypy>`__ | ≥2.3 | `MIT <https://GitHub.com/python/mypy/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
| `typing-extensions <https://GitHub.com/python/typing_extensions>`__ | ≥4.16 | `PSF-2.0 <https://github.com/python/typing_extensions/blob/main/LICENSE>`__ | *Not yet evaluated.* |
+---------------------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
Expand Down Expand Up @@ -89,19 +89,19 @@ the mandatory dependencies too.
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
| **Package** | **Version** | **License** | **Dependencies** |
+=================================================================================================+==============+==========================================================================================================+======================+
| `pyTooling <https://GitHub.com/pyTooling/pyTooling>`__ | ≥8.15 | `Apache License, 2.0 <https://GitHub.com/pyTooling/pyTooling/blob/main/LICENSE.md>`__ | *None* |
| `pyTooling <https://GitHub.com/pyTooling/pyTooling>`__ | ≥8.17 | `Apache License, 2.0 <https://GitHub.com/pyTooling/pyTooling/blob/main/LICENSE.md>`__ | *None* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
| `Sphinx <https://GitHub.com/sphinx-doc/sphinx>`__ | ≥9.1 | `BSD 3-Clause <https://GitHub.com/sphinx-doc/sphinx/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
| `sphinx_rtd_theme <https://GitHub.com/readthedocs/sphinx_rtd_theme>`__ | ≥3.1 | `MIT <https://GitHub.com/readthedocs/sphinx_rtd_theme/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
| `sphinxcontrib-mermaid <https://GitHub.com/mgaitan/sphinxcontrib-mermaid>`__ | ≥2.0 | `BSD <https://GitHub.com/mgaitan/sphinxcontrib-mermaid/blob/master/LICENSE.rst>`__ | *Not yet evaluated.* |
| `sphinxcontrib-mermaid <https://GitHub.com/mgaitan/sphinxcontrib-mermaid>`__ | ≥2.1 | `BSD <https://GitHub.com/mgaitan/sphinxcontrib-mermaid/blob/master/LICENSE.rst>`__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
| `autoapi <https://GitHub.com/carlos-jenkins/autoapi>`__ | ≥2.0.1 | `Apache License, 2.0 <https://GitHub.com/carlos-jenkins/autoapi/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
| !! `sphinx_fontawesome <https://GitHub.com/fraoustin/sphinx_fontawesome>`__ | ≥0.0.6 | `GPL 2.0 <https://GitHub.com/fraoustin/sphinx_fontawesome/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
| `sphinx_autodoc_typehints <https://GitHub.com/agronholm/sphinx-autodoc-typehints>`__ | ≥3.12 | `MIT <https://GitHub.com/agronholm/sphinx-autodoc-typehints/blob/master/LICENSE>`__ | *Not yet evaluated.* |
| `sphinx_autodoc_typehints <https://GitHub.com/agronholm/sphinx-autodoc-typehints>`__ | ≥3.13 | `MIT <https://GitHub.com/agronholm/sphinx-autodoc-typehints/blob/master/LICENSE>`__ | *Not yet evaluated.* |
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+


Expand Down Expand Up @@ -129,7 +129,7 @@ install the mandatory dependencies too.
+----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| **Package** | **Version** | **License** | **Dependencies** |
+============================================================================+==============+==========================================================================================================+======================================================================================================================================================+
| `pyTooling <https://GitHub.com/pyTooling/pyTooling>`__ | ≥8.15 | `Apache License, 2.0 <https://GitHub.com/pyTooling/pyTooling/blob/main/LICENSE.md>`__ | *None* |
| `pyTooling <https://GitHub.com/pyTooling/pyTooling>`__ | ≥8.17 | `Apache License, 2.0 <https://GitHub.com/pyTooling/pyTooling/blob/main/LICENSE.md>`__ | *None* |
+----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
| `wheel <https://GitHub.com/pypa/wheel>`__ | ≥0.47 | `MIT <https://github.com/pypa/wheel/blob/main/LICENSE.txt>`__ | *Not yet evaluated.* |
+----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
Expand Down
97 changes: 90 additions & 7 deletions doc/LanguageModel/InterfaceItems.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Interface items are used in generic, port and parameter declarations.

.. rubric:: Class Hierarchy

.. inheritance-diagram:: pyVHDLModel.SyntaxModel.GenericConstantInterfaceItem pyVHDLModel.SyntaxModel.GenericTypeInterfaceItem pyVHDLModel.SyntaxModel.GenericProcedureInterfaceItem pyVHDLModel.SyntaxModel.GenericFunctionInterfaceItem pyVHDLModel.SyntaxModel.PortSignalInterfaceItem pyVHDLModel.SyntaxModel.ParameterConstantInterfaceItem pyVHDLModel.SyntaxModel.ParameterVariableInterfaceItem pyVHDLModel.SyntaxModel.ParameterSignalInterfaceItem pyVHDLModel.SyntaxModel.ParameterFileInterfaceItem
.. inheritance-diagram:: pyVHDLModel.SyntaxModel.GenericConstantInterfaceItem pyVHDLModel.SyntaxModel.GenericTypeInterfaceItem pyVHDLModel.SyntaxModel.GenericProcedureInterfaceItem pyVHDLModel.SyntaxModel.GenericFunctionInterfaceItem pyVHDLModel.SyntaxModel.PortSimpleSignalInterfaceItem pyVHDLModel.SyntaxModel.PortViewSignalInterfaceItem pyVHDLModel.SyntaxModel.ParameterConstantInterfaceItem pyVHDLModel.SyntaxModel.ParameterVariableInterfaceItem pyVHDLModel.SyntaxModel.ParameterSimpleSignalInterfaceItem pyVHDLModel.SyntaxModel.ParameterViewSignalInterfaceItem pyVHDLModel.SyntaxModel.ParameterFileInterfaceItem
:parts: 1


Expand Down Expand Up @@ -136,16 +136,25 @@ Port Interface Item
PortSignalInterfaceItem
-----------------------

``PortSignalInterfaceItem`` is now an abstract base-class for :class:`PortSimpleSignalInterfaceItem`
(``port (p : in bit);``) and :class:`PortViewSignalInterfaceItem` (``port (p : view MyView);``,
VHDL-2019 mode views) - see below. It is not meant to be instantiated directly.

.. _vhdlmodel-portsimplesignal:

PortSimpleSignalInterfaceItem
------------------------------

.. todo::

Write documentation.

**Condensed definition of class** :class:`~pyVHDLModel.SyntaxModel.PortSignalInterfaceItem`:
**Condensed definition of class** :class:`~pyVHDLModel.SyntaxModel.PortSimpleSignalInterfaceItem`:

.. code-block:: Python

@export
class PortSignalInterfaceItem(Signal, PortInterfaceItem):
class PortSimpleSignalInterfaceItem(PortSignalInterfaceItem):
# inherited from ModelEntity
@property
def Parent(self) -> ModelEntity:
Expand All @@ -162,11 +171,43 @@ PortSignalInterfaceItem
@property
def DefaultExpression(self) -> BaseExpression:

# inherited from InterfaceItem
# inherited from InterfaceItemWithModeMixin
@property
def Mode(self) -> Mode:


.. _vhdlmodel-portviewsignal:

PortViewSignalInterfaceItem
-----------------------------

.. todo::

Write documentation.

**Condensed definition of class** :class:`~pyVHDLModel.SyntaxModel.PortViewSignalInterfaceItem`:

.. code-block:: Python

@export
class PortViewSignalInterfaceItem(PortSignalInterfaceItem):
# inherited from ModelEntity
@property
def Parent(self) -> ModelEntity:

# inherited from NamedEntity
@property
def Name(self) -> str:

# inherited from Object; aliased as ModeViewIndication (a mode view reference occupies the
# same structural position as an ordinary subtype indication)
@property
def Subtype(self) -> Symbol:

@property
def ModeViewIndication(self) -> ModeViewSymbol:



.. _vhdlmodel-parameters:

Expand Down Expand Up @@ -252,16 +293,26 @@ ParameterVariableInterfaceItem
ParameterSignalInterfaceItem
----------------------------

``ParameterSignalInterfaceItem`` is now an abstract base-class for
:class:`ParameterSimpleSignalInterfaceItem` (``procedure p(signal s : in bit);``) and
:class:`ParameterViewSignalInterfaceItem` (``procedure p(signal s : view MyView);``, VHDL-2019 mode
views) - see below. It is not meant to be instantiated directly.

.. _vhdlmodel-parametersimplesignal:

ParameterSimpleSignalInterfaceItem
-----------------------------------

.. todo::

Write documentation.

**Condensed definition of class** :class:`~pyVHDLModel.SyntaxModel.ParameterSignalInterfaceItem`:
**Condensed definition of class** :class:`~pyVHDLModel.SyntaxModel.ParameterSimpleSignalInterfaceItem`:

.. code-block:: Python

@export
class ParameterSignalInterfaceItem(Signal, ParameterInterfaceItem):
class ParameterSimpleSignalInterfaceItem(ParameterSignalInterfaceItem):
# inherited from ModelEntity
@property
def Parent(self) -> ModelEntity:
Expand All @@ -278,11 +329,43 @@ ParameterSignalInterfaceItem
@property
def DefaultExpression(self) -> BaseExpression:

# inherited from InterfaceItem
# inherited from InterfaceItemWithModeMixin
@property
def Mode(self) -> Mode:


.. _vhdlmodel-parameterviewsignal:

ParameterViewSignalInterfaceItem
-----------------------------------

.. todo::

Write documentation.

**Condensed definition of class** :class:`~pyVHDLModel.SyntaxModel.ParameterViewSignalInterfaceItem`:

.. code-block:: Python

@export
class ParameterViewSignalInterfaceItem(ParameterSignalInterfaceItem):
# inherited from ModelEntity
@property
def Parent(self) -> ModelEntity:

# inherited from NamedEntity
@property
def Name(self) -> str:

# inherited from Object; aliased as ModeViewIndication (a mode view reference occupies the
# same structural position as an ordinary subtype indication)
@property
def Subtype(self) -> Symbol:

@property
def ModeViewIndication(self) -> ModeViewSymbol:



.. _vhdlmodel-parameterfile:

Expand Down
6 changes: 3 additions & 3 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ docutils_stubs ~= 0.0.22
sphinx_rtd_theme ~= 3.1

# Sphinx Extenstions
sphinxcontrib-mermaid ~= 2.0
sphinxcontrib-mermaid ~= 2.1
autoapi >= 2.0.1
sphinx_design ~= 0.7.0
sphinx-copybutton >= 0.5.2
sphinx_autodoc_typehints ~= 3.12
sphinx_reports ~= 0.11.0
sphinx_autodoc_typehints ~= 3.13
sphinx_reports ~= 0.11.1
35 changes: 32 additions & 3 deletions pyVHDLModel/Association.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,24 @@
class AssociationItem(ModelEntity):
"""
A base-class for all association items.

.. seealso::

* :class:`Generic association item <pyVHDLModel.Association.GenericAssociationItem>`
* :class:`Port association item <pyVHDLModel.Association.PortAssociationItem>`
* :class:`Parameter association item <pyVHDLModel.Association.ParameterAssociationItem>`
"""

_formal: Nullable[Symbol]
_actual: ExpressionUnion
_formal: Nullable[Symbol] #: Reference to the formal part, or ``None`` for a positional association.
_actual: ExpressionUnion #: The actual part of this association.

def __init__(self, actual: ExpressionUnion, formal: Nullable[Symbol] = None) -> None:
def __init__(self, formal: Nullable[Symbol], actual: ExpressionUnion) -> None:
"""
Initializes an association item.

:param formal: Reference to the formal part, or ``None`` for a positional association.
:param actual: The actual part of this association.
"""
super().__init__()

self._formal = formal
Expand All @@ -74,13 +86,30 @@ def __init__(self, actual: ExpressionUnion, formal: Nullable[Symbol] = None) ->

@readonly
def Formal(self) -> Nullable[Symbol]: # TODO: can also be a conversion function !!
"""
Read-only property to access the formal (:attr:`_formal`).

:returns: The formal, or ``None`` if not set.
"""
return self._formal

@readonly
def Actual(self) -> ExpressionUnion:
"""
Read-only property to access the actual (:attr:`_actual`).

:returns: The actual.
"""
return self._actual

def __str__(self) -> str:
"""
Formats the association item.

**Format:** ``formal => actual``, or ``actual`` alone when positional

:returns: Formatted association item.
"""
if self._formal is None:
return str(self._actual)
else:
Expand Down
Loading
Loading