pyedb 0.42.0__py3-none-any.whl → 0.44.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 +1 -1
- pyedb/configuration/cfg_boundaries.py +155 -72
- pyedb/configuration/cfg_components.py +1 -1
- pyedb/configuration/cfg_general.py +34 -16
- pyedb/configuration/cfg_modeler.py +162 -67
- pyedb/configuration/cfg_nets.py +33 -17
- pyedb/configuration/cfg_operations.py +63 -31
- pyedb/configuration/cfg_package_definition.py +113 -52
- pyedb/configuration/cfg_padstacks.py +611 -256
- pyedb/configuration/cfg_pin_groups.py +75 -33
- pyedb/configuration/cfg_ports_sources.py +75 -15
- pyedb/configuration/cfg_s_parameter_models.py +125 -70
- pyedb/configuration/cfg_setup.py +301 -257
- pyedb/configuration/cfg_stackup.py +166 -90
- pyedb/configuration/configuration.py +342 -209
- pyedb/dotnet/database/edb_data/design_options.py +19 -1
- pyedb/dotnet/database/edb_data/padstacks_data.py +16 -6
- pyedb/dotnet/database/geometry/polygon_data.py +4 -2
- pyedb/dotnet/database/padstack.py +6 -2
- pyedb/dotnet/database/sim_setup_data/data/sweep_data.py +63 -10
- pyedb/dotnet/database/utilities/simulation_setup.py +14 -30
- pyedb/dotnet/database/utilities/siwave_simulation_setup.py +30 -0
- pyedb/dotnet/edb.py +75 -105
- pyedb/grpc/database/components.py +1 -1
- pyedb/grpc/database/definition/component_def.py +15 -0
- pyedb/grpc/database/definition/component_pin.py +1 -1
- pyedb/grpc/database/definition/materials.py +27 -0
- pyedb/grpc/database/definition/package_def.py +20 -2
- pyedb/grpc/database/definition/padstack_def.py +5 -2
- pyedb/grpc/database/hierarchy/component.py +4 -2
- pyedb/grpc/database/hierarchy/pingroup.py +12 -8
- pyedb/grpc/database/layers/layer.py +28 -0
- pyedb/grpc/database/layers/stackup_layer.py +281 -40
- pyedb/grpc/database/layout/layout.py +12 -6
- pyedb/grpc/database/modeler.py +8 -8
- pyedb/grpc/database/primitive/bondwire.py +3 -3
- pyedb/grpc/database/primitive/circle.py +1 -1
- pyedb/grpc/database/primitive/padstack_instance.py +13 -3
- pyedb/grpc/database/primitive/path.py +2 -2
- pyedb/grpc/database/primitive/polygon.py +3 -3
- pyedb/grpc/database/primitive/primitive.py +1 -1
- pyedb/grpc/database/primitive/rectangle.py +2 -2
- pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +73 -30
- pyedb/grpc/database/source_excitations.py +7 -7
- pyedb/grpc/database/stackup.py +14 -6
- pyedb/grpc/database/terminal/bundle_terminal.py +3 -3
- pyedb/grpc/database/terminal/edge_terminal.py +2 -2
- pyedb/grpc/database/terminal/padstack_instance_terminal.py +42 -2
- pyedb/grpc/database/terminal/pingroup_terminal.py +35 -2
- pyedb/grpc/database/terminal/point_terminal.py +10 -1
- pyedb/grpc/database/terminal/terminal.py +4 -4
- pyedb/grpc/database/utility/hfss_extent_info.py +14 -10
- pyedb/grpc/edb.py +8 -8
- pyedb/misc/misc.py +13 -0
- {pyedb-0.42.0.dist-info → pyedb-0.44.0.dist-info}/METADATA +1 -1
- {pyedb-0.42.0.dist-info → pyedb-0.44.0.dist-info}/RECORD +58 -58
- {pyedb-0.42.0.dist-info → pyedb-0.44.0.dist-info}/LICENSE +0 -0
- {pyedb-0.42.0.dist-info → pyedb-0.44.0.dist-info}/WHEEL +0 -0
|
@@ -24,9 +24,38 @@ from pyedb.configuration.cfg_common import CfgBase
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
class CfgCutout(CfgBase):
|
|
27
|
+
class Grpc:
|
|
28
|
+
def __init__(self, parent):
|
|
29
|
+
self.parent = parent
|
|
30
|
+
self._pedb = parent._pedb
|
|
31
|
+
|
|
32
|
+
def get_parameters_from_edb(self):
|
|
33
|
+
if "pyedb_cutout" in self._pedb.stackup.all_layers:
|
|
34
|
+
polygons = self._pedb.layout.find_primitive(layer_name="pyedb_cutout")
|
|
35
|
+
if polygons:
|
|
36
|
+
poly = polygons[0]
|
|
37
|
+
self.parent.custom_extent = poly.polygon_data.points
|
|
38
|
+
net_names = []
|
|
39
|
+
for name, obj in self._pedb.nets.nets.items():
|
|
40
|
+
if obj.primitives:
|
|
41
|
+
if obj.primitives[0].layer.name == "pyedb_cutout":
|
|
42
|
+
continue
|
|
43
|
+
else:
|
|
44
|
+
net_names.append(name)
|
|
45
|
+
self.parent.reference_list = []
|
|
46
|
+
self.parent.signal_list = net_names
|
|
47
|
+
return self.parent.export_properties()
|
|
48
|
+
|
|
49
|
+
class DotNet(Grpc):
|
|
50
|
+
def __init__(self, parent):
|
|
51
|
+
super().__init__(parent)
|
|
52
|
+
|
|
27
53
|
def __init__(self, pedb, **kwargs):
|
|
28
54
|
self._pedb = pedb
|
|
29
|
-
|
|
55
|
+
if self._pedb.grpc:
|
|
56
|
+
self.api = self.Grpc(self)
|
|
57
|
+
else:
|
|
58
|
+
self.api = self.DotNet(self)
|
|
30
59
|
self.signal_list = kwargs.get("signal_list")
|
|
31
60
|
self.reference_list = kwargs.get("reference_list")
|
|
32
61
|
self.extent_type = kwargs.get("extent_type")
|
|
@@ -52,23 +81,7 @@ class CfgCutout(CfgBase):
|
|
|
52
81
|
self.keep_lines_as_path = kwargs.get("keep_lines_as_path")
|
|
53
82
|
|
|
54
83
|
def get_data_from_db(self):
|
|
55
|
-
|
|
56
|
-
polygons = self._pedb.layout.find_primitive(layer_name="pyedb_cutout")
|
|
57
|
-
if polygons:
|
|
58
|
-
poly = polygons[0]
|
|
59
|
-
self.custom_extent = poly.polygon_data.points
|
|
60
|
-
|
|
61
|
-
net_names = []
|
|
62
|
-
for name, obj in self._pedb.nets.nets.items():
|
|
63
|
-
if obj.primitives:
|
|
64
|
-
if obj.primitives[0].layer.name == "pyedb_cutout":
|
|
65
|
-
continue
|
|
66
|
-
else:
|
|
67
|
-
net_names.append(name)
|
|
68
|
-
|
|
69
|
-
self.reference_list = []
|
|
70
|
-
self.signal_list = net_names
|
|
71
|
-
return self.export_properties()
|
|
84
|
+
return self.api.get_parameters_from_edb()
|
|
72
85
|
|
|
73
86
|
def export_properties(self):
|
|
74
87
|
return {
|
|
@@ -79,24 +92,43 @@ class CfgCutout(CfgBase):
|
|
|
79
92
|
|
|
80
93
|
|
|
81
94
|
class CfgOperations(CfgBase):
|
|
95
|
+
class Grpc:
|
|
96
|
+
def __init__(self, parent):
|
|
97
|
+
self.parent = parent
|
|
98
|
+
self._pedb = parent._pedb
|
|
99
|
+
|
|
100
|
+
def apply_on_edb(self):
|
|
101
|
+
if self.parent.op_cutout:
|
|
102
|
+
polygon_points = self._pedb.cutout(**self.parent.op_cutout.get_attributes())
|
|
103
|
+
if "pyedb_cutout" not in self._pedb.stackup.all_layers:
|
|
104
|
+
self._pedb.stackup.add_document_layer(name="pyedb_cutout")
|
|
105
|
+
self._pedb.modeler.create_polygon(
|
|
106
|
+
polygon_points, layer_name="pyedb_cutout", net_name="pyedb_cutout"
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
def get_parameter_from_edb(self):
|
|
110
|
+
self.parent.op_cutout = CfgCutout(self._pedb)
|
|
111
|
+
data_from_db = self.parent.op_cutout.get_data_from_db()
|
|
112
|
+
if data_from_db:
|
|
113
|
+
return {"cutout": data_from_db}
|
|
114
|
+
else:
|
|
115
|
+
return {}
|
|
116
|
+
|
|
117
|
+
class DotNet(Grpc):
|
|
118
|
+
def __init__(self, parent):
|
|
119
|
+
super().__init__(parent)
|
|
120
|
+
|
|
82
121
|
def __init__(self, pedb, data):
|
|
83
122
|
self._pedb = pedb
|
|
123
|
+
if self._pedb.grpc:
|
|
124
|
+
self.api = self.Grpc(self)
|
|
125
|
+
else:
|
|
126
|
+
self.api = self.DotNet(self)
|
|
84
127
|
self.op_cutout = CfgCutout(pedb, **data["cutout"]) if "cutout" in data else None
|
|
85
128
|
|
|
86
129
|
def apply(self):
|
|
87
130
|
"""Imports operation information from JSON."""
|
|
88
|
-
|
|
89
|
-
polygon_points = self._pedb.cutout(**self.op_cutout.get_attributes())
|
|
90
|
-
if "pyedb_cutout" not in self._pedb.stackup.all_layers:
|
|
91
|
-
self._pedb.stackup.add_document_layer(name="pyedb_cutout")
|
|
92
|
-
self._pedb.modeler.create_polygon(polygon_points, layer_name="pyedb_cutout", net_name="pyedb_cutout")
|
|
93
|
-
|
|
94
|
-
# create a polygon on pyedb layer
|
|
131
|
+
self.api.apply_on_edb()
|
|
95
132
|
|
|
96
133
|
def get_data_from_db(self):
|
|
97
|
-
self.
|
|
98
|
-
data_from_db = self.op_cutout.get_data_from_db()
|
|
99
|
-
if data_from_db:
|
|
100
|
-
return {"cutout": data_from_db}
|
|
101
|
-
else:
|
|
102
|
-
return {}
|
|
134
|
+
return self.api.get_parameter_from_edb()
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
23
|
from pyedb.configuration.cfg_common import CfgBase
|
|
24
|
-
from pyedb.dotnet.database.definition.package_def import PackageDef
|
|
25
24
|
|
|
26
25
|
|
|
27
26
|
class CfgPackage(CfgBase):
|
|
@@ -64,61 +63,123 @@ class CfgHeatSink(CfgBase):
|
|
|
64
63
|
|
|
65
64
|
|
|
66
65
|
class CfgPackageDefinitions:
|
|
66
|
+
class Grpc:
|
|
67
|
+
def __init__(self, parent):
|
|
68
|
+
self.parent = parent
|
|
69
|
+
self._pedb = parent._pedb
|
|
70
|
+
|
|
71
|
+
def set_parameter_to_edb(self):
|
|
72
|
+
from pyedb.grpc.database.definition.package_def import PackageDef
|
|
73
|
+
|
|
74
|
+
for pkg in self.parent.packages:
|
|
75
|
+
comp_def_from_db = self._pedb.definitions.component[pkg.component_definition]
|
|
76
|
+
if pkg.name in self._pedb.definitions.package:
|
|
77
|
+
self._pedb.definitions.package[pkg.name].delete()
|
|
78
|
+
|
|
79
|
+
if pkg.extent_bounding_box:
|
|
80
|
+
package_def = PackageDef(self._pedb, name=pkg.name, extent_bounding_box=pkg.extent_bounding_box)
|
|
81
|
+
else:
|
|
82
|
+
package_def = PackageDef(self._pedb, name=pkg.name, component_part_name=pkg.component_definition)
|
|
83
|
+
pkg.set_attributes(package_def)
|
|
84
|
+
|
|
85
|
+
if pkg.heatsink:
|
|
86
|
+
attrs = pkg.heatsink.get_attributes()
|
|
87
|
+
for attr, value in attrs.items():
|
|
88
|
+
package_def.set_heatsink(**attrs)
|
|
89
|
+
|
|
90
|
+
comp_list = dict()
|
|
91
|
+
if pkg.apply_to_all:
|
|
92
|
+
comp_list.update(
|
|
93
|
+
{
|
|
94
|
+
refdes: comp
|
|
95
|
+
for refdes, comp in comp_def_from_db.components.items()
|
|
96
|
+
if refdes not in pkg.components
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
else:
|
|
100
|
+
comp_list.update(
|
|
101
|
+
{
|
|
102
|
+
refdes: comp
|
|
103
|
+
for refdes, comp in comp_def_from_db.components.items()
|
|
104
|
+
if refdes in pkg.components
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
for _, i in comp_list.items():
|
|
108
|
+
i.package_def = pkg.name
|
|
109
|
+
|
|
110
|
+
def get_parameter_from_edb(self):
|
|
111
|
+
package_definitions = []
|
|
112
|
+
for pkg_name, pkg_obj in self._pedb.definitions.package.items():
|
|
113
|
+
pkg = {}
|
|
114
|
+
pkg_attrs = [i for i in dir(pkg_obj) if not i.startswith("_")]
|
|
115
|
+
pkg_attrs = {i for i in pkg_attrs if i in CfgPackage().__dict__}
|
|
116
|
+
for pkg_attr_name in pkg_attrs:
|
|
117
|
+
pkg[pkg_attr_name] = getattr(pkg_obj, pkg_attr_name)
|
|
118
|
+
hs_obj = pkg_obj.heatsink
|
|
119
|
+
if hs_obj:
|
|
120
|
+
hs = {}
|
|
121
|
+
hs_attrs = [i for i in dir(hs_obj) if not i.startswith("_")]
|
|
122
|
+
hs_attrs = [i for i in hs_attrs if i in CfgHeatSink().__dict__]
|
|
123
|
+
for hs_attr_name in hs_attrs:
|
|
124
|
+
hs[hs_attr_name] = getattr(hs_obj, hs_attr_name)
|
|
125
|
+
pkg["heatsink"] = hs
|
|
126
|
+
package_definitions.append(pkg)
|
|
127
|
+
|
|
128
|
+
return package_definitions
|
|
129
|
+
|
|
130
|
+
class DotNet(Grpc):
|
|
131
|
+
def __init__(self, parent):
|
|
132
|
+
super().__init__(parent)
|
|
133
|
+
|
|
134
|
+
def set_parameter_to_edb(self):
|
|
135
|
+
from pyedb.dotnet.database.definition.package_def import PackageDef
|
|
136
|
+
|
|
137
|
+
for pkg in self.parent.packages:
|
|
138
|
+
comp_def_from_db = self._pedb.definitions.component[pkg.component_definition]
|
|
139
|
+
if pkg.name in self._pedb.definitions.package:
|
|
140
|
+
self._pedb.definitions.package[pkg.name].delete()
|
|
141
|
+
|
|
142
|
+
if pkg.extent_bounding_box:
|
|
143
|
+
package_def = PackageDef(self._pedb, name=pkg.name, extent_bounding_box=pkg.extent_bounding_box)
|
|
144
|
+
else:
|
|
145
|
+
package_def = PackageDef(self._pedb, name=pkg.name, component_part_name=pkg.component_definition)
|
|
146
|
+
pkg.set_attributes(package_def)
|
|
147
|
+
|
|
148
|
+
if pkg.heatsink:
|
|
149
|
+
attrs = pkg.heatsink.get_attributes()
|
|
150
|
+
for attr, value in attrs.items():
|
|
151
|
+
package_def.set_heatsink(**attrs)
|
|
152
|
+
|
|
153
|
+
comp_list = dict()
|
|
154
|
+
if pkg.apply_to_all:
|
|
155
|
+
comp_list.update(
|
|
156
|
+
{
|
|
157
|
+
refdes: comp
|
|
158
|
+
for refdes, comp in comp_def_from_db.components.items()
|
|
159
|
+
if refdes not in pkg.components
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
else:
|
|
163
|
+
comp_list.update(
|
|
164
|
+
{
|
|
165
|
+
refdes: comp
|
|
166
|
+
for refdes, comp in comp_def_from_db.components.items()
|
|
167
|
+
if refdes in pkg.components
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
for _, i in comp_list.items():
|
|
171
|
+
i.package_def = pkg.name
|
|
172
|
+
|
|
67
173
|
def __init__(self, pedb, data):
|
|
68
174
|
self._pedb = pedb
|
|
175
|
+
if self._pedb.grpc:
|
|
176
|
+
self.api = self.Grpc(self)
|
|
177
|
+
else:
|
|
178
|
+
self.api = self.DotNet(self)
|
|
69
179
|
self.packages = [CfgPackage(**package) for package in data]
|
|
70
180
|
|
|
71
181
|
def apply(self):
|
|
72
|
-
|
|
73
|
-
comp_def_from_db = self._pedb.definitions.component[pkg.component_definition]
|
|
74
|
-
if pkg.name in self._pedb.definitions.package:
|
|
75
|
-
self._pedb.definitions.package[pkg.name].delete()
|
|
76
|
-
|
|
77
|
-
if pkg.extent_bounding_box:
|
|
78
|
-
package_def = PackageDef(self._pedb, name=pkg.name, extent_bounding_box=pkg.extent_bounding_box)
|
|
79
|
-
else:
|
|
80
|
-
package_def = PackageDef(self._pedb, name=pkg.name, component_part_name=pkg.component_definition)
|
|
81
|
-
pkg.set_attributes(package_def)
|
|
82
|
-
|
|
83
|
-
if pkg.heatsink:
|
|
84
|
-
attrs = pkg.heatsink.get_attributes()
|
|
85
|
-
for attr, value in attrs.items():
|
|
86
|
-
package_def.set_heatsink(**attrs)
|
|
87
|
-
|
|
88
|
-
comp_list = dict()
|
|
89
|
-
if pkg.apply_to_all:
|
|
90
|
-
comp_list.update(
|
|
91
|
-
{
|
|
92
|
-
refdes: comp
|
|
93
|
-
for refdes, comp in comp_def_from_db.components.items()
|
|
94
|
-
if refdes not in pkg.components
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
else:
|
|
98
|
-
comp_list.update(
|
|
99
|
-
{refdes: comp for refdes, comp in comp_def_from_db.components.items() if refdes in pkg.components}
|
|
100
|
-
)
|
|
101
|
-
for _, i in comp_list.items():
|
|
102
|
-
i.package_def = pkg.name
|
|
182
|
+
self.api.set_parameter_to_edb()
|
|
103
183
|
|
|
104
184
|
def get_data_from_db(self):
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
for pkg_name, pkg_obj in self._pedb.definitions.package.items():
|
|
108
|
-
pkg = {}
|
|
109
|
-
pkg_attrs = [i for i in dir(pkg_obj) if not i.startswith("_")]
|
|
110
|
-
pkg_attrs = {i for i in pkg_attrs if i in CfgPackage().__dict__}
|
|
111
|
-
for pkg_attr_name in pkg_attrs:
|
|
112
|
-
pkg[pkg_attr_name] = getattr(pkg_obj, pkg_attr_name)
|
|
113
|
-
|
|
114
|
-
hs_obj = pkg_obj.heatsink
|
|
115
|
-
if hs_obj:
|
|
116
|
-
hs = {}
|
|
117
|
-
hs_attrs = [i for i in dir(hs_obj) if not i.startswith("_")]
|
|
118
|
-
hs_attrs = [i for i in hs_attrs if i in CfgHeatSink().__dict__]
|
|
119
|
-
for hs_attr_name in hs_attrs:
|
|
120
|
-
hs[hs_attr_name] = getattr(hs_obj, hs_attr_name)
|
|
121
|
-
pkg["heatsink"] = hs
|
|
122
|
-
package_definitions.append(pkg)
|
|
123
|
-
|
|
124
|
-
return package_definitions
|
|
185
|
+
return self.api.get_parameter_from_edb()
|