pyEDAA.ProjectModel 0.4.3__tar.gz → 0.5.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.
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/PKG-INFO +48 -5
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/Altera/Quartus.py +1 -1
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/Altera/__init__.py +1 -1
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/Attributes.py +2 -2
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/GHDL.py +1 -1
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/Intel/QuartusPrime.py +1 -1
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/Intel/__init__.py +1 -1
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/MentorGraphics/ModelSim.py +1 -1
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/MentorGraphics/QuestaSim.py +1 -1
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/MentorGraphics/__init__.py +1 -1
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/OSVVM.py +7 -7
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/Verilog.py +1 -1
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/Xilinx/ISE.py +1 -1
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/Xilinx/Vivado.py +23 -24
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/Xilinx/__init__.py +1 -1
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/__init__.py +535 -166
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA.ProjectModel.egg-info/PKG-INFO +48 -5
- pyedaa_projectmodel-0.5.0/pyEDAA.ProjectModel.egg-info/requires.txt +48 -0
- pyedaa_projectmodel-0.5.0/pyproject.toml +76 -0
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/setup.py +9 -4
- pyEDAA.ProjectModel-0.4.3/pyEDAA.ProjectModel.egg-info/requires.txt +0 -23
- pyEDAA.ProjectModel-0.4.3/pyproject.toml +0 -36
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/LICENSE.md +0 -0
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/README.md +0 -0
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/VHDL.py +0 -0
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA.ProjectModel.egg-info/SOURCES.txt +0 -0
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA.ProjectModel.egg-info/dependency_links.txt +0 -0
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA.ProjectModel.egg-info/top_level.txt +0 -0
- {pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyEDAA.ProjectModel
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: An abstract model of EDA tool projects.
|
|
5
5
|
Home-page: https://GitHub.com/edaa-org/pyEDAA.ProjectModel
|
|
6
6
|
Author: Patrick Lehmann
|
|
@@ -16,17 +16,60 @@ Classifier: Topic :: Utilities
|
|
|
16
16
|
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
|
|
17
17
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
18
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
21
19
|
Classifier: Programming Language :: Python :: 3.9
|
|
22
20
|
Classifier: Programming Language :: Python :: 3.10
|
|
23
21
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
24
|
Classifier: Development Status :: 4 - Beta
|
|
25
|
-
Requires-Python: >=3.
|
|
25
|
+
Requires-Python: >=3.9
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE.md
|
|
28
|
+
Requires-Dist: pySVModel~=0.5
|
|
29
|
+
Requires-Dist: pySystemRDLModel~=0.3
|
|
30
|
+
Requires-Dist: pyTooling~=7.0
|
|
31
|
+
Requires-Dist: pyVHDLModel~=0.29.1
|
|
27
32
|
Provides-Extra: doc
|
|
33
|
+
Requires-Dist: pySystemRDLModel~=0.3; extra == "doc"
|
|
34
|
+
Requires-Dist: sphinx_fontawesome>=0.0.6; extra == "doc"
|
|
35
|
+
Requires-Dist: autoapi>=2.0.1; extra == "doc"
|
|
36
|
+
Requires-Dist: sphinxcontrib-mermaid~=1.0; extra == "doc"
|
|
37
|
+
Requires-Dist: docutils_stubs~=0.0.22; extra == "doc"
|
|
38
|
+
Requires-Dist: pyVHDLModel~=0.29.1; extra == "doc"
|
|
39
|
+
Requires-Dist: sphinx_autodoc_typehints~=2.5; extra == "doc"
|
|
40
|
+
Requires-Dist: pySVModel~=0.5; extra == "doc"
|
|
41
|
+
Requires-Dist: docutils~=0.21; extra == "doc"
|
|
42
|
+
Requires-Dist: sphinx~=8.1; extra == "doc"
|
|
43
|
+
Requires-Dist: pyTooling~=7.0; extra == "doc"
|
|
44
|
+
Provides-Extra: test
|
|
45
|
+
Requires-Dist: pySystemRDLModel~=0.3; extra == "test"
|
|
46
|
+
Requires-Dist: typing_extensions~=4.12; extra == "test"
|
|
47
|
+
Requires-Dist: pytest~=8.3; extra == "test"
|
|
48
|
+
Requires-Dist: Coverage~=7.6; extra == "test"
|
|
49
|
+
Requires-Dist: lxml~=5.3; extra == "test"
|
|
50
|
+
Requires-Dist: pyVHDLModel~=0.29.1; extra == "test"
|
|
51
|
+
Requires-Dist: mypy~=1.13; extra == "test"
|
|
52
|
+
Requires-Dist: pySVModel~=0.5; extra == "test"
|
|
53
|
+
Requires-Dist: pytest-cov~=6.0; extra == "test"
|
|
54
|
+
Requires-Dist: pyTooling~=7.0; extra == "test"
|
|
28
55
|
Provides-Extra: all
|
|
29
|
-
|
|
56
|
+
Requires-Dist: pySystemRDLModel~=0.3; extra == "all"
|
|
57
|
+
Requires-Dist: sphinx_fontawesome>=0.0.6; extra == "all"
|
|
58
|
+
Requires-Dist: pytest-cov~=6.0; extra == "all"
|
|
59
|
+
Requires-Dist: typing_extensions~=4.12; extra == "all"
|
|
60
|
+
Requires-Dist: sphinxcontrib-mermaid~=1.0; extra == "all"
|
|
61
|
+
Requires-Dist: pytest~=8.3; extra == "all"
|
|
62
|
+
Requires-Dist: Coverage~=7.6; extra == "all"
|
|
63
|
+
Requires-Dist: lxml~=5.3; extra == "all"
|
|
64
|
+
Requires-Dist: docutils_stubs~=0.0.22; extra == "all"
|
|
65
|
+
Requires-Dist: pyVHDLModel~=0.29.1; extra == "all"
|
|
66
|
+
Requires-Dist: sphinx_autodoc_typehints~=2.5; extra == "all"
|
|
67
|
+
Requires-Dist: mypy~=1.13; extra == "all"
|
|
68
|
+
Requires-Dist: pySVModel~=0.5; extra == "all"
|
|
69
|
+
Requires-Dist: docutils~=0.21; extra == "all"
|
|
70
|
+
Requires-Dist: sphinx~=8.1; extra == "all"
|
|
71
|
+
Requires-Dist: autoapi>=2.0.1; extra == "all"
|
|
72
|
+
Requires-Dist: pyTooling~=7.0; extra == "all"
|
|
30
73
|
|
|
31
74
|
<p align="center">
|
|
32
75
|
<a title="edaa-org.github.io/pySVModel" href="https://edaa-org.github.io/pyEDAA.ProjectModel"><img height="80px" src="doc/_static/logo_on_dark.svg"/></a>
|
{pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/Altera/Quartus.py
RENAMED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# #
|
|
12
12
|
# License: #
|
|
13
13
|
# ==================================================================================================================== #
|
|
14
|
-
# Copyright 2017-
|
|
14
|
+
# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
|
|
15
15
|
# #
|
|
16
16
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
|
17
17
|
# you may not use this file except in compliance with the License. #
|
{pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/Altera/__init__.py
RENAMED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# #
|
|
12
12
|
# License: #
|
|
13
13
|
# ==================================================================================================================== #
|
|
14
|
-
# Copyright 2017-
|
|
14
|
+
# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
|
|
15
15
|
# #
|
|
16
16
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
|
17
17
|
# you may not use this file except in compliance with the License. #
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# #
|
|
12
12
|
# License: #
|
|
13
13
|
# ==================================================================================================================== #
|
|
14
|
-
# Copyright 2017-
|
|
14
|
+
# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
|
|
15
15
|
# #
|
|
16
16
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
|
17
17
|
# you may not use this file except in compliance with the License. #
|
|
@@ -41,7 +41,7 @@ class KeyValueAttribute(Attribute):
|
|
|
41
41
|
|
|
42
42
|
_keyValuePairs: Dict[str, str]
|
|
43
43
|
|
|
44
|
-
def __init__(self):
|
|
44
|
+
def __init__(self) -> None:
|
|
45
45
|
super().__init__()
|
|
46
46
|
|
|
47
47
|
self._keyValuePairs = {}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# #
|
|
12
12
|
# License: #
|
|
13
13
|
# ==================================================================================================================== #
|
|
14
|
-
# Copyright 2017-
|
|
14
|
+
# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
|
|
15
15
|
# #
|
|
16
16
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
|
17
17
|
# you may not use this file except in compliance with the License. #
|
{pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/Intel/QuartusPrime.py
RENAMED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# #
|
|
12
12
|
# License: #
|
|
13
13
|
# ==================================================================================================================== #
|
|
14
|
-
# Copyright 2017-
|
|
14
|
+
# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
|
|
15
15
|
# #
|
|
16
16
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
|
17
17
|
# you may not use this file except in compliance with the License. #
|
{pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/Intel/__init__.py
RENAMED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# #
|
|
12
12
|
# License: #
|
|
13
13
|
# ==================================================================================================================== #
|
|
14
|
-
# Copyright 2017-
|
|
14
|
+
# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
|
|
15
15
|
# #
|
|
16
16
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
|
17
17
|
# you may not use this file except in compliance with the License. #
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# #
|
|
12
12
|
# License: #
|
|
13
13
|
# ==================================================================================================================== #
|
|
14
|
-
# Copyright 2017-
|
|
14
|
+
# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
|
|
15
15
|
# #
|
|
16
16
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
|
17
17
|
# you may not use this file except in compliance with the License. #
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# #
|
|
12
12
|
# License: #
|
|
13
13
|
# ==================================================================================================================== #
|
|
14
|
-
# Copyright 2017-
|
|
14
|
+
# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
|
|
15
15
|
# #
|
|
16
16
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
|
17
17
|
# you may not use this file except in compliance with the License. #
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# #
|
|
12
12
|
# License: #
|
|
13
13
|
# ==================================================================================================================== #
|
|
14
|
-
# Copyright 2017-
|
|
14
|
+
# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
|
|
15
15
|
# #
|
|
16
16
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
|
17
17
|
# you may not use this file except in compliance with the License. #
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# #
|
|
12
12
|
# License: #
|
|
13
13
|
# ==================================================================================================================== #
|
|
14
|
-
# Copyright 2017-
|
|
14
|
+
# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
|
|
15
15
|
# #
|
|
16
16
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
|
17
17
|
# you may not use this file except in compliance with the License. #
|
|
@@ -46,9 +46,9 @@ class OSVVMProjectFile(ProjectFile, TCLContent):
|
|
|
46
46
|
def __init__(
|
|
47
47
|
self,
|
|
48
48
|
path: Path,
|
|
49
|
-
project: Project = None,
|
|
50
|
-
design: Design = None,
|
|
51
|
-
fileSet: FileSet = None
|
|
49
|
+
project: Nullable[Project] = None,
|
|
50
|
+
design: Nullable[Design] = None,
|
|
51
|
+
fileSet: Nullable[FileSet] = None
|
|
52
52
|
):
|
|
53
53
|
super().__init__(path, project, design, fileSet)
|
|
54
54
|
|
|
@@ -133,7 +133,7 @@ class OSVVMProjectFile(ProjectFile, TCLContent):
|
|
|
133
133
|
elif not isinstance(instruction, (OSVVMProjectFile.Empty, OSVVMProjectFile.Comment)):
|
|
134
134
|
raise Exception(f"Unknown instruction '{instruction.__class__.__name__}' in OSVVM project file '{self._osvvmProjectFile.ResolvedPath}'")
|
|
135
135
|
|
|
136
|
-
def Parse(self):
|
|
136
|
+
def Parse(self) -> None:
|
|
137
137
|
projectName = self._path.name
|
|
138
138
|
self._osvvmProject = Project(projectName, rootDirectory=self._path.parent)
|
|
139
139
|
|
|
@@ -147,14 +147,14 @@ class OSVVMProjectFile(ProjectFile, TCLContent):
|
|
|
147
147
|
elif not isinstance(instruction, (OSVVMProjectFile.Empty, OSVVMProjectFile.Comment)):
|
|
148
148
|
raise Exception(f"Unknown instruction '{instruction.__class__.__name__}' in OSVVM project file '{self.ResolvedPath}'")
|
|
149
149
|
|
|
150
|
-
def _Parse(self):
|
|
150
|
+
def _Parse(self) -> List:
|
|
151
151
|
path = self.ResolvedPath
|
|
152
152
|
if not path.exists():
|
|
153
153
|
raise Exception(f"OSVVM project file '{path}' not found.") from FileNotFoundError(f"File '{path}' not found.")
|
|
154
154
|
|
|
155
155
|
instructions: List = []
|
|
156
156
|
print()
|
|
157
|
-
with path.open("r") as file:
|
|
157
|
+
with path.open("r", encoding="utf-8") as file:
|
|
158
158
|
i = 1
|
|
159
159
|
for line in file:
|
|
160
160
|
line = line.lstrip()
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# #
|
|
12
12
|
# License: #
|
|
13
13
|
# ==================================================================================================================== #
|
|
14
|
-
# Copyright 2017-
|
|
14
|
+
# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
|
|
15
15
|
# #
|
|
16
16
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
|
17
17
|
# you may not use this file except in compliance with the License. #
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# #
|
|
12
12
|
# License: #
|
|
13
13
|
# ==================================================================================================================== #
|
|
14
|
-
# Copyright 2017-
|
|
14
|
+
# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
|
|
15
15
|
# #
|
|
16
16
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
|
17
17
|
# you may not use this file except in compliance with the License. #
|
{pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/Xilinx/Vivado.py
RENAMED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# #
|
|
12
12
|
# License: #
|
|
13
13
|
# ==================================================================================================================== #
|
|
14
|
-
# Copyright 2017-
|
|
14
|
+
# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
|
|
15
15
|
# #
|
|
16
16
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
|
17
17
|
# you may not use this file except in compliance with the License. #
|
|
@@ -30,13 +30,12 @@
|
|
|
30
30
|
#
|
|
31
31
|
"""Specific file types and attributes for Xilinx Vivado."""
|
|
32
32
|
from pathlib import Path
|
|
33
|
-
from typing
|
|
34
|
-
|
|
33
|
+
from typing import Iterable, Optional as Nullable
|
|
35
34
|
from xml.dom import minidom, Node
|
|
36
35
|
|
|
36
|
+
from pyTooling.Decorators import export
|
|
37
37
|
from pyTooling.MetaClasses import ExtendedType
|
|
38
|
-
from pyVHDLModel
|
|
39
|
-
from pyTooling.Decorators import export
|
|
38
|
+
from pyVHDLModel import VHDLVersion
|
|
40
39
|
|
|
41
40
|
from pyEDAA.ProjectModel import ProjectFile, XMLFile, XMLContent, SDCContent, Project, FileSet, Attribute, Design
|
|
42
41
|
from pyEDAA.ProjectModel import File as Model_File
|
|
@@ -57,27 +56,27 @@ class File(Model_File):
|
|
|
57
56
|
|
|
58
57
|
|
|
59
58
|
class VivadoFileMixIn(metaclass=ExtendedType, mixin=True):
|
|
60
|
-
def _registerAttributes(self):
|
|
59
|
+
def _registerAttributes(self) -> None:
|
|
61
60
|
self._attributes[UsedInAttribute] = []
|
|
62
61
|
|
|
63
62
|
|
|
64
63
|
@export
|
|
65
64
|
class ConstraintFile(Model_ConstraintFile, VivadoFileMixIn):
|
|
66
|
-
def _registerAttributes(self):
|
|
65
|
+
def _registerAttributes(self) -> None:
|
|
67
66
|
super()._registerAttributes()
|
|
68
67
|
VivadoFileMixIn._registerAttributes(self)
|
|
69
68
|
|
|
70
69
|
|
|
71
70
|
@export
|
|
72
71
|
class VerilogSourceFile(Model_VerilogSourceFile):
|
|
73
|
-
def _registerAttributes(self):
|
|
72
|
+
def _registerAttributes(self) -> None:
|
|
74
73
|
super()._registerAttributes()
|
|
75
74
|
VivadoFileMixIn._registerAttributes(self)
|
|
76
75
|
|
|
77
76
|
|
|
78
77
|
@export
|
|
79
78
|
class VHDLSourceFile(Model_VHDLSourceFile):
|
|
80
|
-
def _registerAttributes(self):
|
|
79
|
+
def _registerAttributes(self) -> None:
|
|
81
80
|
super()._registerAttributes()
|
|
82
81
|
VivadoFileMixIn._registerAttributes(self)
|
|
83
82
|
|
|
@@ -91,10 +90,10 @@ class VivadoProjectFile(ProjectFile, XMLContent):
|
|
|
91
90
|
def __init__(
|
|
92
91
|
self,
|
|
93
92
|
path: Path,
|
|
94
|
-
project: Project = None,
|
|
95
|
-
design:
|
|
96
|
-
fileSet: FileSet = None
|
|
97
|
-
):
|
|
93
|
+
project: Nullable[Project] = None,
|
|
94
|
+
design: Nullable[Design] = None,
|
|
95
|
+
fileSet: Nullable[FileSet] = None
|
|
96
|
+
) -> None:
|
|
98
97
|
super().__init__(path, project, design, fileSet)
|
|
99
98
|
|
|
100
99
|
self._xprProject = None
|
|
@@ -103,7 +102,7 @@ class VivadoProjectFile(ProjectFile, XMLContent):
|
|
|
103
102
|
def ProjectModel(self) -> Project:
|
|
104
103
|
return self._xprProject
|
|
105
104
|
|
|
106
|
-
def Parse(self):
|
|
105
|
+
def Parse(self) -> None:
|
|
107
106
|
if not self._path.exists():
|
|
108
107
|
raise Exception(f"Vivado project file '{self._path!s}' not found.") from FileNotFoundError(f"File '{self._path!s}' not found.")
|
|
109
108
|
|
|
@@ -115,18 +114,18 @@ class VivadoProjectFile(ProjectFile, XMLContent):
|
|
|
115
114
|
self._xprProject = Project(self._path.stem, rootDirectory=self._path.parent)
|
|
116
115
|
self._ParseRootElement(root)
|
|
117
116
|
|
|
118
|
-
def _ParseRootElement(self, root):
|
|
117
|
+
def _ParseRootElement(self, root) -> None:
|
|
119
118
|
for rootNode in root.childNodes:
|
|
120
119
|
if rootNode.nodeName == "FileSets":
|
|
121
120
|
self._ParseFileSets(rootNode)
|
|
122
121
|
break
|
|
123
122
|
|
|
124
|
-
def _ParseFileSets(self, filesetsNode):
|
|
123
|
+
def _ParseFileSets(self, filesetsNode) -> None:
|
|
125
124
|
for fileSetsNode in filesetsNode.childNodes:
|
|
126
125
|
if fileSetsNode.nodeType == Node.ELEMENT_NODE and fileSetsNode.tagName == "FileSet":
|
|
127
126
|
self._ParseFileSet(fileSetsNode)
|
|
128
127
|
|
|
129
|
-
def _ParseFileSet(self, filesetNode):
|
|
128
|
+
def _ParseFileSet(self, filesetNode) -> None:
|
|
130
129
|
filesetName = filesetNode.getAttribute("Name")
|
|
131
130
|
fileset = FileSet(filesetName, design=self._xprProject.DefaultDesign)
|
|
132
131
|
|
|
@@ -137,7 +136,7 @@ class VivadoProjectFile(ProjectFile, XMLContent):
|
|
|
137
136
|
elif fileNode.nodeType == Node.ELEMENT_NODE and fileNode.tagName == "Config":
|
|
138
137
|
self._ParseFileSetConfig(fileNode, fileset)
|
|
139
138
|
|
|
140
|
-
def _ParseFile(self, fileNode, fileset):
|
|
139
|
+
def _ParseFile(self, fileNode, fileset) -> None:
|
|
141
140
|
croppedPath = fileNode.getAttribute("Path").replace("$PPRDIR/", "")
|
|
142
141
|
filePath = Path(croppedPath)
|
|
143
142
|
if filePath.suffix in (".vhd", ".vhdl"):
|
|
@@ -151,7 +150,7 @@ class VivadoProjectFile(ProjectFile, XMLContent):
|
|
|
151
150
|
else:
|
|
152
151
|
self._ParseDefaultFile(fileNode, filePath, fileset)
|
|
153
152
|
|
|
154
|
-
def _ParseVHDLFile(self, fileNode, path, fileset):
|
|
153
|
+
def _ParseVHDLFile(self, fileNode, path, fileset) -> None:
|
|
155
154
|
vhdlFile = VHDLSourceFile(path)
|
|
156
155
|
fileset.AddFile(vhdlFile)
|
|
157
156
|
usedInAttr = vhdlFile[UsedInAttribute]
|
|
@@ -171,19 +170,19 @@ class VivadoProjectFile(ProjectFile, XMLContent):
|
|
|
171
170
|
elif fileAttribute.getAttribute("Val") == "UsedIn":
|
|
172
171
|
usedInAttr.append(fileAttribute.getAttribute("Val"))
|
|
173
172
|
|
|
174
|
-
def _ParseDefaultFile(self, _, path, fileset):
|
|
173
|
+
def _ParseDefaultFile(self, _, path, fileset) -> None:
|
|
175
174
|
File(path, fileSet=fileset)
|
|
176
175
|
|
|
177
|
-
def _ParseXDCFile(self, _, path, fileset):
|
|
176
|
+
def _ParseXDCFile(self, _, path, fileset) -> None:
|
|
178
177
|
XDCConstraintFile(path, fileSet=fileset)
|
|
179
178
|
|
|
180
|
-
def _ParseVerilogFile(self, _, path, fileset):
|
|
179
|
+
def _ParseVerilogFile(self, _, path, fileset) -> None:
|
|
181
180
|
VerilogSourceFile(path, fileSet=fileset)
|
|
182
181
|
|
|
183
|
-
def _ParseXCIFile(self, _, path, fileset):
|
|
182
|
+
def _ParseXCIFile(self, _, path, fileset) -> None:
|
|
184
183
|
IPCoreInstantiationFile(path, fileSet=fileset)
|
|
185
184
|
|
|
186
|
-
def _ParseFileSetConfig(self, fileNode, fileset):
|
|
185
|
+
def _ParseFileSetConfig(self, fileNode, fileset) -> None:
|
|
187
186
|
for option in fileNode.childNodes:
|
|
188
187
|
if option.nodeType == Node.ELEMENT_NODE and option.tagName == "Option":
|
|
189
188
|
if option.getAttribute("Name") == "TopModule":
|
{pyEDAA.ProjectModel-0.4.3 → pyedaa_projectmodel-0.5.0}/pyEDAA/ProjectModel/Xilinx/__init__.py
RENAMED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# #
|
|
12
12
|
# License: #
|
|
13
13
|
# ==================================================================================================================== #
|
|
14
|
-
# Copyright 2017-
|
|
14
|
+
# Copyright 2017-2024 Patrick Lehmann - Boetzingen, Germany #
|
|
15
15
|
# #
|
|
16
16
|
# Licensed under the Apache License, Version 2.0 (the "License"); #
|
|
17
17
|
# you may not use this file except in compliance with the License. #
|