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.
- pyedb/__init__.py +17 -0
- pyedb/dotnet/__init__.py +0 -0
- pyedb/dotnet/application/Variables.py +2261 -0
- pyedb/dotnet/application/__init__.py +0 -0
- pyedb/dotnet/clr_module.py +103 -0
- pyedb/dotnet/edb.py +4237 -0
- pyedb/dotnet/edb_core/__init__.py +1 -0
- pyedb/dotnet/edb_core/cell/__init__.py +0 -0
- pyedb/dotnet/edb_core/cell/hierarchy/__init__.py +0 -0
- pyedb/dotnet/edb_core/cell/hierarchy/model.py +66 -0
- pyedb/dotnet/edb_core/components.py +2669 -0
- pyedb/dotnet/edb_core/configuration.py +423 -0
- pyedb/dotnet/edb_core/definition/__init__.py +0 -0
- pyedb/dotnet/edb_core/definition/component_def.py +166 -0
- pyedb/dotnet/edb_core/definition/component_model.py +30 -0
- pyedb/dotnet/edb_core/definition/definition_obj.py +18 -0
- pyedb/dotnet/edb_core/definition/definitions.py +12 -0
- pyedb/dotnet/edb_core/dotnet/__init__.py +0 -0
- pyedb/dotnet/edb_core/dotnet/database.py +1218 -0
- pyedb/dotnet/edb_core/dotnet/layout.py +238 -0
- pyedb/dotnet/edb_core/dotnet/primitive.py +1517 -0
- pyedb/dotnet/edb_core/edb_data/__init__.py +0 -0
- pyedb/dotnet/edb_core/edb_data/components_data.py +938 -0
- pyedb/dotnet/edb_core/edb_data/connectable.py +113 -0
- pyedb/dotnet/edb_core/edb_data/control_file.py +1268 -0
- pyedb/dotnet/edb_core/edb_data/design_options.py +35 -0
- pyedb/dotnet/edb_core/edb_data/edbvalue.py +45 -0
- pyedb/dotnet/edb_core/edb_data/hfss_extent_info.py +330 -0
- pyedb/dotnet/edb_core/edb_data/hfss_simulation_setup_data.py +1607 -0
- pyedb/dotnet/edb_core/edb_data/layer_data.py +576 -0
- pyedb/dotnet/edb_core/edb_data/nets_data.py +281 -0
- pyedb/dotnet/edb_core/edb_data/obj_base.py +19 -0
- pyedb/dotnet/edb_core/edb_data/padstacks_data.py +2080 -0
- pyedb/dotnet/edb_core/edb_data/ports.py +287 -0
- pyedb/dotnet/edb_core/edb_data/primitives_data.py +1397 -0
- pyedb/dotnet/edb_core/edb_data/simulation_configuration.py +2914 -0
- pyedb/dotnet/edb_core/edb_data/simulation_setup.py +716 -0
- pyedb/dotnet/edb_core/edb_data/siwave_simulation_setup_data.py +1205 -0
- pyedb/dotnet/edb_core/edb_data/sources.py +514 -0
- pyedb/dotnet/edb_core/edb_data/terminals.py +632 -0
- pyedb/dotnet/edb_core/edb_data/utilities.py +148 -0
- pyedb/dotnet/edb_core/edb_data/variables.py +91 -0
- pyedb/dotnet/edb_core/general.py +181 -0
- pyedb/dotnet/edb_core/hfss.py +1646 -0
- pyedb/dotnet/edb_core/layout.py +1244 -0
- pyedb/dotnet/edb_core/layout_validation.py +272 -0
- pyedb/dotnet/edb_core/materials.py +939 -0
- pyedb/dotnet/edb_core/net_class.py +335 -0
- pyedb/dotnet/edb_core/nets.py +1215 -0
- pyedb/dotnet/edb_core/padstack.py +1389 -0
- pyedb/dotnet/edb_core/siwave.py +1427 -0
- pyedb/dotnet/edb_core/stackup.py +2703 -0
- pyedb/edb_logger.py +396 -0
- pyedb/generic/__init__.py +0 -0
- pyedb/generic/constants.py +1063 -0
- pyedb/generic/data_handlers.py +320 -0
- pyedb/generic/design_types.py +104 -0
- pyedb/generic/filesystem.py +150 -0
- pyedb/generic/general_methods.py +1535 -0
- pyedb/generic/plot.py +1840 -0
- pyedb/generic/process.py +285 -0
- pyedb/generic/settings.py +224 -0
- pyedb/ipc2581/__init__.py +0 -0
- pyedb/ipc2581/bom/__init__.py +0 -0
- pyedb/ipc2581/bom/bom.py +21 -0
- pyedb/ipc2581/bom/bom_item.py +32 -0
- pyedb/ipc2581/bom/characteristics.py +37 -0
- pyedb/ipc2581/bom/refdes.py +16 -0
- pyedb/ipc2581/content/__init__.py +0 -0
- pyedb/ipc2581/content/color.py +38 -0
- pyedb/ipc2581/content/content.py +55 -0
- pyedb/ipc2581/content/dictionary_color.py +29 -0
- pyedb/ipc2581/content/dictionary_fill.py +28 -0
- pyedb/ipc2581/content/dictionary_line.py +30 -0
- pyedb/ipc2581/content/entry_color.py +13 -0
- pyedb/ipc2581/content/entry_line.py +14 -0
- pyedb/ipc2581/content/fill.py +15 -0
- pyedb/ipc2581/content/layer_ref.py +10 -0
- pyedb/ipc2581/content/standard_geometries_dictionary.py +72 -0
- pyedb/ipc2581/ecad/__init__.py +0 -0
- pyedb/ipc2581/ecad/cad_data/__init__.py +0 -0
- pyedb/ipc2581/ecad/cad_data/assembly_drawing.py +26 -0
- pyedb/ipc2581/ecad/cad_data/cad_data.py +37 -0
- pyedb/ipc2581/ecad/cad_data/component.py +41 -0
- pyedb/ipc2581/ecad/cad_data/drill.py +30 -0
- pyedb/ipc2581/ecad/cad_data/feature.py +54 -0
- pyedb/ipc2581/ecad/cad_data/layer.py +41 -0
- pyedb/ipc2581/ecad/cad_data/layer_feature.py +151 -0
- pyedb/ipc2581/ecad/cad_data/logical_net.py +32 -0
- pyedb/ipc2581/ecad/cad_data/outline.py +25 -0
- pyedb/ipc2581/ecad/cad_data/package.py +104 -0
- pyedb/ipc2581/ecad/cad_data/padstack_def.py +38 -0
- pyedb/ipc2581/ecad/cad_data/padstack_hole_def.py +24 -0
- pyedb/ipc2581/ecad/cad_data/padstack_instance.py +62 -0
- pyedb/ipc2581/ecad/cad_data/padstack_pad_def.py +26 -0
- pyedb/ipc2581/ecad/cad_data/path.py +89 -0
- pyedb/ipc2581/ecad/cad_data/phy_net.py +80 -0
- pyedb/ipc2581/ecad/cad_data/pin.py +31 -0
- pyedb/ipc2581/ecad/cad_data/polygon.py +169 -0
- pyedb/ipc2581/ecad/cad_data/profile.py +40 -0
- pyedb/ipc2581/ecad/cad_data/stackup.py +31 -0
- pyedb/ipc2581/ecad/cad_data/stackup_group.py +42 -0
- pyedb/ipc2581/ecad/cad_data/stackup_layer.py +21 -0
- pyedb/ipc2581/ecad/cad_data/step.py +275 -0
- pyedb/ipc2581/ecad/cad_header.py +33 -0
- pyedb/ipc2581/ecad/ecad.py +19 -0
- pyedb/ipc2581/ecad/spec.py +46 -0
- pyedb/ipc2581/history_record.py +37 -0
- pyedb/ipc2581/ipc2581.py +387 -0
- pyedb/ipc2581/logistic_header.py +25 -0
- pyedb/misc/__init__.py +0 -0
- pyedb/misc/aedtlib_personalib_install.py +14 -0
- pyedb/misc/downloads.py +322 -0
- pyedb/misc/misc.py +67 -0
- pyedb/misc/pyedb.runtimeconfig.json +13 -0
- pyedb/misc/siw_feature_config/__init__.py +0 -0
- pyedb/misc/siw_feature_config/emc/__init__.py +0 -0
- pyedb/misc/siw_feature_config/emc/component_tags.py +46 -0
- pyedb/misc/siw_feature_config/emc/net_tags.py +37 -0
- pyedb/misc/siw_feature_config/emc/tag_library.py +62 -0
- pyedb/misc/siw_feature_config/emc/xml_generic.py +78 -0
- pyedb/misc/siw_feature_config/emc_rule_checker_settings.py +179 -0
- pyedb/misc/utilities.py +27 -0
- pyedb/modeler/geometry_operators.py +2082 -0
- pyedb-0.2.0.dist-info/LICENSE +21 -0
- pyedb-0.2.0.dist-info/METADATA +208 -0
- pyedb-0.2.0.dist-info/RECORD +128 -0
- 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")
|
pyedb/misc/utilities.py
ADDED
|
@@ -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
|