pyEDAA.ProjectModel
Summary
- Doc-string:
documented
File |
Expected |
Covered |
Uncovered |
Coverage |
|---|---|---|---|---|
__init__.py |
231 |
124 |
107 |
53.7% |
Overall (16 files) |
331 |
148 |
183 |
44.7% |
Packages
Package |
Expected |
Covered |
Uncovered |
Coverage |
|---|---|---|---|---|
4 |
4 |
0 |
100.0% |
|
4 |
4 |
0 |
100.0% |
|
9 |
3 |
6 |
33.3% |
|
42 |
6 |
36 |
14.3% |
Modules
Module |
Expected |
Covered |
Uncovered |
Coverage |
|---|---|---|---|---|
7 |
1 |
6 |
14.3% |
|
2 |
2 |
0 |
100.0% |
|
30 |
2 |
28 |
6.7% |
|
0 |
0 |
0 |
100.0% |
|
2 |
2 |
0 |
100.0% |
Source
pyEDAA.ProjectModel/__init__.pydocumentedundocumentedignoredexcludednot counted
33"""An abstract model of EDA tool projects."""
34__author__ = "Patrick Lehmann"
35__email__ = "Paebbels@gmail.com"
36__copyright__ = "2021-2026, Electronic Design Automation Abstraction (EDA²)"
37__license__ = "Apache License, Version 2.0"
38__version__ = "0.7.0"
39__keywords__ = ["eda project", "model", "abstract", "xilinx", "vivado", "osvvm", "file set", "file group", "test bench", "test harness"]
40__project_url__ = "https://github.com/edaa-org/pyEDAA.ProjectModel"
41__documentation_url__ = "https://edaa-org.github.io/pyEDAA.ProjectModel"
42__issue_tracker_url__ = "https://GitHub.com/edaa-org/pyEDAA.ProjectModel/issues"
43
...
56
58@export
59class Attribute(metaclass=ExtendedType):
60 KEY: str
61 VALUE_TYPE: typing_Any
62
63 @staticmethod
64 def resolve(obj: typing_Any, key: Type['Attribute']):
...
73
75@export
76class FileType(ExtendedType):
77 """
78 A :term:`meta-class` to construct *FileType* classes.
79
80 Modifications done by this meta-class:
81 * Register all classes of type :class:`FileType` or derived variants in a class field :attr:`FileType.FileTypes` in this meta-class.
82 """
83
84 FileTypes: Dict[str, 'FileType'] = {} #: Dictionary of all classes of type :class:`FileType` or derived variants
85 Any: 'FileType'
86
87 def __init__(cls, name: str, bases: Tuple[type, ...], dictionary: Dict[str, typing_Any], **kwargs) -> None:
...
90
91 def __new__(cls, className, baseClasses, classMembers: Dict, *args, **kwargs) -> Self:
...
95
96 def __getattr__(cls, item) -> 'FileType':
...
101
102 def __contains__(cls, item) -> bool:
...
104
106@export
107class File(metaclass=FileType, slots=True):
108 """
109 A :term:`File` represents a file in a design. This :term:`base-class` is used
110 for all derived file classes.
111
112 A file can be created standalone and later associated to a fileset, design and
113 project. Or a fileset, design and/or project can be associated immediately
114 while creating a file.
115
116 :arg path: Relative or absolute path to the file.
117 :arg project: Project the file is associated with.
118 :arg design: Design the file is associated with.
119 :arg fileSet: Fileset the file is associated with.
120 """
121
122 _path: pathlib_Path
123 _fileType: 'FileType'
124 _project: Nullable['Project']
125 _design: Nullable['Design']
126 _fileSet: Nullable['FileSet']
127 _attributes: Dict[Type[Attribute], typing_Any]
128
129 def __init__(
130 self,
131 path: pathlib_Path,
132 project: Nullable["Project"] = None,
133 design: Nullable["Design"] = None,
134 fileSet: Nullable["FileSet"] = None
135 ) -> None:
...
162
163 def _registerAttributes(self) -> None:
...
165
166 @property
167 def FileType(self) -> 'FileType':
168 """Read-only property to return the file type of this file."""
...
170
171 @property
172 def Path(self) -> pathlib_Path:
173 """
174 Read-only property to access the path to the file.
175
176 :returns: The file's path.
177 """
...
179
182 @property
183 def ResolvedPath(self) -> pathlib_Path:
184 """Read-only property returning the resolved path of this file."""
...
198
199 @property
200 def Project(self) -> Nullable['Project']:
201 """Property setting or returning the project this file is used in."""
...
203
204 @Project.setter
205 def Project(self, value: 'Project') -> None:
...
210
211 @property
212 def Design(self) -> Nullable['Design']:
213 """Property setting or returning the design this file is used in."""
...
215
216 @Design.setter
217 def Design(self, value: 'Design') -> None:
...
227
228 @property
229 def FileSet(self) -> Nullable['FileSet']:
230 """Property setting or returning the fileset this file is used in."""
...
232
233 @FileSet.setter
234 def FileSet(self, value: 'FileSet') -> None:
...
237
238 def Validate(self) -> None:
239 """Validate this file."""
...
257
258 def __len__(self) -> int:
259 """
260 Returns number of attributes set on this file.
261
262 :returns: The number of attributes set on this file.
263 """
...
265
266 def __getitem__(self, key: Type[Attribute]) -> typing_Any:
267 """Index access for returning attributes on this file.
268
269 :param key: The attribute type.
270 :returns: The attribute's value.
271 :raises TypeError: When parameter 'key' is not a subclass of Attribute.
272 """
...
285
286 def __setitem__(self, key: Type[Attribute], value: typing_Any) -> None:
287 """
288 Index access for adding or setting attributes on this file.
289
290 :param key: The attribute type.
291 :param value: The attributes value.
292 :raises TypeError: When parameter 'key' is not a subclass of Attribute.
293 """
...
298
299 def __delitem__(self, key: Type[Attribute]) -> None:
300 """
301 Index access for deleting attributes on this file.
302
303 :param key: The attribute type.
304 """
...
309
310 def __str__(self) -> str:
...
312
314FileTypes = File
315
317@export
318class HumanReadableContent(metaclass=ExtendedType, mixin=True):
319 """A file type representing human-readable contents."""
320
322@export
323class XMLContent(HumanReadableContent, mixin=True):
324 """A file type representing XML contents."""
325
327@export
328class YAMLContent(HumanReadableContent, mixin=True):
329 """A file type representing YAML contents."""
330
332@export
333class JSONContent(HumanReadableContent, mixin=True):
334 """A file type representing JSON contents."""
335
337@export
338class INIContent(HumanReadableContent, mixin=True):
339 """A file type representing INI contents."""
340
342@export
343class TOMLContent(HumanReadableContent, mixin=True):
344 """A file type representing TOML contents."""
345
347@export
348class TCLContent(HumanReadableContent, mixin=True):
349 """A file type representing content in TCL code."""
350
352@export
353class SDCContent(TCLContent, mixin=True):
354 """A file type representing contents as Synopsys Design Constraints (SDC)."""
355
357@export
358class PythonContent(HumanReadableContent, mixin=True):
359 """A file type representing contents as Python source code."""
360
362@export
363class TextFile(File, HumanReadableContent):
364 """A text file (``*.txt``)."""
365
367@export
368class LogFile(File, HumanReadableContent):
369 """A log file (``*.log``)."""
370
372@export
373class XMLFile(File, XMLContent):
374 """An XML file (``*.xml``)."""
375
377@export
378class SourceFile(File):
379 """Base-class of all source files."""
380
382@export
383class HDLSourceFile(SourceFile):
384 """Base-class of all HDL source files."""
385
387@export
388class RDLSourceFile(SourceFile):
389 """Base-class of all RDL source files."""
390
392@export
393class NetlistFile(SourceFile):
394 """Base-class of all netlist source files."""
395
397@export
398class EDIFNetlistFile(NetlistFile):
399 """Netlist file in EDIF (Electronic Design Interchange Format)."""
400
402@export
403class TCLSourceFile(SourceFile, TCLContent):
404 """A TCL source file."""
405
407@export
408class VHDLSourceFile(HDLSourceFile, HumanReadableContent):
409 """
410 A VHDL source file (of any language version).
411
412 :arg path: Relative or absolute path to the file.
413 :arg vhdlLibrary: VHDLLibrary this VHDL source file is associated wih.
414 :arg vhdlVersion: VHDLVersion this VHDL source file is associated wih.
415 :arg project: Project the file is associated with.
416 :arg design: Design the file is associated with.
417 :arg fileSet: Fileset the file is associated with.
418 """
419
420 _vhdlLibrary: Nullable['VHDLLibrary']
421 _vhdlVersion: VHDLVersion
422
423 def __init__(self, path: pathlib_Path, vhdlLibrary: Union[str, 'VHDLLibrary'] = None, vhdlVersion: Nullable[VHDLVersion] = None, project: Nullable["Project"] = None, design: Nullable["Design"] = None, fileSet: Nullable["FileSet"] = None) -> None:
...
450
451 def Validate(self) -> None:
452 """Validate this VHDL source file."""
...
463
464 @property
465 def VHDLLibrary(self) -> 'VHDLLibrary':
466 """Property setting or returning the VHDL library this VHDL source file is used in."""
...
473
474 @VHDLLibrary.setter
475 def VHDLLibrary(self, value: 'VHDLLibrary') -> None:
...
478
479 @property
480 def VHDLVersion(self) -> VHDLVersion:
481 """Property setting or returning the VHDL version this VHDL source file is used in."""
...
488
489 @VHDLVersion.setter
490 def VHDLVersion(self, value: VHDLVersion) -> None:
...
492
493 def __repr__(self) -> str:
...
495
497class VerilogMixIn(metaclass=ExtendedType, mixin=True):
498 @property
499 def VerilogVersion(self) -> SystemVerilogVersion:
500 """Property setting or returning the Verilog version this Verilog source file is used in."""
...
507
508 @VerilogVersion.setter
509 def VerilogVersion(self, value: SystemVerilogVersion) -> None:
...
511
513class SystemVerilogMixIn(metaclass=ExtendedType, mixin=True):
514 @property
515 def SVVersion(self) -> SystemVerilogVersion:
516 """Property setting or returning the SystemVerilog version this SystemVerilog source file is used in."""
...
523
524 @SVVersion.setter
525 def SVVersion(self, value: SystemVerilogVersion) -> None:
...
527
529@export
530class VerilogBaseFile(HDLSourceFile, HumanReadableContent):
531 _version: SystemVerilogVersion
532
533 def __init__(self, path: pathlib_Path, version: Nullable[SystemVerilogVersion] = None, project: Nullable["Project"] = None, design: Nullable["Design"] = None, fileSet: Nullable["FileSet"] = None) -> None:
...
537
539@export
540class VerilogSourceFile(VerilogBaseFile, VerilogMixIn):
541 """A Verilog source file (of any language version)."""
542
544@export
545class VerilogHeaderFile(VerilogBaseFile, VerilogMixIn):
546 """A Verilog header file (of any language version)."""
547
549@export
550class SystemVerilogBaseFile(VerilogBaseFile):
...
552
554@export
555class SystemVerilogSourceFile(SystemVerilogBaseFile, SystemVerilogMixIn):
556 """A SystemVerilog source file (of any language version)."""
557
559@export
560class SystemVerilogHeaderFile(SystemVerilogBaseFile, SystemVerilogMixIn):
561 """A SystemVerilog header file (of any language version)."""
562
564@export
565class SystemRDLSourceFile(RDLSourceFile, HumanReadableContent):
566 """A SystemRDL source file (of any language version)."""
567
568 _srdlVersion: SystemRDLVersion
569
570 def __init__(self, path: pathlib_Path, srdlVersion: Nullable[SystemRDLVersion] = None, project: Nullable["Project"] = None, design: Nullable["Design"] = None, fileSet: Nullable["FileSet"] = None) -> None:
...
574
575 @property
576 def SystemRDLVersion(self) -> SystemRDLVersion:
577 """Property setting or returning the SystemRDL version this SystemRDL source file is used in."""
...
584
585 @SystemRDLVersion.setter
586 def SystemRDLVersion(self, value: SystemRDLVersion) -> None:
...
588
590@export
591class PythonSourceFile(SourceFile, PythonContent):
592 """A Python source file."""
593
596@export
597class CocotbPythonFile(PythonSourceFile):
598 """A Python source file used by Cocotb."""
599
601@export
602class ConstraintFile(File, HumanReadableContent):
603 """Base-class of all constraint files."""
604
606@export
607class ProjectFile(File):
608 """Base-class of all tool-specific project files."""
609
611@export
612class CSourceFile(SourceFile):
613 """Base-class of all ANSI-C source files."""
614
616@export
617class CppSourceFile(SourceFile):
618 """Base-class of all ANSI-C++ source files."""
619
621@export
622class SettingFile(File):
623 """Base-class of all tool-specific setting files."""
624
626@export
627class SimulationAnalysisFile(File):
628 """Base-class of all tool-specific analysis files."""
629
631@export
632class SimulationElaborationFile(File):
633 """Base-class of all tool-specific elaboration files."""
634
636@export
637class SimulationStartFile(File):
638 """Base-class of all tool-specific simulation start-up files."""
639
641@export
642class SimulationRunFile(File):
643 """Base-class of all tool-specific simulation run (execution) files."""
644
646@export
647class WaveformConfigFile(File):
648 """Base-class of all tool-specific waveform configuration files."""
649
651@export
652class WaveformDatabaseFile(File):
653 """Base-class of all tool-specific waveform database files."""
654
656@export
657class WaveformExchangeFile(File):
658 """Base-class of all tool-independent waveform exchange files."""
659
661@export
662class FileSet(metaclass=ExtendedType, slots=True):
663 """
664 A :term:`FileSet` represents a group of files. Filesets can have sub-filesets.
665
666 The order of insertion is preserved. A fileset can be created standalone and
667 later associated to another fileset, design and/or project. Or a fileset,
668 design and/or project can be associated immediately while creating the
669 fileset.
670
671 :arg name: Name of this fileset.
672 :arg topLevel: Name of the fileset's toplevel.
673 :arg directory: Path of this fileset (absolute or relative to a parent fileset or design).
674 :arg project: Project the file is associated with.
675 :arg design: Design the file is associated with.
676 :arg parent: Parent fileset if this fileset is nested.
677 :arg vhdlLibrary: Default VHDL library for files in this fileset, if not specified for the file itself.
678 :arg vhdlVersion: Default VHDL version for files in this fileset, if not specified for the file itself.
679 :arg verilogVersion: Default Verilog version for files in this fileset, if not specified for the file itself.
680 :arg svVersion: Default SystemVerilog version for files in this fileset, if not specified for the file itself.
681 :arg srdlVersion: Default SystemRDL version for files in this fileset, if not specified for the file itself.
682 """
683
684 _name: str
685 _topLevel: Nullable[str]
686 _project: Nullable['Project']
687 _design: Nullable['Design']
688 _directory: pathlib_Path
689 _parent: Nullable['FileSet']
690 _fileSets: Dict[str, 'FileSet']
691 _files: List[File]
692 _set: Set
693 _attributes: Dict[Type[Attribute], typing_Any]
694 _vhdlLibraries: Dict[str, 'VHDLLibrary']
695 _vhdlLibrary: 'VHDLLibrary'
696 _vhdlVersion: VHDLVersion
697 _verilogVersion: SystemVerilogVersion
698 _svVersion: SystemVerilogVersion
699 _srdlVersion: SystemRDLVersion
700
701 def __init__(
702 self,
703 name: str,
704 topLevel: Nullable[str] = None,
705 directory: pathlib_Path = pathlib_Path("."),
706 project: Nullable["Project"] = None,
707 design: Nullable["Design"] = None,
708 parent: Nullable['FileSet'] = None,
709 vhdlLibrary: Union[str, 'VHDLLibrary'] = None,
710 vhdlVersion: Nullable[VHDLVersion] = None,
711 verilogVersion: Nullable[SystemVerilogVersion] = None,
712 svVersion: Nullable[SystemVerilogVersion] = None,
713 srdlVersion: Nullable[SystemRDLVersion] = None
714 ) -> None:
...
745
746 @property
747 def Name(self) -> str:
748 """Property setting or returning the fileset's name."""
...
750
751 @Name.setter
752 def Name(self, value: str) -> None:
...
754
755 @property
756 def TopLevel(self) -> str:
757 """Property setting or returning the fileset's toplevel."""
...
759
760 @TopLevel.setter
761 def TopLevel(self, value: str) -> None:
...
763
764 @property
765 def Project(self) -> Nullable['Project']:
766 """Property setting or returning the project this fileset is used in."""
...
768
769 @Project.setter
770 def Project(self, value: 'Project') -> None:
...
772
773 @property
774 def Design(self) -> Nullable['Design']:
775 """Property setting or returning the design this fileset is used in."""
...
784
785 @Design.setter
786 def Design(self, value: 'Design') -> None:
...
792
793 @property
794 def Directory(self) -> pathlib_Path:
795 """Property setting or returning the directory this fileset is located in."""
...
797
798 @Directory.setter
799 def Directory(self, value: pathlib_Path) -> None:
...
801
802 @property
803 def ResolvedPath(self) -> pathlib_Path:
804 """Read-only property returning the resolved path of this fileset."""
...
824
825 @property
826 def Parent(self) -> Nullable['FileSet']:
827 """Property setting or returning the parent fileset this fileset is used in."""
...
829
830 @Parent.setter
831 def Parent(self, value: 'FileSet') -> None:
...
836
837 @property
838 def FileSets(self) -> Dict[str, 'FileSet']:
839 """Read-only property returning the dictionary of sub-filesets."""
...
841
842 def Files(self, fileType: FileType = FileTypes.Any, fileSet: Union[bool, str, 'FileSet'] = None) -> Generator[File, None, None]:
843 """
844 Method returning the files of this fileset.
845
846 :arg fileType: A filter for file types. Default: ``Any``.
847 :arg fileSet: Specifies how to handle sub-filesets.
848 """
...
872
873 def AddFileSet(self, fileSet: "FileSet") -> None:
874 """
875 Method to add a single sub-fileset to this fileset.
876
877 :arg fileSet: A fileset to add to this fileset as sub-fileset.
878 """
...
888
889 def AddFileSets(self, fileSets: Iterable["FileSet"]) -> None:
890 """
891 Method to add a multiple sub-filesets to this fileset.
892
893 :arg fileSets: An iterable of filesets to add each to the fileset.
894 """
...
897
898 @property
899 def FileSetCount(self) -> int:
900 """Returns number of file sets excl. sub-filesets."""
...
902
903 @property
904 def TotalFileSetCount(self) -> int:
905 """Returns number of file sets incl. sub-filesets."""
...
911
912 def AddFile(self, file: File) -> None:
913 """
914 Method to add a single file to this fileset.
915
916 :arg file: A file to add to this fileset.
917 """
...
932
933 def AddFiles(self, files: Iterable[File]) -> None:
934 """
935 Method to add a multiple files to this fileset.
936
937 :arg files: An iterable of files to add each to the fileset.
938 """
...
941
942 @property
943 def FileCount(self) -> int:
944 """Returns number of files excl. sub-filesets."""
...
946
947 @property
948 def TotalFileCount(self) -> int:
949 """Returns number of files incl. the files in sub-filesets."""
...
955
956 def Validate(self) -> None:
957 """Validate this fileset."""
...
981
982 def GetOrCreateVHDLLibrary(self, name) -> 'VHDLLibrary':
...
993
994 @property
995 def VHDLLibrary(self) -> 'VHDLLibrary':
996 """Property setting or returning the VHDL library of this fileset."""
...
1005
1006 @VHDLLibrary.setter
1007 def VHDLLibrary(self, value: 'VHDLLibrary') -> None:
...
1009
1010 @property
1011 def VHDLVersion(self) -> VHDLVersion:
1012 """Property setting or returning the VHDL version of this fileset."""
...
1021
1022 @VHDLVersion.setter
1023 def VHDLVersion(self, value: VHDLVersion) -> None:
...
1025
1026 @property
1027 def VerilogVersion(self) -> SystemVerilogVersion:
1028 """Property setting or returning the Verilog version of this fileset."""
...
1037
1038 @VerilogVersion.setter
1039 def VerilogVersion(self, value: SystemVerilogVersion) -> None:
...
1041
1042 @property
1043 def SVVersion(self) -> SystemVerilogVersion:
1044 """Property setting or returning the SystemVerilog version of this fileset."""
...
1053
1054 @SVVersion.setter
1055 def SVVersion(self, value: SystemVerilogVersion) -> None:
...
1057
1058 @property
1059 def SRDLVersion(self) -> SystemRDLVersion:
...
1068
1069 @SRDLVersion.setter
1070 def SRDLVersion(self, value: SystemRDLVersion) -> None:
...
1072
1073 def __len__(self) -> int:
1074 """
1075 Returns number of attributes set on this fileset.
1076
1077 :returns: The number of attributes set on this fileset.
1078 """
...
1080
1081 def __getitem__(self, key: Type[Attribute]) -> typing_Any:
1082 """Index access for returning attributes on this fileset.
1083
1084 :param key: The attribute type.
1085 :returns: The attribute's value.
1086 :raises TypeError: When parameter 'key' is not a subclass of Attribute.
1087 """
...
1095
1096 def __setitem__(self, key: Type[Attribute], value: typing_Any) -> None:
1097 """
1098 Index access for adding or setting attributes on this fileset.
1099
1100 :param key: The attribute type.
1101 :param value: The attributes value.
1102 :raises TypeError: When parameter 'key' is not a subclass of Attribute.
1103 """
...
1108
1109 def __delitem__(self, key: Type[Attribute]) -> None:
1110 """
1111 Index access for deleting attributes on this fileset.
1112
1113 :param key: The attribute type.
1114 """
...
1119
1120 def __str__(self) -> str:
1121 """Returns the fileset's name."""
...
1123
1125@export
1126class VHDLLibrary(metaclass=ExtendedType, slots=True):
1127 """
1128 A :term:`VHDLLibrary` represents a group of VHDL source files compiled into the same VHDL library.
1129
1130 :arg name: The VHDL libraries' name.
1131 :arg project: Project the VHDL library is associated with.
1132 :arg design: Design the VHDL library is associated with.
1133 :arg vhdlVersion: Default VHDL version for files in this VHDL library, if not specified for the file itself.
1134 """
1135
1136 _name: str
1137 _project: Nullable['Project']
1138 _design: Nullable['Design']
1139 _files: List[File]
1140 _vhdlVersion: VHDLVersion
1141
1142 _attributes: Dict[Attribute, typing_Any]
1143 _dependencyNode: Vertex
1144
1145 def __init__(
1146 self,
1147 name: str,
1148 project: Nullable["Project"] = None,
1149 design: Nullable["Design"] = None,
1150 vhdlVersion: Nullable[VHDLVersion] = None
1151 ) -> None:
...
1182
1183 @property
1184 def Name(self) -> str:
...
1186
1187 @property
1188 def Project(self) -> Nullable['Project']:
1189 """Property setting or returning the project this VHDL library is used in."""
...
1191
1192 @Project.setter
1193 def Project(self, value: 'Project') -> None:
...
1204
1205 @property
1206 def Design(self) -> Nullable['Design']:
1207 """Property setting or returning the design this VHDL library is used in."""
...
1209
1210 @Design.setter
1211 def Design(self, value: 'Design') -> None:
...
1233
1234 @property
1235 def Files(self) -> Generator[File, None, None]:
1236 """Read-only property to return all files in this VHDL library."""
...
1239
1240 @property
1241 def VHDLVersion(self) -> VHDLVersion:
1242 """Property setting or returning the VHDL version of this VHDL library."""
...
1249
1250 @VHDLVersion.setter
1251 def VHDLVersion(self, value: VHDLVersion) -> None:
...
1253
1254 def AddDependency(self, library: 'VHDLLibrary') -> None:
...
1256
1257 def AddFile(self, vhdlFile: VHDLSourceFile) -> None:
...
1264
1265 def AddFiles(self, vhdlFiles: Iterable[VHDLSourceFile]) -> None:
...
1271
1272 @property
1273 def FileCount(self) -> int:
1274 """Returns number of files."""
...
1276
1277 def __len__(self) -> int:
1278 """
1279 Returns number of attributes set on this VHDL library.
1280
1281 :returns: The number of attributes set on this VHDL library.
1282 """
...
1284
1285 def __getitem__(self, key: Type[Attribute]) -> typing_Any:
1286 """Index access for returning attributes on this VHDL library.
1287
1288 :param key: The attribute type.
1289 :returns: The attribute's value.
1290 :raises TypeError: When parameter 'key' is not a subclass of Attribute.
1291 """
...
1299
1300 def __setitem__(self, key: Type[Attribute], value: typing_Any) -> None:
1301 """
1302 Index access for adding or setting attributes on this VHDL library.
1303
1304 :param key: The attribute type.
1305 :param value: The attributes value.
1306 :raises TypeError: When parameter 'key' is not a subclass of Attribute.
1307 """
...
1312
1313 def __delitem__(self, key: Type[Attribute]) -> None:
1314 """
1315 Index access for deleting attributes on this VHDL library.
1316
1317 :param key: The attribute type.
1318 """
...
1323
1324 def __str__(self) -> str:
1325 """Returns the VHDL library's name."""
...
1327
1329@export
1330class Design(metaclass=ExtendedType, slots=True):
1331 """
1332 A :term:`Design` represents a group of filesets and the source files therein.
1333
1334 Each design contains at least one fileset - the :term:`default fileset`. For
1335 designs with VHDL source files, a independent `VHDLLibraries` overlay structure
1336 exists.
1337
1338 :arg name: The design's name.
1339 :arg topLevel: Name of the design's toplevel.
1340 :arg directory: Path of this design (absolute or relative to the project).
1341 :arg project: Project the design is associated with.
1342 :arg vhdlVersion: Default VHDL version for files in this design, if not specified for the file itself.
1343 :arg verilogVersion: Default Verilog version for files in this design, if not specified for the file itself.
1344 :arg svVersion: Default SystemVerilog version for files in this design, if not specified for the file itself.
1345 :arg srdlVersion: Default SystemRDL version for files in this fileset, if not specified for the file itself.
1346 """
1347
1348 _name: str
1349 _topLevel: Nullable[str]
1350 _project: Nullable['Project']
1351 _directory: pathlib_Path
1352 _fileSets: Dict[str, FileSet]
1353 _defaultFileSet: Nullable[FileSet]
1354 _attributes: Dict[Type[Attribute], typing_Any]
1355
1356 _vhdlLibraries: Dict[str, VHDLLibrary]
1357 _vhdlVersion: VHDLVersion
1358 _verilogVersion: SystemVerilogVersion
1359 _svVersion: SystemVerilogVersion
1360 _srdlVersion: SystemRDLVersion
1361 _externalVHDLLibraries: List
1362
1363 _vhdlLibraryDependencyGraph: Graph
1364 _fileDependencyGraph: Graph
1365
1366 def __init__(
1367 self,
1368 name: str,
1369 topLevel: Nullable[str] = None,
1370 directory: pathlib_Path = pathlib_Path("."),
1371 project: Nullable["Project"] = None,
1372 vhdlVersion: Nullable[VHDLVersion] = None,
1373 verilogVersion: Nullable[SystemVerilogVersion] = None,
1374 svVersion: Nullable[SystemVerilogVersion] = None,
1375 srdlVersion: Nullable[SystemRDLVersion] = None
1376 ) -> None:
...
1395
1396 @property
1397 def Name(self) -> str:
1398 """Property setting or returning the design's name."""
...
1400
1401 @Name.setter
1402 def Name(self, value: str) -> None:
...
1404
1405 @property
1406 def TopLevel(self) -> str:
1407 """Property setting or returning the fileset's toplevel."""
...
1409
1410 @TopLevel.setter
1411 def TopLevel(self, value: str) -> None:
...
1413
1414 @property
1415 def Project(self) -> Nullable['Project']:
1416 """Property setting or returning the project this design is used in."""
...
1418
1419 @Project.setter
1420 def Project(self, value: 'Project') -> None:
...
1422
1423 @property
1424 def Directory(self) -> pathlib_Path:
1425 """Property setting or returning the directory this design is located in."""
...
1427
1428 @Directory.setter
1429 def Directory(self, value: pathlib_Path) -> None:
...
1431
1432 @property
1433 def ResolvedPath(self) -> pathlib_Path:
1434 """Read-only property returning the resolved path of this fileset."""
...
1448
1449 @property
1450 def DefaultFileSet(self) -> FileSet:
1451 """Property setting or returning the default fileset of this design."""
...
1453
1454 @DefaultFileSet.setter
1455 def DefaultFileSet(self, value: Union[str, FileSet]) -> None:
...
1468
1470 @property
1471 def FileSets(self) -> Dict[str, FileSet]:
1472 """Read-only property returning the dictionary of filesets."""
...
1474
1475 def Files(self, fileType: FileType = FileTypes.Any, fileSet: Union[str, FileSet] = None) -> Generator[File, None, None]:
1476 """
1477 Method returning the files of this design.
1478
1479 :arg fileType: A filter for file types. Default: ``Any``.
1480 :arg fileSet: Specifies if all files from all filesets (``fileSet=None``) are files from a single fileset are returned.
1481 """
...
1497
1498 def Validate(self) -> None:
1499 """Validate this design."""
...
1526
1527 @property
1528 def VHDLLibraries(self) -> Dict[str, VHDLLibrary]:
...
1530
1531 @property
1532 def VHDLVersion(self) -> VHDLVersion:
...
1539
1540 @VHDLVersion.setter
1541 def VHDLVersion(self, value: VHDLVersion) -> None:
...
1543
1544 @property
1545 def VerilogVersion(self) -> SystemVerilogVersion:
...
1552
1553 @VerilogVersion.setter
1554 def VerilogVersion(self, value: SystemVerilogVersion) -> None:
...
1556
1557 @property
1558 def SVVersion(self) -> SystemVerilogVersion:
...
1565
1566 @SVVersion.setter
1567 def SVVersion(self, value: SystemVerilogVersion) -> None:
...
1569
1570 @property
1571 def SRDLVersion(self) -> SystemRDLVersion:
...
1578
1579 @SRDLVersion.setter
1580 def SRDLVersion(self, value: SystemRDLVersion) -> None:
...
1582
1583 @property
1584 def ExternalVHDLLibraries(self) -> List:
...
1586
1587 def AddFileSet(self, fileSet: FileSet) -> None:
...
1598
1599 def AddFileSets(self, fileSets: Iterable[FileSet]) -> None:
...
1602
1603 @property
1604 def FileSetCount(self) -> int:
1605 """Returns number of file sets excl. sub-filesets."""
...
1607
1608 @property
1609 def TotalFileSetCount(self) -> int:
1610 """Returns number of file sets incl. sub-filesets."""
...
1616
1617 def AddFile(self, file: File) -> None:
...
1622
1623 def AddFiles(self, files: Iterable[File]) -> None:
...
1626
1627 def AddVHDLLibrary(self, vhdlLibrary: VHDLLibrary) -> None:
...
1633
1635 def __len__(self) -> int:
1636 """
1637 Returns number of attributes set on this design.
1638
1639 :returns: The number of attributes set on this design.
1640 """
...
1642
1643 def __getitem__(self, key: Type[Attribute]) -> typing_Any:
1644 """Index access for returning attributes on this design.
1645
1646 :param key: The attribute type.
1647 :returns: The attribute's value.
1648 :raises TypeError: When parameter 'key' is not a subclass of Attribute.
1649 """
...
1657
1658 def __setitem__(self, key: Type[Attribute], value: typing_Any) -> None:
1659 """
1660 Index access for adding or setting attributes on this design.
1661
1662 :param key: The attribute type.
1663 :param value: The attributes value.
1664 :raises TypeError: When parameter 'key' is not a subclass of Attribute.
1665 """
...
1670
1671 def __delitem__(self, key: Type[Attribute]) -> None:
1672 """
1673 Index access for deleting attributes on this design.
1674
1675 :param key: The attribute type.
1676 """
...
1681
1682 def __str__(self) -> str:
...
1684
1686@export
1687class Project(metaclass=ExtendedType, slots=True):
1688 """
1689 A :term:`Project` represents a group of designs and the source files therein.
1690
1691 :arg name: The project's name.
1692 :arg rootDirectory: Base-path to the project.
1693 :arg vhdlVersion: Default VHDL version for files in this project, if not specified for the file itself.
1694 :arg verilogVersion: Default Verilog version for files in this project, if not specified for the file itself.
1695 :arg svVersion: Default SystemVerilog version for files in this project, if not specified for the file itself.
1696 """
1697
1698 _name: str
1699 _rootDirectory: pathlib_Path
1700 _designs: Dict[str, Design]
1701 _defaultDesign: Design
1702 _attributes: Dict[Type[Attribute], typing_Any]
1703
1704 _vhdlVersion: VHDLVersion
1705 _verilogVersion: SystemVerilogVersion
1706 _svVersion: SystemVerilogVersion
1707 _srdlVersion: SystemRDLVersion
1708
1709 def __init__(
1710 self,
1711 name: str,
1712 rootDirectory: pathlib_Path = pathlib_Path("."),
1713 vhdlVersion: Nullable[VHDLVersion] = None,
1714 verilogVersion: Nullable[SystemVerilogVersion] = None,
1715 svVersion: Nullable[SystemVerilogVersion] = None
1716 ) -> None:
...
1725
1726 @property
1727 def Name(self) -> str:
1728 """Property setting or returning the project's name."""
...
1730
1731 @property
1732 def RootDirectory(self) -> pathlib_Path:
1733 """Property setting or returning the root directory this project is located in."""
...
1735
1736 @RootDirectory.setter
1737 def RootDirectory(self, value: pathlib_Path) -> None:
...
1739
1740 @property
1741 def ResolvedPath(self) -> pathlib_Path:
1742 """Read-only property returning the resolved path of this fileset."""
...
1749
1751 @property
1752 def Designs(self) -> Dict[str, Design]:
...
1754
1755 @property
1756 def DefaultDesign(self) -> Design:
...
1758
1759 def Validate(self) -> None:
1760 """Validate this project."""
...
1785
1786 @property
1787 def DesignCount(self) -> int:
1788 """Returns number of designs."""
...
1790
1791 @property
1792 def VHDLVersion(self) -> VHDLVersion:
...
1795
1796 @VHDLVersion.setter
1797 def VHDLVersion(self, value: VHDLVersion) -> None:
...
1799
1800 @property
1801 def VerilogVersion(self) -> SystemVerilogVersion:
...
1804
1805 @VerilogVersion.setter
1806 def VerilogVersion(self, value: SystemVerilogVersion) -> None:
...
1808
1809 @property
1810 def SVVersion(self) -> SystemVerilogVersion:
...
1813
1814 @SVVersion.setter
1815 def SVVersion(self, value: SystemVerilogVersion) -> None:
...
1817
1818 @property
1819 def SRDLVersion(self) -> SystemRDLVersion:
...
1822
1823 @SRDLVersion.setter
1824 def SRDLVersion(self, value: SystemRDLVersion) -> None:
...
1826
1827 def __len__(self) -> int:
1828 """
1829 Returns number of attributes set on this project.
1830
1831 :returns: The number of attributes set on this project.
1832 """
...
1834
1835 def __getitem__(self, key: Type[Attribute]) -> typing_Any:
1836 """Index access for returning attributes on this project.
1837
1838 :param key: The attribute type.
1839 :returns: The attribute's value.
1840 :raises TypeError: When parameter 'key' is not a subclass of Attribute.
1841 """
...
1849
1850 def __setitem__(self, key: Type[Attribute], value: typing_Any) -> None:
1851 """
1852 Index access for adding or setting attributes on this project.
1853
1854 :param key: The attribute type.
1855 :param value: The attributes value.
1856 :raises TypeError: When parameter 'key' is not a subclass of Attribute.
1857 """
...
1862
1863 def __delitem__(self, key: Type[Attribute]) -> None:
1864 """
1865 Index access for deleting attributes on this project.
1866
1867 :param key: The attribute type.
1868 """
...
1873
1874 def __str__(self) -> str:
...