Skip to content

Commit c897177

Browse files
authored
v0.24.0
2 parents 14ec13b + 6029411 commit c897177

14 files changed

+106
-70
lines changed

doc/Dependency.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pyVHDLModel Package
2323
+--------------------------------------------------------+-------------+------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
2424
| **Package** | **Version** | **License** | **Dependencies** |
2525
+========================================================+=============+==========================================================================================+=================================================================================================================================+
26-
| `pyTooling <https://GitHub.com/pyTooling/pyTooling>`__ |2.11.0 | `Apache License, 2.0 <https://GitHub.com/pyTooling/pyTooling/blob/master/LICENSE.txt>`__ | *None* |
26+
| `pyTooling <https://GitHub.com/pyTooling/pyTooling>`__ |4.0.0 | `Apache License, 2.0 <https://GitHub.com/pyTooling/pyTooling/blob/master/LICENSE.txt>`__ | *None* |
2727
+--------------------------------------------------------+-------------+------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
2828

2929

@@ -55,9 +55,9 @@ the mandatory dependencies too.
5555
+-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
5656
| `pytest-cov <https://GitHub.com/pytest-dev/pytest-cov>`__ | ≥4.0.0 | `MIT <https://GitHub.com/pytest-dev/pytest-cov/blob/master/LICENSE>`__ | *Not yet evaluated.* |
5757
+-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
58-
| `Coverage <https://GitHub.com/nedbat/coveragepy>`__ | ≥7.1 | `Apache License, 2.0 <https://GitHub.com/nedbat/coveragepy/blob/master/LICENSE.txt>`__ | *Not yet evaluated.* |
58+
| `Coverage <https://GitHub.com/nedbat/coveragepy>`__ | ≥7.2 | `Apache License, 2.0 <https://GitHub.com/nedbat/coveragepy/blob/master/LICENSE.txt>`__ | *Not yet evaluated.* |
5959
+-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
60-
| `mypy <https://GitHub.com/python/mypy>`__ |0.990 | `MIT <https://GitHub.com/python/mypy/blob/master/LICENSE>`__ | *Not yet evaluated.* |
60+
| `mypy <https://GitHub.com/python/mypy>`__ |1.1.1 | `MIT <https://GitHub.com/python/mypy/blob/master/LICENSE>`__ | *Not yet evaluated.* |
6161
+-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
6262
| `lxml <https://GitHub.com/lxml/lxml>`__ | ≥4.9 | `BSD 3-Clause <https://GitHub.com/lxml/lxml/blob/master/LICENSE.txt>`__ | *Not yet evaluated.* |
6363
+-----------------------------------------------------------+-------------+----------------------------------------------------------------------------------------+----------------------+
@@ -89,9 +89,11 @@ the mandatory dependencies too.
8989
+=================================================================================================+==============+==========================================================================================================+======================+
9090
| `Sphinx <https://GitHub.com/sphinx-doc/sphinx>`__ | ≥5.3.0 | `BSD 3-Clause <https://GitHub.com/sphinx-doc/sphinx/blob/master/LICENSE>`__ | *Not yet evaluated.* |
9191
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
92-
| `sphinx_btd_theme <https://GitHub.com/buildthedocs/sphinx.theme>`__ | | `MIT <https://GitHub.com/buildthedocs/sphinx.theme/blob/master/LICENSE>`__ | *Not yet evaluated.* |
92+
| `sphinxcontrib-mermaid <https://GitHub.com/mgaitan/sphinxcontrib-mermaid>`__ | ≥0.8.1 | `BSD <https://GitHub.com/mgaitan/sphinxcontrib-mermaid/blob/master/LICENSE.rst>`__ | *Not yet evaluated.* |
93+
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
94+
| `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.* |
9395
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
94-
| `autoapi <https://GitHub.com/carlos-jenkins/autoapi>`__ | | `Apache License, 2.0 <https://GitHub.com/carlos-jenkins/autoapi/blob/master/LICENSE>`__ | *Not yet evaluated.* |
96+
| `sphinx_btd_theme <https://GitHub.com/buildthedocs/sphinx.theme>`__ | | `MIT <https://GitHub.com/buildthedocs/sphinx.theme/blob/master/LICENSE>`__ | *Not yet evaluated.* |
9597
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
9698
| !! `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.* |
9799
+-------------------------------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+----------------------+
@@ -123,7 +125,7 @@ install the mandatory dependencies too.
123125
+----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
124126
| **Package** | **Version** | **License** | **Dependencies** |
125127
+============================================================================+==============+==========================================================================================================+======================================================================================================================================================+
126-
| `pyTooling <https://GitHub.com/pyTooling/pyTooling>`__ |2.11.0 | `Apache License, 2.0 <https://GitHub.com/pyTooling/pyTooling/blob/main/LICENSE.md>`__ | *None* |
128+
| `pyTooling <https://GitHub.com/pyTooling/pyTooling>`__ |4.0.0 | `Apache License, 2.0 <https://GitHub.com/pyTooling/pyTooling/blob/main/LICENSE.md>`__ | *None* |
127129
+----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
128130
| `wheel <https://GitHub.com/pypa/wheel>`__ | ≥0.38.1 | `MIT <https://github.com/pypa/wheel/blob/main/LICENSE.txt>`__ | *Not yet evaluated.* |
129131
+----------------------------------------------------------------------------+--------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+

doc/LanguageModel/InterfaceItems.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ GenericConstantInterfaceItem
4444
4545
# inherited from Object
4646
@property
47-
def SubType(self) -> SubType:
47+
def Subtype(self) -> Subtype:
4848
4949
# inherited from WithDefaultExpressionMixin
5050
@property
@@ -156,7 +156,7 @@ PortSignalInterfaceItem
156156
157157
# inherited from Object
158158
@property
159-
def SubType(self) -> SubType:
159+
def Subtype(self) -> Subtype:
160160
161161
# inherited from WithDefaultExpressionMixin
162162
@property
@@ -198,7 +198,7 @@ ParameterConstantInterfaceItem
198198
199199
# inherited from Object
200200
@property
201-
def SubType(self) -> SubType:
201+
def Subtype(self) -> Subtype:
202202
203203
# inherited from WithDefaultExpressionMixin
204204
@property
@@ -235,7 +235,7 @@ ParameterVariableInterfaceItem
235235
236236
# inherited from Object
237237
@property
238-
def SubType(self) -> SubType:
238+
def Subtype(self) -> Subtype:
239239
240240
# inherited from WithDefaultExpressionMixin
241241
@property
@@ -272,7 +272,7 @@ ParameterSignalInterfaceItem
272272
273273
# inherited from Object
274274
@property
275-
def SubType(self) -> SubType:
275+
def Subtype(self) -> Subtype:
276276
277277
# inherited from WithDefaultExpressionMixin
278278
@property

doc/LanguageModel/ObjectDeclarations.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ a deferred constant. See :ref:`vhdlmodel-deferredconstant` in next section.
5353
5454
# inherited from Object
5555
@property
56-
def SubType(self) -> SubType:
56+
def Subtype(self) -> Subtype:
5757
5858
@property
5959
def DefaultExpression(self) -> BaseExpression:
@@ -84,7 +84,7 @@ a deferred constant has a reference to the *regular* constant of the same name.
8484
8585
# inherited from Object
8686
@property
87-
def SubType(self) -> SubType:
87+
def Subtype(self) -> Subtype:
8888
8989
# inherited from WithDefaultExpressionMixin
9090
@property
@@ -149,7 +149,7 @@ expression.
149149
150150
# inherited from Object
151151
@property
152-
def SubType(self) -> SubType:
152+
def Subtype(self) -> Subtype:
153153
154154
# inherited from WithDefaultExpressionMixin
155155
@property
@@ -211,7 +211,7 @@ assigned via a default expression.
211211
212212
# inherited from Object
213213
@property
214-
def SubType(self) -> SubType:
214+
def Subtype(self) -> Subtype:
215215
216216
# inherited from WithDefaultExpressionMixin
217217
@property

doc/LanguageModel/SubprogramDefinitions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Function
170170
171171
# from Function
172172
@property
173-
def ReturnType(self) -> SubType:
173+
def ReturnType(self) -> Subtype:
174174
175175
176176
@@ -222,7 +222,7 @@ Function as Method
222222
223223
# inherited from Function
224224
@property
225-
def ReturnType(self) -> SubType:
225+
def ReturnType(self) -> Subtype:
226226
227227
# inherited from Method
228228
@property

doc/LanguageModel/TypeDefinitions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Array
184184
def Dimensions(self) -> List[Range]:
185185
186186
@property
187-
def ElementType(self) -> SubType:
187+
def ElementType(self) -> Subtype:
188188
189189
190190

doc/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
-r ../requirements.txt
22

3-
pyTooling>=2.11.0
3+
pyTooling>=4.0.0, <5.0
44

55
# Enforce latest version on ReadTheDocs
66
sphinx>=5.3.0, <6.0
77

88
# Sphinx Extenstions
99
#sphinx.ext.coverage
1010
#sphinxcontrib-actdiag>=0.8.5
11-
sphinxcontrib-mermaid>=0.7.1
11+
sphinxcontrib-mermaid>=0.8.1
1212
#sphinxcontrib-seqdiag>=0.8.5
1313
#sphinxcontrib-textstyle>=0.2.1
1414
#sphinxcontrib-spelling>=2.2.0

pyVHDLModel/DesignUnit.py

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
from pyVHDLModel.Namespace import Namespace
4545
from pyVHDLModel.Symbol import Symbol, PackageSymbol, EntitySymbol
4646
from pyVHDLModel.Interface import GenericInterfaceItem, PortInterfaceItem
47-
from pyVHDLModel.Subprogram import Procedure, Function
48-
from pyVHDLModel.Object import Constant, Variable, Signal
47+
from pyVHDLModel.Subprogram import Procedure, Function, Subprogram
48+
from pyVHDLModel.Object import Constant, Variable, SharedVariable, Signal, File
4949
from pyVHDLModel.Type import Type, Subtype
5050
from pyVHDLModel.Concurrent import ConcurrentStatement, ConcurrentStatements, ConcurrentDeclarations
5151

@@ -108,8 +108,8 @@ class DesignUnit(ModelEntity, NamedEntityMixin, DocumentedEntityMixin):
108108
_referencedPackages: Dict[str, Dict[str, 'Package']] #: Referenced packages based on explicit use clauses or implicit inheritance
109109
_referencedContexts: Dict[str, 'Context'] #: Referenced contexts based on explicit context references or implicit inheritance
110110

111-
_dependencyVertex: Vertex[str, 'DesignUnit', None, None] #: The vertex in the dependency graph
112-
_hierarchyVertex: Vertex[str, 'DesignUnit', None, None] #: The vertex in the hierarchy graph
111+
_dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None] #: The vertex in the dependency graph
112+
_hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None] #: The vertex in the hierarchy graph
113113

114114
_namespace: 'Namespace'
115115

@@ -312,12 +312,15 @@ def __init__(self, identifier: str, contextItems: Iterable['Context'] = None, ge
312312
self._declaredItems.append(item)
313313
item._parent = self
314314

315-
self._types = {}
316-
self._objects = {}
317-
self._constants = {}
318-
self._functions = {}
319-
self._procedures = {}
320-
self._components = {}
315+
self._types = {}
316+
self._objects = {}
317+
self._constants = {}
318+
self._sharedVariables = {}
319+
self._signals = {}
320+
self._subprograms = {}
321+
self._functions = {}
322+
self._procedures = {}
323+
self._components = {}
321324

322325
@property
323326
def GenericItems(self) -> List[GenericInterfaceItem]:
@@ -327,6 +330,30 @@ def GenericItems(self) -> List[GenericInterfaceItem]:
327330
def DeclaredItems(self) -> List:
328331
return self._declaredItems
329332

333+
@property
334+
def Types(self) -> Dict[str, Union[Type, Subtype]]:
335+
return self._types
336+
337+
@property
338+
def Objects(self) -> Dict[str, Union[Constant, SharedVariable, Signal, File]]:
339+
return self._objects
340+
341+
@property
342+
def Constants(self) -> Dict[str, Constant]:
343+
return self._constants
344+
345+
@property
346+
def Subprograms(self) -> Dict[str, Subprogram]:
347+
return self._subprograms
348+
349+
@property
350+
def Functions(self) -> Dict[str, Dict[str, Function]]:
351+
return self._functions
352+
353+
@property
354+
def Procedures(self) -> Dict[str, Dict[str, Procedure]]:
355+
return self._procedures
356+
330357
# TODO: move into __init__ ?
331358
# TODO: share with architecture and block statement?
332359
def IndexPackage(self):
@@ -448,10 +475,12 @@ def __init__(
448475

449476
self._architectures = {}
450477

478+
# TODO: extract to mixin for generics
451479
@property
452480
def GenericItems(self) -> List[GenericInterfaceItem]:
453481
return self._genericItems
454482

483+
# TODO: extract to mixin for ports
455484
@property
456485
def PortItems(self) -> List[PortInterfaceItem]:
457486
return self._portItems

pyVHDLModel/Subprogram.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545

4646
@export
47-
class SubProgramm(ModelEntity, NamedEntityMixin, DocumentedEntityMixin):
47+
class Subprogram(ModelEntity, NamedEntityMixin, DocumentedEntityMixin):
4848
_genericItems: List['GenericInterfaceItem']
4949
_parameterItems: List['ParameterInterfaceItem']
5050
_declaredItems: List
@@ -83,12 +83,14 @@ def IsPure(self) -> bool:
8383

8484

8585
@export
86-
class Procedure(SubProgramm):
87-
_isPure: bool = False
86+
class Procedure(Subprogram):
87+
def __init__(self, identifier: str, documentation: str = None):
88+
super().__init__(identifier, documentation)
89+
self._isPure = False
8890

8991

9092
@export
91-
class Function(SubProgramm):
93+
class Function(Subprogram):
9294
_returnType: Subtype
9395

9496
def __init__(self, identifier: str, isPure: bool = True, documentation: str = None):

0 commit comments

Comments
 (0)