pyVHDLModel 0.35.0__tar.gz → 0.36.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/PKG-INFO +24 -24
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Instantiation.py +15 -3
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/__init__.py +116 -11
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel.egg-info/PKG-INFO +24 -24
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel.egg-info/requires.txt +23 -23
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyproject.toml +2 -2
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/LICENSE.md +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/README.md +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Association.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Base.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Common.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Concurrent.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Declaration.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/DesignUnit.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Exception.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Expression.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/IEEE.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Interface.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Name.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Namespace.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Object.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/PSLModel.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Predefined.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Regions.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/STD.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Sequential.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Subprogram.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Symbol.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/Type.py +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel/py.typed +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel.egg-info/SOURCES.txt +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel.egg-info/dependency_links.txt +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/pyVHDLModel.egg-info/top_level.txt +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/setup.cfg +0 -0
- {pyvhdlmodel-0.35.0 → pyvhdlmodel-0.36.0}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyVHDLModel
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.36.0
|
|
4
4
|
Summary: An abstract VHDL language model.
|
|
5
5
|
Home-page: https://GitHub.com/VHDL/pyVHDLModel
|
|
6
6
|
Author: Patrick Lehmann
|
|
@@ -26,43 +26,43 @@ Classifier: Development Status :: 4 - Beta
|
|
|
26
26
|
Requires-Python: >=3.11
|
|
27
27
|
Description-Content-Type: text/markdown
|
|
28
28
|
License-File: LICENSE.md
|
|
29
|
-
Requires-Dist: pyTooling~=8.
|
|
29
|
+
Requires-Dist: pyTooling~=8.15
|
|
30
30
|
Provides-Extra: doc
|
|
31
|
-
Requires-Dist:
|
|
32
|
-
Requires-Dist: sphinx-copybutton>=0.5.2; extra == "doc"
|
|
33
|
-
Requires-Dist: docutils_stubs~=0.0.22; extra == "doc"
|
|
31
|
+
Requires-Dist: sphinx_autodoc_typehints~=3.11; extra == "doc"
|
|
34
32
|
Requires-Dist: sphinx~=9.1; extra == "doc"
|
|
35
|
-
Requires-Dist:
|
|
33
|
+
Requires-Dist: pyTooling~=8.15; extra == "doc"
|
|
34
|
+
Requires-Dist: sphinx_design~=0.7.0; extra == "doc"
|
|
35
|
+
Requires-Dist: sphinxcontrib-mermaid~=2.0; extra == "doc"
|
|
36
36
|
Requires-Dist: sphinx_reports~=0.11.0; extra == "doc"
|
|
37
|
-
Requires-Dist: sphinx_autodoc_typehints~=3.11; extra == "doc"
|
|
38
37
|
Requires-Dist: sphinx_rtd_theme~=3.1; extra == "doc"
|
|
39
|
-
Requires-Dist:
|
|
40
|
-
Requires-Dist:
|
|
38
|
+
Requires-Dist: docutils_stubs~=0.0.22; extra == "doc"
|
|
39
|
+
Requires-Dist: autoapi>=2.0.1; extra == "doc"
|
|
40
|
+
Requires-Dist: sphinx-copybutton>=0.5.2; extra == "doc"
|
|
41
41
|
Provides-Extra: test
|
|
42
|
+
Requires-Dist: lxml<7.0,>=6.1; extra == "test"
|
|
43
|
+
Requires-Dist: mypy[reports]~=2.1; extra == "test"
|
|
42
44
|
Requires-Dist: pytest~=9.0; extra == "test"
|
|
45
|
+
Requires-Dist: pyTooling~=8.15; extra == "test"
|
|
43
46
|
Requires-Dist: pytest-cov~=7.1; extra == "test"
|
|
44
|
-
Requires-Dist: Coverage~=7.14; extra == "test"
|
|
45
47
|
Requires-Dist: typing_extensions~=4.15; extra == "test"
|
|
46
|
-
Requires-Dist:
|
|
47
|
-
Requires-Dist: mypy[reports]~=1.19; extra == "test"
|
|
48
|
-
Requires-Dist: pyTooling~=8.14; extra == "test"
|
|
48
|
+
Requires-Dist: Coverage~=7.14; extra == "test"
|
|
49
49
|
Provides-Extra: all
|
|
50
|
+
Requires-Dist: lxml<7.0,>=6.1; extra == "all"
|
|
51
|
+
Requires-Dist: sphinx_autodoc_typehints~=3.11; extra == "all"
|
|
52
|
+
Requires-Dist: sphinx~=9.1; extra == "all"
|
|
53
|
+
Requires-Dist: mypy[reports]~=2.1; extra == "all"
|
|
50
54
|
Requires-Dist: pytest~=9.0; extra == "all"
|
|
55
|
+
Requires-Dist: pyTooling~=8.15; extra == "all"
|
|
51
56
|
Requires-Dist: sphinx_design~=0.7.0; extra == "all"
|
|
52
|
-
Requires-Dist:
|
|
53
|
-
Requires-Dist:
|
|
57
|
+
Requires-Dist: sphinxcontrib-mermaid~=2.0; extra == "all"
|
|
58
|
+
Requires-Dist: sphinx_reports~=0.11.0; extra == "all"
|
|
54
59
|
Requires-Dist: pytest-cov~=7.1; extra == "all"
|
|
55
|
-
Requires-Dist:
|
|
56
|
-
Requires-Dist:
|
|
57
|
-
Requires-Dist: mypy[reports]~=1.19; extra == "all"
|
|
60
|
+
Requires-Dist: sphinx_rtd_theme~=3.1; extra == "all"
|
|
61
|
+
Requires-Dist: docutils_stubs~=0.0.22; extra == "all"
|
|
58
62
|
Requires-Dist: autoapi>=2.0.1; extra == "all"
|
|
59
63
|
Requires-Dist: typing_extensions~=4.15; extra == "all"
|
|
60
|
-
Requires-Dist:
|
|
61
|
-
Requires-Dist:
|
|
62
|
-
Requires-Dist: sphinx_autodoc_typehints~=3.11; extra == "all"
|
|
63
|
-
Requires-Dist: sphinx_rtd_theme~=3.1; extra == "all"
|
|
64
|
-
Requires-Dist: sphinxcontrib-mermaid~=2.0; extra == "all"
|
|
65
|
-
Requires-Dist: pyTooling~=8.14; extra == "all"
|
|
64
|
+
Requires-Dist: sphinx-copybutton>=0.5.2; extra == "all"
|
|
65
|
+
Requires-Dist: Coverage~=7.14; extra == "all"
|
|
66
66
|
Dynamic: author
|
|
67
67
|
Dynamic: author-email
|
|
68
68
|
Dynamic: classifier
|
|
@@ -39,8 +39,9 @@ from typing import List, Optional as Nullable
|
|
|
39
39
|
from pyTooling.Decorators import export, readonly
|
|
40
40
|
from pyTooling.MetaClasses import ExtendedType
|
|
41
41
|
|
|
42
|
+
from pyVHDLModel import VHDLModelException
|
|
42
43
|
from pyVHDLModel.Base import ModelEntity
|
|
43
|
-
from pyVHDLModel.DesignUnit import
|
|
44
|
+
from pyVHDLModel.DesignUnit import Package
|
|
44
45
|
from pyVHDLModel.Association import GenericAssociationItem
|
|
45
46
|
from pyVHDLModel.Subprogram import Procedure, Function, Subprogram
|
|
46
47
|
from pyVHDLModel.Symbol import PackageReferenceSymbol
|
|
@@ -78,12 +79,12 @@ class FunctionInstantiation(Function, SubprogramInstantiationMixin):
|
|
|
78
79
|
|
|
79
80
|
|
|
80
81
|
@export
|
|
81
|
-
class PackageInstantiation(
|
|
82
|
+
class PackageInstantiation(Package, GenericInstantiationMixin): # TODO: maybe a PackageBase class is needed to share members.
|
|
82
83
|
_packageReference: PackageReferenceSymbol
|
|
83
84
|
_genericAssociations: List[GenericAssociationItem]
|
|
84
85
|
|
|
85
86
|
def __init__(self, identifier: str, uninstantiatedPackage: PackageReferenceSymbol, documentation: Nullable[str] = None, parent: Nullable[ModelEntity] = None) -> None:
|
|
86
|
-
super().__init__(identifier, documentation, parent)
|
|
87
|
+
super().__init__(identifier, documentation=documentation, parent=parent)
|
|
87
88
|
GenericEntityInstantiationMixin.__init__(self)
|
|
88
89
|
|
|
89
90
|
self._packageReference = uninstantiatedPackage
|
|
@@ -99,3 +100,14 @@ class PackageInstantiation(PrimaryUnit, GenericInstantiationMixin):
|
|
|
99
100
|
@readonly
|
|
100
101
|
def GenericAssociations(self) -> List[GenericAssociationItem]:
|
|
101
102
|
return self._genericAssociations
|
|
103
|
+
|
|
104
|
+
def Instantiate(self):
|
|
105
|
+
genericPackage: Package = self._packageReference.Package
|
|
106
|
+
if genericPackage is None:
|
|
107
|
+
raise VHDLModelException(f"PackageInstantiation '{self.Identifier}' isn't linked to the generic package '{self._packageReference.Name}'.")
|
|
108
|
+
|
|
109
|
+
# TODO: components might need to be copied and derived
|
|
110
|
+
for componentName, component in genericPackage._components.items():
|
|
111
|
+
self._components[componentName] = component
|
|
112
|
+
|
|
113
|
+
# FIXME: handle other package members
|
|
@@ -48,7 +48,7 @@ __author__ = "Patrick Lehmann"
|
|
|
48
48
|
__email__ = "Paebbels@gmail.com"
|
|
49
49
|
__copyright__ = "2016-2026, Patrick Lehmann"
|
|
50
50
|
__license__ = "Apache License, Version 2.0"
|
|
51
|
-
__version__ = "0.
|
|
51
|
+
__version__ = "0.36.0"
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
from enum import unique, Enum, Flag, auto
|
|
@@ -426,6 +426,8 @@ class DependencyGraphEdgeKind(Flag):
|
|
|
426
426
|
ComponentInstantiation = Component | Instantiation
|
|
427
427
|
ConfigurationInstantiation = Configuration | Instantiation
|
|
428
428
|
|
|
429
|
+
PackageInstantiation = Package | Instantiation
|
|
430
|
+
|
|
429
431
|
|
|
430
432
|
@export
|
|
431
433
|
@unique
|
|
@@ -857,19 +859,21 @@ class Design(ModelEntity, AllowBlackboxMixin):
|
|
|
857
859
|
|rarr| :meth:`LinkArchitectures`
|
|
858
860
|
7. Link all package bodies. |br|
|
|
859
861
|
|rarr| :meth:`LinkPackageBodies`
|
|
860
|
-
8. Link all
|
|
862
|
+
8. Link all package instances. |br|
|
|
863
|
+
|rarr| :meth:`LinkPackageInstances`
|
|
864
|
+
9. Link all library references. |br|
|
|
861
865
|
|rarr| :meth:`LinkLibraryReferences`
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
866
|
+
10. Link all package references. |br|
|
|
867
|
+
|rarr| :meth:`LinkPackageReferences`
|
|
868
|
+
11. Link all context references. |br|
|
|
865
869
|
|rarr| :meth:`LinkContextReferences`
|
|
866
|
-
|
|
870
|
+
12. Link all components. |br|
|
|
867
871
|
|rarr| :meth:`LinkComponents`
|
|
868
|
-
|
|
872
|
+
13. Link all instantiations. |br|
|
|
869
873
|
|rarr| :meth:`LinkInstantiations`
|
|
870
|
-
|
|
874
|
+
14. Create the hierarchy graph. |br|
|
|
871
875
|
|rarr| :meth:`CreateHierarchyGraph`
|
|
872
|
-
|
|
876
|
+
15. Compute the compile order. |br|
|
|
873
877
|
|rarr| :meth:`ComputeCompileOrder`
|
|
874
878
|
"""
|
|
875
879
|
self.CreateDependencyGraph()
|
|
@@ -881,6 +885,7 @@ class Design(ModelEntity, AllowBlackboxMixin):
|
|
|
881
885
|
self.LinkContexts()
|
|
882
886
|
self.LinkArchitectures()
|
|
883
887
|
self.LinkPackageBodies()
|
|
888
|
+
self.LinkPackageInstances()
|
|
884
889
|
self.LinkLibraryReferences()
|
|
885
890
|
self.LinkPackageReferences()
|
|
886
891
|
self.LinkContextReferences()
|
|
@@ -1303,6 +1308,7 @@ class Design(ModelEntity, AllowBlackboxMixin):
|
|
|
1303
1308
|
except KeyError:
|
|
1304
1309
|
raise VHDLModelException(f"Package '{packageName._identifier}' not found in {'working ' if libraryName._normalizedIdentifier == 'work' else ''}library '{library._identifier}'.")
|
|
1305
1310
|
|
|
1311
|
+
# FIXME: check if package isn't a generic package
|
|
1306
1312
|
symbol.Package = package
|
|
1307
1313
|
|
|
1308
1314
|
# TODO: warn duplicate package reference
|
|
@@ -1345,6 +1351,8 @@ class Design(ModelEntity, AllowBlackboxMixin):
|
|
|
1345
1351
|
|
|
1346
1352
|
:meth:`LinkPackageBodies`
|
|
1347
1353
|
Link all package bodies to corresponding packages in all libraries.
|
|
1354
|
+
:meth:`LinkPackageInstances`
|
|
1355
|
+
Link all package instances to corresponding generic packages in all libraries.
|
|
1348
1356
|
"""
|
|
1349
1357
|
for library in self._libraries.values():
|
|
1350
1358
|
library.LinkArchitectures()
|
|
@@ -1370,10 +1378,41 @@ class Design(ModelEntity, AllowBlackboxMixin):
|
|
|
1370
1378
|
|
|
1371
1379
|
:meth:`LinkArchitectures`
|
|
1372
1380
|
Link all architectures to corresponding entities in all libraries.
|
|
1381
|
+
:meth:`LinkPackageInstances`
|
|
1382
|
+
Link all package instances to corresponding generic packages in all libraries.
|
|
1373
1383
|
"""
|
|
1374
1384
|
for library in self._libraries.values():
|
|
1375
1385
|
library.LinkPackageBodies()
|
|
1376
1386
|
|
|
1387
|
+
def LinkPackageInstances(self) -> None:
|
|
1388
|
+
"""
|
|
1389
|
+
Link all package instances to corresponding generic packages in all libraries.
|
|
1390
|
+
|
|
1391
|
+
.. rubric:: Algorithm
|
|
1392
|
+
|
|
1393
|
+
1. Iterate all libraries:
|
|
1394
|
+
|
|
1395
|
+
1. Iterate all package instances.
|
|
1396
|
+
|rarr| :meth:`pyVHDLModel.Library.LinkPackageInstances`
|
|
1397
|
+
|
|
1398
|
+
.. todo::
|
|
1399
|
+
|
|
1400
|
+
* Check if package instance's symbol's name exists as a generic package in this library.
|
|
1401
|
+
* Add generic package to package instance :attr:`pyVHDLModel.DesignUnit.Package._packageBody`.
|
|
1402
|
+
* Assign found package to package body's package symbol :attr:`pyVHDLModel.DesignUnit.PackageBody._package`
|
|
1403
|
+
* Set parent namespace of package body's namespace to the package's namespace.
|
|
1404
|
+
* Add an edge in the dependency graph from the package body's corresponding dependency vertex to the package's corresponding dependency vertex.
|
|
1405
|
+
|
|
1406
|
+
.. seealso::
|
|
1407
|
+
|
|
1408
|
+
:meth:`LinkArchitectures`
|
|
1409
|
+
Link all architectures to corresponding entities in all libraries.
|
|
1410
|
+
:meth:`LinkPackageBodies`
|
|
1411
|
+
Link all package bodies to corresponding packages in all libraries.
|
|
1412
|
+
"""
|
|
1413
|
+
for library in self._libraries.values():
|
|
1414
|
+
library.LinkPackageInstances()
|
|
1415
|
+
|
|
1377
1416
|
def LinkLibraryReferences(self) -> None:
|
|
1378
1417
|
"""
|
|
1379
1418
|
Link all library references (library clause) to the matching VHDL library.
|
|
@@ -1628,6 +1667,7 @@ class Design(ModelEntity, AllowBlackboxMixin):
|
|
|
1628
1667
|
ex.add_note(f"Caused in design unit '{designUnit}' in file '{designUnit.Document}'.")
|
|
1629
1668
|
raise ex
|
|
1630
1669
|
|
|
1670
|
+
# FIXME: check if package isn't a generic package
|
|
1631
1671
|
packageMemberSymbol.Package = package
|
|
1632
1672
|
|
|
1633
1673
|
# TODO: warn duplicate package reference
|
|
@@ -2286,6 +2326,8 @@ class Library(ModelEntity, NamedEntityMixin, AllowBlackboxMixin):
|
|
|
2286
2326
|
|
|
2287
2327
|
:meth:`LinkPackageBodies`
|
|
2288
2328
|
Link all package bodies to corresponding packages.
|
|
2329
|
+
:meth:`LinkPackageInstances`
|
|
2330
|
+
Link all package instances to corresponding generic packages.
|
|
2289
2331
|
"""
|
|
2290
2332
|
for entityName, architecturesPerEntity in self._architectures.items():
|
|
2291
2333
|
if entityName not in self._entities:
|
|
@@ -2328,6 +2370,8 @@ class Library(ModelEntity, NamedEntityMixin, AllowBlackboxMixin):
|
|
|
2328
2370
|
|
|
2329
2371
|
:meth:`LinkArchitectures`
|
|
2330
2372
|
Link all architectures to corresponding entities.
|
|
2373
|
+
:meth:`LinkPackageInstances`
|
|
2374
|
+
Link all package instances to corresponding generic packages.
|
|
2331
2375
|
"""
|
|
2332
2376
|
for packageBodyName, packageBody in self._packageBodies.items():
|
|
2333
2377
|
if packageBodyName not in self._packages:
|
|
@@ -2342,6 +2386,69 @@ class Library(ModelEntity, NamedEntityMixin, AllowBlackboxMixin):
|
|
|
2342
2386
|
dependency = packageBody._dependencyVertex.EdgeToVertex(package._dependencyVertex)
|
|
2343
2387
|
dependency["kind"] = DependencyGraphEdgeKind.PackageImplementation
|
|
2344
2388
|
|
|
2389
|
+
def LinkPackageInstances(self) -> None:
|
|
2390
|
+
"""
|
|
2391
|
+
Link all package instances to corresponding generic packages.
|
|
2392
|
+
|
|
2393
|
+
.. rubric:: Algorithm
|
|
2394
|
+
|
|
2395
|
+
1. Iterate all package instances.
|
|
2396
|
+
|
|
2397
|
+
.. todo::
|
|
2398
|
+
|
|
2399
|
+
* Check if package body symbol's name exists as a package in this library.
|
|
2400
|
+
* Add package body to package :attr:`pyVHDLModel.DesignUnit.Package._packageBody`.
|
|
2401
|
+
* Assign found package to package body's package symbol :attr:`pyVHDLModel.DesignUnit.PackageBody._package`
|
|
2402
|
+
* Set parent namespace of package body's namespace to the package's namespace.
|
|
2403
|
+
* Add an edge in the dependency graph from the package body's corresponding dependency vertex to the package's corresponding dependency vertex.
|
|
2404
|
+
|
|
2405
|
+
:raises VHDLModelException: If generic package name doesn't exist.
|
|
2406
|
+
|
|
2407
|
+
.. seealso::
|
|
2408
|
+
|
|
2409
|
+
:meth:`LinkArchitectures`
|
|
2410
|
+
Link all architectures to corresponding entities.
|
|
2411
|
+
:meth:`LinkPackageBodies`
|
|
2412
|
+
Link all package bodies to corresponding packages.
|
|
2413
|
+
"""
|
|
2414
|
+
for packageInstanceName, packageInstance in self._packages.items():
|
|
2415
|
+
if isinstance(packageInstance, PackageInstantiation):
|
|
2416
|
+
packageSymbol = packageInstance._packageReference
|
|
2417
|
+
packageName = packageSymbol.Name
|
|
2418
|
+
libraryName = packageName.Prefix
|
|
2419
|
+
|
|
2420
|
+
libraryIdentifier = libraryName.NormalizedIdentifier
|
|
2421
|
+
packageIdentifier = packageName.NormalizedIdentifier
|
|
2422
|
+
|
|
2423
|
+
# In case work is used, resolve to the real library name.
|
|
2424
|
+
if libraryIdentifier == "work":
|
|
2425
|
+
library: Library = self
|
|
2426
|
+
libraryIdentifier = library.NormalizedIdentifier
|
|
2427
|
+
elif libraryIdentifier not in self._parent._libraries:
|
|
2428
|
+
# TODO: This check doesn't trigger if it's the working library.
|
|
2429
|
+
raise VHDLModelException(f"Package instantiation of '{packageInstanceName}' references library '{libraryName.Identifier}', which cannot be found in design.")
|
|
2430
|
+
else:
|
|
2431
|
+
library = self._parent._libraries[libraryIdentifier]
|
|
2432
|
+
|
|
2433
|
+
try:
|
|
2434
|
+
package = library._packages[packageIdentifier]
|
|
2435
|
+
except KeyError:
|
|
2436
|
+
ex = VHDLModelException(
|
|
2437
|
+
f"Package '{packageName.Identifier}' not found in {'working ' if libraryName.NormalizedIdentifier == 'work' else ''}library '{library.Identifier}'.")
|
|
2438
|
+
ex.add_note(f"Caused in library '{self}' in file '{packageInstance.Document}'.")
|
|
2439
|
+
raise ex
|
|
2440
|
+
|
|
2441
|
+
# FIXME: check if package is a generic package
|
|
2442
|
+
if package.GenericCount == 0:
|
|
2443
|
+
raise VHDLModelException(f"Package '{libraryName.Identifier}.{packageName.Identifier}' referenced by '{self._identifier}.{packageInstanceName}' is not a generic package.")
|
|
2444
|
+
|
|
2445
|
+
packageSymbol.Package = package
|
|
2446
|
+
|
|
2447
|
+
dependency = packageInstance._dependencyVertex.EdgeToVertex(package._dependencyVertex) # , edgeValue=packageReference)
|
|
2448
|
+
dependency["kind"] = DependencyGraphEdgeKind.PackageInstantiation
|
|
2449
|
+
|
|
2450
|
+
packageInstance.Instantiate()
|
|
2451
|
+
|
|
2345
2452
|
def IndexPackages(self) -> None:
|
|
2346
2453
|
"""
|
|
2347
2454
|
Index declared items in all packages.
|
|
@@ -2365,8 +2472,6 @@ class Library(ModelEntity, NamedEntityMixin, AllowBlackboxMixin):
|
|
|
2365
2472
|
for package in self._packages.values():
|
|
2366
2473
|
if isinstance(package, Package):
|
|
2367
2474
|
package.IndexDeclaredItems()
|
|
2368
|
-
elif isinstance(package, PackageInstantiation):
|
|
2369
|
-
pass
|
|
2370
2475
|
|
|
2371
2476
|
def IndexPackageBodies(self) -> None:
|
|
2372
2477
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyVHDLModel
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.36.0
|
|
4
4
|
Summary: An abstract VHDL language model.
|
|
5
5
|
Home-page: https://GitHub.com/VHDL/pyVHDLModel
|
|
6
6
|
Author: Patrick Lehmann
|
|
@@ -26,43 +26,43 @@ Classifier: Development Status :: 4 - Beta
|
|
|
26
26
|
Requires-Python: >=3.11
|
|
27
27
|
Description-Content-Type: text/markdown
|
|
28
28
|
License-File: LICENSE.md
|
|
29
|
-
Requires-Dist: pyTooling~=8.
|
|
29
|
+
Requires-Dist: pyTooling~=8.15
|
|
30
30
|
Provides-Extra: doc
|
|
31
|
-
Requires-Dist:
|
|
32
|
-
Requires-Dist: sphinx-copybutton>=0.5.2; extra == "doc"
|
|
33
|
-
Requires-Dist: docutils_stubs~=0.0.22; extra == "doc"
|
|
31
|
+
Requires-Dist: sphinx_autodoc_typehints~=3.11; extra == "doc"
|
|
34
32
|
Requires-Dist: sphinx~=9.1; extra == "doc"
|
|
35
|
-
Requires-Dist:
|
|
33
|
+
Requires-Dist: pyTooling~=8.15; extra == "doc"
|
|
34
|
+
Requires-Dist: sphinx_design~=0.7.0; extra == "doc"
|
|
35
|
+
Requires-Dist: sphinxcontrib-mermaid~=2.0; extra == "doc"
|
|
36
36
|
Requires-Dist: sphinx_reports~=0.11.0; extra == "doc"
|
|
37
|
-
Requires-Dist: sphinx_autodoc_typehints~=3.11; extra == "doc"
|
|
38
37
|
Requires-Dist: sphinx_rtd_theme~=3.1; extra == "doc"
|
|
39
|
-
Requires-Dist:
|
|
40
|
-
Requires-Dist:
|
|
38
|
+
Requires-Dist: docutils_stubs~=0.0.22; extra == "doc"
|
|
39
|
+
Requires-Dist: autoapi>=2.0.1; extra == "doc"
|
|
40
|
+
Requires-Dist: sphinx-copybutton>=0.5.2; extra == "doc"
|
|
41
41
|
Provides-Extra: test
|
|
42
|
+
Requires-Dist: lxml<7.0,>=6.1; extra == "test"
|
|
43
|
+
Requires-Dist: mypy[reports]~=2.1; extra == "test"
|
|
42
44
|
Requires-Dist: pytest~=9.0; extra == "test"
|
|
45
|
+
Requires-Dist: pyTooling~=8.15; extra == "test"
|
|
43
46
|
Requires-Dist: pytest-cov~=7.1; extra == "test"
|
|
44
|
-
Requires-Dist: Coverage~=7.14; extra == "test"
|
|
45
47
|
Requires-Dist: typing_extensions~=4.15; extra == "test"
|
|
46
|
-
Requires-Dist:
|
|
47
|
-
Requires-Dist: mypy[reports]~=1.19; extra == "test"
|
|
48
|
-
Requires-Dist: pyTooling~=8.14; extra == "test"
|
|
48
|
+
Requires-Dist: Coverage~=7.14; extra == "test"
|
|
49
49
|
Provides-Extra: all
|
|
50
|
+
Requires-Dist: lxml<7.0,>=6.1; extra == "all"
|
|
51
|
+
Requires-Dist: sphinx_autodoc_typehints~=3.11; extra == "all"
|
|
52
|
+
Requires-Dist: sphinx~=9.1; extra == "all"
|
|
53
|
+
Requires-Dist: mypy[reports]~=2.1; extra == "all"
|
|
50
54
|
Requires-Dist: pytest~=9.0; extra == "all"
|
|
55
|
+
Requires-Dist: pyTooling~=8.15; extra == "all"
|
|
51
56
|
Requires-Dist: sphinx_design~=0.7.0; extra == "all"
|
|
52
|
-
Requires-Dist:
|
|
53
|
-
Requires-Dist:
|
|
57
|
+
Requires-Dist: sphinxcontrib-mermaid~=2.0; extra == "all"
|
|
58
|
+
Requires-Dist: sphinx_reports~=0.11.0; extra == "all"
|
|
54
59
|
Requires-Dist: pytest-cov~=7.1; extra == "all"
|
|
55
|
-
Requires-Dist:
|
|
56
|
-
Requires-Dist:
|
|
57
|
-
Requires-Dist: mypy[reports]~=1.19; extra == "all"
|
|
60
|
+
Requires-Dist: sphinx_rtd_theme~=3.1; extra == "all"
|
|
61
|
+
Requires-Dist: docutils_stubs~=0.0.22; extra == "all"
|
|
58
62
|
Requires-Dist: autoapi>=2.0.1; extra == "all"
|
|
59
63
|
Requires-Dist: typing_extensions~=4.15; extra == "all"
|
|
60
|
-
Requires-Dist:
|
|
61
|
-
Requires-Dist:
|
|
62
|
-
Requires-Dist: sphinx_autodoc_typehints~=3.11; extra == "all"
|
|
63
|
-
Requires-Dist: sphinx_rtd_theme~=3.1; extra == "all"
|
|
64
|
-
Requires-Dist: sphinxcontrib-mermaid~=2.0; extra == "all"
|
|
65
|
-
Requires-Dist: pyTooling~=8.14; extra == "all"
|
|
64
|
+
Requires-Dist: sphinx-copybutton>=0.5.2; extra == "all"
|
|
65
|
+
Requires-Dist: Coverage~=7.14; extra == "all"
|
|
66
66
|
Dynamic: author
|
|
67
67
|
Dynamic: author-email
|
|
68
68
|
Dynamic: classifier
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
pyTooling~=8.
|
|
1
|
+
pyTooling~=8.15
|
|
2
2
|
|
|
3
3
|
[all]
|
|
4
|
+
lxml<7.0,>=6.1
|
|
5
|
+
sphinx_autodoc_typehints~=3.11
|
|
6
|
+
sphinx~=9.1
|
|
7
|
+
mypy[reports]~=2.1
|
|
4
8
|
pytest~=9.0
|
|
9
|
+
pyTooling~=8.15
|
|
5
10
|
sphinx_design~=0.7.0
|
|
6
|
-
|
|
7
|
-
|
|
11
|
+
sphinxcontrib-mermaid~=2.0
|
|
12
|
+
sphinx_reports~=0.11.0
|
|
8
13
|
pytest-cov~=7.1
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
mypy[reports]~=1.19
|
|
14
|
+
sphinx_rtd_theme~=3.1
|
|
15
|
+
docutils_stubs~=0.0.22
|
|
12
16
|
autoapi>=2.0.1
|
|
13
17
|
typing_extensions~=4.15
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
sphinx_autodoc_typehints~=3.11
|
|
17
|
-
sphinx_rtd_theme~=3.1
|
|
18
|
-
sphinxcontrib-mermaid~=2.0
|
|
19
|
-
pyTooling~=8.14
|
|
18
|
+
sphinx-copybutton>=0.5.2
|
|
19
|
+
Coverage~=7.14
|
|
20
20
|
|
|
21
21
|
[doc]
|
|
22
|
-
|
|
23
|
-
sphinx-copybutton>=0.5.2
|
|
24
|
-
docutils_stubs~=0.0.22
|
|
22
|
+
sphinx_autodoc_typehints~=3.11
|
|
25
23
|
sphinx~=9.1
|
|
26
|
-
|
|
24
|
+
pyTooling~=8.15
|
|
25
|
+
sphinx_design~=0.7.0
|
|
26
|
+
sphinxcontrib-mermaid~=2.0
|
|
27
27
|
sphinx_reports~=0.11.0
|
|
28
|
-
sphinx_autodoc_typehints~=3.11
|
|
29
28
|
sphinx_rtd_theme~=3.1
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
docutils_stubs~=0.0.22
|
|
30
|
+
autoapi>=2.0.1
|
|
31
|
+
sphinx-copybutton>=0.5.2
|
|
32
32
|
|
|
33
33
|
[test]
|
|
34
|
+
lxml<7.0,>=6.1
|
|
35
|
+
mypy[reports]~=2.1
|
|
34
36
|
pytest~=9.0
|
|
37
|
+
pyTooling~=8.15
|
|
35
38
|
pytest-cov~=7.1
|
|
36
|
-
Coverage~=7.14
|
|
37
39
|
typing_extensions~=4.15
|
|
38
|
-
|
|
39
|
-
mypy[reports]~=1.19
|
|
40
|
-
pyTooling~=8.14
|
|
40
|
+
Coverage~=7.14
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[build-system]
|
|
2
2
|
requires = [
|
|
3
3
|
"setuptools >= 82.0",
|
|
4
|
-
"pyTooling ~= 8.
|
|
4
|
+
"pyTooling ~= 8.15"
|
|
5
5
|
]
|
|
6
6
|
build-backend = "setuptools.build_meta"
|
|
7
7
|
|
|
@@ -25,7 +25,7 @@ variable-naming-style = "camelCase"
|
|
|
25
25
|
|
|
26
26
|
[tool.mypy]
|
|
27
27
|
packages = ["pyVHDLModel"]
|
|
28
|
-
python_version = "3.
|
|
28
|
+
python_version = "3.14"
|
|
29
29
|
#ignore_missing_imports = true
|
|
30
30
|
strict = true
|
|
31
31
|
pretty = true
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|