pyedb 0.2.0__py3-none-any.whl

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.

Potentially problematic release.


This version of pyedb might be problematic. Click here for more details.

Files changed (128) hide show
  1. pyedb/__init__.py +17 -0
  2. pyedb/dotnet/__init__.py +0 -0
  3. pyedb/dotnet/application/Variables.py +2261 -0
  4. pyedb/dotnet/application/__init__.py +0 -0
  5. pyedb/dotnet/clr_module.py +103 -0
  6. pyedb/dotnet/edb.py +4237 -0
  7. pyedb/dotnet/edb_core/__init__.py +1 -0
  8. pyedb/dotnet/edb_core/cell/__init__.py +0 -0
  9. pyedb/dotnet/edb_core/cell/hierarchy/__init__.py +0 -0
  10. pyedb/dotnet/edb_core/cell/hierarchy/model.py +66 -0
  11. pyedb/dotnet/edb_core/components.py +2669 -0
  12. pyedb/dotnet/edb_core/configuration.py +423 -0
  13. pyedb/dotnet/edb_core/definition/__init__.py +0 -0
  14. pyedb/dotnet/edb_core/definition/component_def.py +166 -0
  15. pyedb/dotnet/edb_core/definition/component_model.py +30 -0
  16. pyedb/dotnet/edb_core/definition/definition_obj.py +18 -0
  17. pyedb/dotnet/edb_core/definition/definitions.py +12 -0
  18. pyedb/dotnet/edb_core/dotnet/__init__.py +0 -0
  19. pyedb/dotnet/edb_core/dotnet/database.py +1218 -0
  20. pyedb/dotnet/edb_core/dotnet/layout.py +238 -0
  21. pyedb/dotnet/edb_core/dotnet/primitive.py +1517 -0
  22. pyedb/dotnet/edb_core/edb_data/__init__.py +0 -0
  23. pyedb/dotnet/edb_core/edb_data/components_data.py +938 -0
  24. pyedb/dotnet/edb_core/edb_data/connectable.py +113 -0
  25. pyedb/dotnet/edb_core/edb_data/control_file.py +1268 -0
  26. pyedb/dotnet/edb_core/edb_data/design_options.py +35 -0
  27. pyedb/dotnet/edb_core/edb_data/edbvalue.py +45 -0
  28. pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +330 -0
  29. pyedb/dotnet/edb_core/edb_data/hfss_simulation_setup_data.py +1607 -0
  30. pyedb/dotnet/edb_core/edb_data/layer_data.py +576 -0
  31. pyedb/dotnet/edb_core/edb_data/nets_data.py +281 -0
  32. pyedb/dotnet/edb_core/edb_data/obj_base.py +19 -0
  33. pyedb/dotnet/edb_core/edb_data/padstacks_data.py +2080 -0
  34. pyedb/dotnet/edb_core/edb_data/ports.py +287 -0
  35. pyedb/dotnet/edb_core/edb_data/primitives_data.py +1397 -0
  36. pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +2914 -0
  37. pyedb/dotnet/edb_core/edb_data/simulation_setup.py +716 -0
  38. pyedb/dotnet/edb_core/edb_data/siwave_simulation_setup_data.py +1205 -0
  39. pyedb/dotnet/edb_core/edb_data/sources.py +514 -0
  40. pyedb/dotnet/edb_core/edb_data/terminals.py +632 -0
  41. pyedb/dotnet/edb_core/edb_data/utilities.py +148 -0
  42. pyedb/dotnet/edb_core/edb_data/variables.py +91 -0
  43. pyedb/dotnet/edb_core/general.py +181 -0
  44. pyedb/dotnet/edb_core/hfss.py +1646 -0
  45. pyedb/dotnet/edb_core/layout.py +1244 -0
  46. pyedb/dotnet/edb_core/layout_validation.py +272 -0
  47. pyedb/dotnet/edb_core/materials.py +939 -0
  48. pyedb/dotnet/edb_core/net_class.py +335 -0
  49. pyedb/dotnet/edb_core/nets.py +1215 -0
  50. pyedb/dotnet/edb_core/padstack.py +1389 -0
  51. pyedb/dotnet/edb_core/siwave.py +1427 -0
  52. pyedb/dotnet/edb_core/stackup.py +2703 -0
  53. pyedb/edb_logger.py +396 -0
  54. pyedb/generic/__init__.py +0 -0
  55. pyedb/generic/constants.py +1063 -0
  56. pyedb/generic/data_handlers.py +320 -0
  57. pyedb/generic/design_types.py +104 -0
  58. pyedb/generic/filesystem.py +150 -0
  59. pyedb/generic/general_methods.py +1535 -0
  60. pyedb/generic/plot.py +1840 -0
  61. pyedb/generic/process.py +285 -0
  62. pyedb/generic/settings.py +224 -0
  63. pyedb/ipc2581/__init__.py +0 -0
  64. pyedb/ipc2581/bom/__init__.py +0 -0
  65. pyedb/ipc2581/bom/bom.py +21 -0
  66. pyedb/ipc2581/bom/bom_item.py +32 -0
  67. pyedb/ipc2581/bom/characteristics.py +37 -0
  68. pyedb/ipc2581/bom/refdes.py +16 -0
  69. pyedb/ipc2581/content/__init__.py +0 -0
  70. pyedb/ipc2581/content/color.py +38 -0
  71. pyedb/ipc2581/content/content.py +55 -0
  72. pyedb/ipc2581/content/dictionary_color.py +29 -0
  73. pyedb/ipc2581/content/dictionary_fill.py +28 -0
  74. pyedb/ipc2581/content/dictionary_line.py +30 -0
  75. pyedb/ipc2581/content/entry_color.py +13 -0
  76. pyedb/ipc2581/content/entry_line.py +14 -0
  77. pyedb/ipc2581/content/fill.py +15 -0
  78. pyedb/ipc2581/content/layer_ref.py +10 -0
  79. pyedb/ipc2581/content/standard_geometries_dictionary.py +72 -0
  80. pyedb/ipc2581/ecad/__init__.py +0 -0
  81. pyedb/ipc2581/ecad/cad_data/__init__.py +0 -0
  82. pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +26 -0
  83. pyedb/ipc2581/ecad/cad_data/cad_data.py +37 -0
  84. pyedb/ipc2581/ecad/cad_data/component.py +41 -0
  85. pyedb/ipc2581/ecad/cad_data/drill.py +30 -0
  86. pyedb/ipc2581/ecad/cad_data/feature.py +54 -0
  87. pyedb/ipc2581/ecad/cad_data/layer.py +41 -0
  88. pyedb/ipc2581/ecad/cad_data/layer_feature.py +151 -0
  89. pyedb/ipc2581/ecad/cad_data/logical_net.py +32 -0
  90. pyedb/ipc2581/ecad/cad_data/outline.py +25 -0
  91. pyedb/ipc2581/ecad/cad_data/package.py +104 -0
  92. pyedb/ipc2581/ecad/cad_data/padstack_def.py +38 -0
  93. pyedb/ipc2581/ecad/cad_data/padstack_hole_def.py +24 -0
  94. pyedb/ipc2581/ecad/cad_data/padstack_instance.py +62 -0
  95. pyedb/ipc2581/ecad/cad_data/padstack_pad_def.py +26 -0
  96. pyedb/ipc2581/ecad/cad_data/path.py +89 -0
  97. pyedb/ipc2581/ecad/cad_data/phy_net.py +80 -0
  98. pyedb/ipc2581/ecad/cad_data/pin.py +31 -0
  99. pyedb/ipc2581/ecad/cad_data/polygon.py +169 -0
  100. pyedb/ipc2581/ecad/cad_data/profile.py +40 -0
  101. pyedb/ipc2581/ecad/cad_data/stackup.py +31 -0
  102. pyedb/ipc2581/ecad/cad_data/stackup_group.py +42 -0
  103. pyedb/ipc2581/ecad/cad_data/stackup_layer.py +21 -0
  104. pyedb/ipc2581/ecad/cad_data/step.py +275 -0
  105. pyedb/ipc2581/ecad/cad_header.py +33 -0
  106. pyedb/ipc2581/ecad/ecad.py +19 -0
  107. pyedb/ipc2581/ecad/spec.py +46 -0
  108. pyedb/ipc2581/history_record.py +37 -0
  109. pyedb/ipc2581/ipc2581.py +387 -0
  110. pyedb/ipc2581/logistic_header.py +25 -0
  111. pyedb/misc/__init__.py +0 -0
  112. pyedb/misc/aedtlib_personalib_install.py +14 -0
  113. pyedb/misc/downloads.py +322 -0
  114. pyedb/misc/misc.py +67 -0
  115. pyedb/misc/pyedb.runtimeconfig.json +13 -0
  116. pyedb/misc/siw_feature_config/__init__.py +0 -0
  117. pyedb/misc/siw_feature_config/emc/__init__.py +0 -0
  118. pyedb/misc/siw_feature_config/emc/component_tags.py +46 -0
  119. pyedb/misc/siw_feature_config/emc/net_tags.py +37 -0
  120. pyedb/misc/siw_feature_config/emc/tag_library.py +62 -0
  121. pyedb/misc/siw_feature_config/emc/xml_generic.py +78 -0
  122. pyedb/misc/siw_feature_config/emc_rule_checker_settings.py +179 -0
  123. pyedb/misc/utilities.py +27 -0
  124. pyedb/modeler/geometry_operators.py +2082 -0
  125. pyedb-0.2.0.dist-info/LICENSE +21 -0
  126. pyedb-0.2.0.dist-info/METADATA +208 -0
  127. pyedb-0.2.0.dist-info/RECORD +128 -0
  128. pyedb-0.2.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,179 @@
1
+ import json
2
+ from pyedb.generic.general_methods import ET
3
+
4
+ from pyedb.misc.siw_feature_config.emc.tag_library import \
5
+ TagLibrary
6
+ from pyedb.misc.siw_feature_config.emc.net_tags import NetTags
7
+ from pyedb.misc.siw_feature_config.emc.component_tags import \
8
+ ComponentTags
9
+
10
+
11
+ class EMCRuleCheckerSettings:
12
+ """Manages EMI scanner settings."""
13
+
14
+ def __init__(self):
15
+ self.version = "1.0"
16
+ self.encoding = "UTF-8"
17
+ self.standalone = "no"
18
+
19
+ self.tag_library = TagLibrary(None)
20
+ self.net_tags = NetTags(None)
21
+ self.component_tags = ComponentTags(None)
22
+
23
+ @property
24
+ def _element_tree(self):
25
+ """Element tree."""
26
+ root = ET.Element("EMCRuleCheckerSettings")
27
+
28
+ if self.tag_library:
29
+ self.tag_library.write_xml(root)
30
+ if self.net_tags:
31
+ self.net_tags.write_xml(root)
32
+ if self.component_tags:
33
+ self.component_tags.write_xml(root)
34
+
35
+ tree = ET.ElementTree(root)
36
+ ET.indent(tree, space="\t", level=0)
37
+ return tree
38
+
39
+ def read_xml(self, fpath):
40
+ """Read settings from a json file.
41
+
42
+ Parameters
43
+ ----------
44
+ fpath: str, Path
45
+ Path to file.
46
+ """
47
+ tree = ET.parse(fpath)
48
+ root = tree.getroot()
49
+
50
+ self.tag_library = TagLibrary(root.find("TagLibrary"))
51
+ self.net_tags = NetTags(root.find("NetTags"))
52
+ self.component_tags = ComponentTags(root.find("ComponentTags"))
53
+
54
+ def write_xml(self, fpath):
55
+ """Write settings to a file in xml format.
56
+
57
+ Parameters
58
+ ----------
59
+ fpath: str, Path
60
+ Path to file.
61
+ """
62
+ self._element_tree.write(fpath, encoding=self.encoding, xml_declaration=True)
63
+
64
+ def write_json(self, fpath):
65
+ """Write settings to a file in json format.
66
+
67
+ Parameters
68
+ ----------
69
+ fpath: str, Path
70
+ Path to file.
71
+ """
72
+ data = {}
73
+ self.tag_library.write_dict(data)
74
+ self.net_tags.write_dict(data)
75
+ self.component_tags.write_dict(data)
76
+
77
+ with open(fpath, "w") as f:
78
+ json.dump(data, f, indent=4)
79
+
80
+ def read_json(self, fpath):
81
+ """Read settings from a json file.
82
+
83
+ Parameters
84
+ ----------
85
+ fpath: str, Path
86
+ Path to file.
87
+ """
88
+ self.tag_library = TagLibrary(None)
89
+ self.net_tags = NetTags(None)
90
+ self.component_tags = ComponentTags(None)
91
+
92
+ with open(fpath) as f:
93
+ data = json.load(f)
94
+
95
+ tag_library = data["TagLibrary"] if "TagLibrary" in data else None
96
+ if tag_library:
97
+ self.tag_library.read_dict(tag_library)
98
+
99
+ net_tags = data["NetTags"] if "NetTags" in data else None
100
+ if net_tags:
101
+ self.net_tags.read_dict(net_tags)
102
+
103
+ component_tags = data["ComponentTags"] if "ComponentTags" in data else None
104
+ if component_tags:
105
+ self.component_tags.read_dict(component_tags)
106
+
107
+ def add_net(self, is_bus, is_clock, is_critical, name, net_type):
108
+ """Assign tags to a net.
109
+
110
+ Parameters
111
+ ----------
112
+ is_bus: str
113
+ Whether the net is a bus.
114
+ is_clock: str
115
+ Whether the net is a clock.
116
+ is_critical: str
117
+ Whether the net is critical.
118
+ name: str
119
+ Name of the net.
120
+ net_type: str
121
+ Type of the net.
122
+ """
123
+ kwargs = {
124
+ "isBus": is_bus,
125
+ "isClock": is_clock,
126
+ "isCritical": is_critical,
127
+ "name": name,
128
+ "type": net_type
129
+ }
130
+ self.net_tags.add_sub_element(kwargs, "Net")
131
+
132
+ def add_component(self,
133
+ comp_name,
134
+ comp_value,
135
+ device_name,
136
+ is_clock_driver,
137
+ is_high_speed,
138
+ is_ic,
139
+ is_oscillator,
140
+ x_loc,
141
+ y_loc,
142
+ cap_type=None,
143
+ ):
144
+ """Assign tags to a component.
145
+
146
+ Parameters
147
+ ----------
148
+ comp_name: str
149
+ Name of the component.
150
+ comp_value: str
151
+ Value of the component.
152
+ device_name: str
153
+ Name of the device.
154
+ is_clock_driver: str
155
+ Whether the component is a clock driver.
156
+ is_high_speed: str
157
+ Whether the component is a high speed.
158
+ is_ic: str
159
+ Whether the component is a IC.
160
+ is_oscillator: str
161
+ Whether the component is an oscillator.
162
+ x_loc: str
163
+ X coordinate.
164
+ y_loc: str
165
+ Y coordinate
166
+ cap_type: str, optional
167
+ Type of the capacitor. The default is ``"None"``. Options are ``"Decoupling"``, ``"Stitching"``.
168
+ """
169
+ kwargs = {"CompName": comp_name,
170
+ "CompValue": comp_value,
171
+ "DeviceName": device_name,
172
+ "capType": cap_type,
173
+ "isClockDriver": is_clock_driver,
174
+ "isHighSpeed": is_high_speed,
175
+ "isIC": is_ic,
176
+ "isOscillator": is_oscillator,
177
+ "xLoc": x_loc,
178
+ "yLoc": y_loc}
179
+ self.component_tags.add_sub_element(kwargs, "Comp")
@@ -0,0 +1,27 @@
1
+ from distutils.dir_util import copy_tree
2
+
3
+
4
+ class file_tools:
5
+ def __init__(self):
6
+ pass
7
+
8
+ @staticmethod
9
+ def copy_folder(source_folder, destination_folder):
10
+ """
11
+
12
+ Parameters
13
+ ----------
14
+ source_folder : str
15
+ source folder
16
+
17
+ destination_folder : str
18
+ destination folder.
19
+
20
+
21
+ Returns
22
+ -------
23
+
24
+ """
25
+
26
+ copy_tree(source_folder, destination_folder)
27
+ return True