pyedb 0.50.1__py3-none-any.whl → 0.51.2__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_ports_sources.py +79 -239
- pyedb/configuration/configuration.py +27 -0
- pyedb/dotnet/clr_module.py +9 -3
- pyedb/dotnet/database/cell/layout.py +10 -1
- pyedb/dotnet/database/dotnet/database.py +0 -2
- pyedb/dotnet/database/layout_validation.py +17 -13
- pyedb/dotnet/database/modeler.py +0 -1
- pyedb/dotnet/edb.py +7 -1
- pyedb/generic/design_types.py +183 -62
- pyedb/grpc/database/components.py +110 -0
- pyedb/grpc/database/control_file.py +150 -17
- pyedb/grpc/database/definitions.py +36 -2
- pyedb/grpc/database/hfss.py +15 -0
- pyedb/grpc/database/hierarchy/component.py +10 -2
- pyedb/grpc/database/layout_validation.py +58 -7
- pyedb/grpc/database/nets.py +233 -4
- pyedb/grpc/database/padstacks.py +97 -0
- pyedb/grpc/database/primitive/padstack_instance.py +1 -1
- pyedb/grpc/database/primitive/polygon.py +1 -1
- pyedb/grpc/database/siwave.py +63 -3
- pyedb/grpc/database/source_excitations.py +307 -40
- pyedb/grpc/database/stackup.py +107 -2
- pyedb/grpc/database/terminal/point_terminal.py +2 -2
- pyedb/grpc/database/terminal/terminal.py +1 -1
- pyedb/grpc/edb.py +134 -81
- pyedb/grpc/edb_init.py +50 -3
- {pyedb-0.50.1.dist-info → pyedb-0.51.2.dist-info}/METADATA +1 -1
- {pyedb-0.50.1.dist-info → pyedb-0.51.2.dist-info}/RECORD +31 -31
- {pyedb-0.50.1.dist-info → pyedb-0.51.2.dist-info}/LICENSE +0 -0
- {pyedb-0.50.1.dist-info → pyedb-0.51.2.dist-info}/WHEEL +0 -0
pyedb/__init__.py
CHANGED
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
|
-
import os
|
|
23
22
|
|
|
24
23
|
import numpy as np
|
|
25
24
|
|
|
@@ -33,29 +32,11 @@ from pyedb.dotnet.database.geometry.point_data import PointData
|
|
|
33
32
|
class CfgTerminalInfo(CfgBase):
|
|
34
33
|
CFG_TERMINAL_TYPES = ["pin", "net", "pin_group", "nearest_pin", "coordinates"]
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
self.parent = parent
|
|
39
|
-
self._pedb = parent._pedb
|
|
40
|
-
|
|
41
|
-
def update_contact_radius(self, radius):
|
|
42
|
-
from ansys.edb.core.utility.value import Value as GrpcValue
|
|
43
|
-
|
|
44
|
-
self.parent.contact_radius = GrpcValue(radius).value
|
|
45
|
-
|
|
46
|
-
class DotNet(Grpc):
|
|
47
|
-
def __init__(self, parent):
|
|
48
|
-
super().__init__(parent)
|
|
49
|
-
|
|
50
|
-
def update_contact_radius(self, radius):
|
|
51
|
-
self.parent.contact_radius = self._pedb.edb_value(radius).ToDouble()
|
|
35
|
+
def update_contact_radius(self, radius):
|
|
36
|
+
self.contact_radius = self._pedb.edb_value(radius).ToDouble()
|
|
52
37
|
|
|
53
38
|
def __init__(self, pedb, **kwargs):
|
|
54
39
|
self._pedb = pedb
|
|
55
|
-
if self._pedb.grpc:
|
|
56
|
-
self.api = self.Grpc(self)
|
|
57
|
-
else:
|
|
58
|
-
self.api = self.DotNet(self)
|
|
59
40
|
|
|
60
41
|
if kwargs.get("padstack"):
|
|
61
42
|
self.type = "padstack"
|
|
@@ -76,7 +57,8 @@ class CfgTerminalInfo(CfgBase):
|
|
|
76
57
|
|
|
77
58
|
self.contact_type = kwargs.get("contact_type", "default") # options are full, center, quad, inline
|
|
78
59
|
contact_radius = "0.1mm" if kwargs.get("contact_radius") is None else kwargs.get("contact_radius")
|
|
79
|
-
|
|
60
|
+
|
|
61
|
+
self.contact_radius = self._pedb.edb_value(contact_radius).ToDouble()
|
|
80
62
|
self.num_of_contact = kwargs.get("num_of_contact", 4)
|
|
81
63
|
self.contact_expansion = kwargs.get("contact_expansion", 1)
|
|
82
64
|
|
|
@@ -108,27 +90,11 @@ class CfgNearestPinTerminalInfo(CfgTerminalInfo):
|
|
|
108
90
|
|
|
109
91
|
|
|
110
92
|
class CfgSources:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
self.parent = parent
|
|
114
|
-
self._pedb = parent._pedb
|
|
115
|
-
|
|
116
|
-
def get_pin_group_name(self, src):
|
|
117
|
-
return src.pin_group.name
|
|
118
|
-
|
|
119
|
-
class DotNet(Grpc):
|
|
120
|
-
def __init__(self, parent):
|
|
121
|
-
super().__init__(parent)
|
|
122
|
-
|
|
123
|
-
def get_pin_group_name(self, src):
|
|
124
|
-
return src._edb_object.GetPinGroup().GetName()
|
|
93
|
+
def get_pin_group_name(self, src):
|
|
94
|
+
return src._edb_object.GetPinGroup().GetName()
|
|
125
95
|
|
|
126
96
|
def __init__(self, pedb, sources_data):
|
|
127
97
|
self._pedb = pedb
|
|
128
|
-
if self._pedb.grpc:
|
|
129
|
-
self.api = self.Grpc(self)
|
|
130
|
-
else:
|
|
131
|
-
self.api = self.DotNet(self)
|
|
132
98
|
self.sources = [CfgSource(self._pedb, **src) for src in sources_data]
|
|
133
99
|
|
|
134
100
|
def apply(self):
|
|
@@ -147,7 +113,7 @@ class CfgSources:
|
|
|
147
113
|
|
|
148
114
|
if src.terminal_type == "PinGroupTerminal":
|
|
149
115
|
refdes = ""
|
|
150
|
-
pg = self._pedb.siwave.pin_groups[self.
|
|
116
|
+
pg = self._pedb.siwave.pin_groups[self.get_pin_group_name(src)]
|
|
151
117
|
pos_term_info = {"pin_group": pg.name}
|
|
152
118
|
elif src.terminal_type == "PadstackInstanceTerminal":
|
|
153
119
|
refdes = src.component.refdes if src.component else ""
|
|
@@ -155,7 +121,7 @@ class CfgSources:
|
|
|
155
121
|
|
|
156
122
|
neg_term = self._pedb.terminals[src.ref_terminal.name]
|
|
157
123
|
if neg_term.terminal_type == "PinGroupTerminal":
|
|
158
|
-
pg = self._pedb.siwave.pin_groups[self.
|
|
124
|
+
pg = self._pedb.siwave.pin_groups[self.get_pin_group_name(neg_term)]
|
|
159
125
|
neg_term_info = {"pin_group": pg.name}
|
|
160
126
|
elif neg_term.terminal_type == "PadstackInstanceTerminal":
|
|
161
127
|
neg_term_info = {"padstack": neg_term.padstack_instance.aedt_name}
|
|
@@ -180,68 +146,29 @@ class CfgSources:
|
|
|
180
146
|
|
|
181
147
|
|
|
182
148
|
class CfgPorts:
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
self.parent = parent
|
|
186
|
-
self._pedb = parent._pedb
|
|
187
|
-
|
|
188
|
-
def get_pin_group(self, port):
|
|
189
|
-
return self._pedb.siwave.pin_groups[port._edb_object.pin_group.name]
|
|
190
|
-
|
|
191
|
-
def get_edge_info(self, port):
|
|
192
|
-
return port._edb_object.GetEdges()[0].GetParameters()
|
|
193
|
-
|
|
194
|
-
def _get_edge_port_from_edb(self, p, port_type):
|
|
195
|
-
# primitive, point = p._edb_object.GetEdges()[0].GetParameters()
|
|
196
|
-
edges = p.edges
|
|
197
|
-
primitive = None
|
|
198
|
-
point = None
|
|
199
|
-
primitive = Primitive(self._pedb, primitive)
|
|
200
|
-
point = PointData(self._pedb, point)
|
|
201
|
-
|
|
202
|
-
cfg_port = CfgEdgePort(
|
|
203
|
-
self._pedb,
|
|
204
|
-
name=p.name,
|
|
205
|
-
type=port_type,
|
|
206
|
-
primitive_name=primitive.aedt_name,
|
|
207
|
-
point_on_edge=[point._edb_object.X.ToString(), point._edb_object.Y.ToString()],
|
|
208
|
-
horizontal_extent_factor=p.horizontal_extent_factor,
|
|
209
|
-
vertical_extent_factor=p.vertical_extent_factor,
|
|
210
|
-
pec_launch_width=p.pec_launch_width,
|
|
211
|
-
)
|
|
212
|
-
return cfg_port
|
|
149
|
+
def get_pin_group(self, port):
|
|
150
|
+
return self._pedb.siwave.pin_groups[port._edb_object.GetPinGroup().GetName()]
|
|
213
151
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
super().__init__(parent)
|
|
152
|
+
def _get_edge_port_from_edb(self, p, port_type):
|
|
153
|
+
_, primitive, point = p._edb_object.GetEdges()[0].GetParameters()
|
|
217
154
|
|
|
218
|
-
|
|
219
|
-
|
|
155
|
+
primitive = Primitive(self._pedb, primitive)
|
|
156
|
+
point = PointData(self._pedb, point)
|
|
220
157
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
point_on_edge=[point._edb_object.X.ToString(), point._edb_object.Y.ToString()],
|
|
233
|
-
horizontal_extent_factor=p.horizontal_extent_factor,
|
|
234
|
-
vertical_extent_factor=p.vertical_extent_factor,
|
|
235
|
-
pec_launch_width=p.pec_launch_width,
|
|
236
|
-
)
|
|
237
|
-
return cfg_port
|
|
158
|
+
cfg_port = CfgEdgePort(
|
|
159
|
+
self._pedb,
|
|
160
|
+
name=p.name,
|
|
161
|
+
type=port_type,
|
|
162
|
+
primitive_name=primitive.aedt_name,
|
|
163
|
+
point_on_edge=[point._edb_object.X.ToString(), point._edb_object.Y.ToString()],
|
|
164
|
+
horizontal_extent_factor=p.horizontal_extent_factor,
|
|
165
|
+
vertical_extent_factor=p.vertical_extent_factor,
|
|
166
|
+
pec_launch_width=p.pec_launch_width,
|
|
167
|
+
)
|
|
168
|
+
return cfg_port
|
|
238
169
|
|
|
239
170
|
def __init__(self, pedb, ports_data):
|
|
240
171
|
self._pedb = pedb
|
|
241
|
-
if self._pedb.grpc:
|
|
242
|
-
self.api = self.Grpc(self)
|
|
243
|
-
else:
|
|
244
|
-
self.api = self.DotNet(self)
|
|
245
172
|
self.ports = []
|
|
246
173
|
for p in ports_data:
|
|
247
174
|
if p["type"] == "wave_port":
|
|
@@ -256,18 +183,8 @@ class CfgPorts:
|
|
|
256
183
|
raise ValueError("Unknown port type")
|
|
257
184
|
|
|
258
185
|
def apply(self):
|
|
259
|
-
edb_primitives = {}
|
|
260
|
-
for i in self._pedb.layout.primitives:
|
|
261
|
-
if i.aedt_name:
|
|
262
|
-
edb_primitives[i.aedt_name] = i
|
|
263
|
-
for i in self._pedb.layout.padstack_instances:
|
|
264
|
-
if i.aedt_name:
|
|
265
|
-
edb_primitives[i.aedt_name] = i
|
|
266
186
|
for p in self.ports:
|
|
267
|
-
|
|
268
|
-
p.set_parameters_to_edb(edb_primitives)
|
|
269
|
-
else:
|
|
270
|
-
p.set_parameters_to_edb()
|
|
187
|
+
p.set_parameters_to_edb()
|
|
271
188
|
|
|
272
189
|
def get_data_from_db(self):
|
|
273
190
|
self.ports = []
|
|
@@ -289,7 +206,7 @@ class CfgPorts:
|
|
|
289
206
|
|
|
290
207
|
if p.terminal_type == "PinGroupTerminal":
|
|
291
208
|
refdes = ""
|
|
292
|
-
pg = self.
|
|
209
|
+
pg = self.get_pin_group(p)
|
|
293
210
|
pos_term_info = {"pin_group": pg.name}
|
|
294
211
|
elif p.terminal_type == "PadstackInstanceTerminal":
|
|
295
212
|
refdes = p.component.refdes if p.component else ""
|
|
@@ -301,7 +218,7 @@ class CfgPorts:
|
|
|
301
218
|
if port_type == "circuit":
|
|
302
219
|
neg_term = self._pedb.terminals[p.ref_terminal.name]
|
|
303
220
|
if neg_term.terminal_type == "PinGroupTerminal":
|
|
304
|
-
pg = self.
|
|
221
|
+
pg = self.get_pin_group(neg_term)
|
|
305
222
|
# pg = self._pedb.siwave.pin_groups[neg_term._edb_object.GetPinGroup().GetName()]
|
|
306
223
|
neg_term_info = {"pin_group": pg.name}
|
|
307
224
|
elif neg_term.terminal_type == "PadstackInstanceTerminal":
|
|
@@ -332,7 +249,7 @@ class CfgPorts:
|
|
|
332
249
|
positive_terminal=pos_term_info,
|
|
333
250
|
)
|
|
334
251
|
else:
|
|
335
|
-
cfg_port = self.
|
|
252
|
+
cfg_port = self._get_edge_port_from_edb(p, port_type)
|
|
336
253
|
self.ports.append(cfg_port)
|
|
337
254
|
return self.export_properties()
|
|
338
255
|
|
|
@@ -350,7 +267,7 @@ class CfgProbes:
|
|
|
350
267
|
|
|
351
268
|
def apply(self):
|
|
352
269
|
for probe in self.probes:
|
|
353
|
-
probe.
|
|
270
|
+
probe.set_parameters_to_edb()
|
|
354
271
|
|
|
355
272
|
|
|
356
273
|
class CfgCircuitElement(CfgBase):
|
|
@@ -740,134 +657,63 @@ class CfgSource(CfgCircuitElement):
|
|
|
740
657
|
|
|
741
658
|
|
|
742
659
|
class CfgProbe(CfgCircuitElement):
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
else:
|
|
755
|
-
elem = self.pedb.create_voltage_probe(j, self.parent.neg_terminal)
|
|
756
|
-
elem.name = self.parent.name
|
|
757
|
-
circuit_elements.append(elem)
|
|
758
|
-
return circuit_elements
|
|
759
|
-
|
|
760
|
-
class Grpc(Common):
|
|
761
|
-
def __init__(self, parent):
|
|
762
|
-
super().__init__(parent)
|
|
763
|
-
|
|
764
|
-
class DotNet(Grpc):
|
|
765
|
-
def __init__(self, parent):
|
|
766
|
-
super().__init__(parent)
|
|
660
|
+
def set_parameters_to_edb(self):
|
|
661
|
+
self.create_terminals()
|
|
662
|
+
circuit_elements = []
|
|
663
|
+
for name, j in self.pos_terminals.items():
|
|
664
|
+
if isinstance(self.neg_terminal, dict):
|
|
665
|
+
elem = self._pedb.create_voltage_probe(j, self.neg_terminal[name])
|
|
666
|
+
else:
|
|
667
|
+
elem = self._pedb.create_voltage_probe(j, self.neg_terminal)
|
|
668
|
+
elem.name = self.name
|
|
669
|
+
circuit_elements.append(elem)
|
|
670
|
+
return circuit_elements
|
|
767
671
|
|
|
768
672
|
def __init__(self, pedb, **kwargs):
|
|
769
673
|
kwargs["type"] = "probe"
|
|
770
674
|
super().__init__(pedb, **kwargs)
|
|
771
|
-
if os.environ["PYEDB_USE_DOTNET"] == "0":
|
|
772
|
-
self.api = self.Grpc(self)
|
|
773
|
-
else:
|
|
774
|
-
self.api = self.DotNet(self)
|
|
775
675
|
|
|
776
676
|
|
|
777
677
|
class CfgEdgePort:
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
)
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
wave_port.horizontal_extent_factor = self.parent.horizontal_extent_factor
|
|
804
|
-
wave_port.vertical_extent_factor = self.parent.vertical_extent_factor
|
|
805
|
-
wave_port.pec_launch_width = self.parent.pec_launch_width
|
|
806
|
-
if self.parent.type == "wave_port":
|
|
807
|
-
wave_port.hfss_type = "Wave"
|
|
808
|
-
else:
|
|
809
|
-
wave_port.hfss_type = "Gap"
|
|
810
|
-
wave_port.do_renormalize = True
|
|
811
|
-
return wave_port
|
|
812
|
-
|
|
813
|
-
def export_properties(self):
|
|
814
|
-
return {
|
|
815
|
-
"name": self.name,
|
|
816
|
-
"type": self.type,
|
|
817
|
-
"primitive_name": self.primitive_name,
|
|
818
|
-
"point_on_edge": self.point_on_edge,
|
|
819
|
-
"horizontal_extent_factor": self.horizontal_extent_factor,
|
|
820
|
-
"vertical_extent_factor": self.vertical_extent_factor,
|
|
821
|
-
"pec_launch_width": self.pec_launch_width,
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
class DotNet(Grpc):
|
|
825
|
-
def __init__(self, parent):
|
|
826
|
-
super().__init__(parent)
|
|
678
|
+
def set_parameters_to_edb(self):
|
|
679
|
+
point_on_edge = PointData(self._pedb, x=self.point_on_edge[0], y=self.point_on_edge[1])
|
|
680
|
+
primitive = self._pedb.layout.primitives_by_aedt_name[self.primitive_name]
|
|
681
|
+
pos_edge = self._pedb.edb_api.cell.terminal.PrimitiveEdge.Create(
|
|
682
|
+
primitive._edb_object, point_on_edge._edb_object
|
|
683
|
+
)
|
|
684
|
+
pos_edge = convert_py_list_to_net_list(pos_edge, self._pedb.edb_api.cell.terminal.Edge)
|
|
685
|
+
edge_term = self._pedb.edb_api.cell.terminal.EdgeTerminal.Create(
|
|
686
|
+
primitive._edb_object.GetLayout(),
|
|
687
|
+
primitive._edb_object.GetNet(),
|
|
688
|
+
self.name,
|
|
689
|
+
pos_edge,
|
|
690
|
+
isRef=False,
|
|
691
|
+
)
|
|
692
|
+
edge_term.SetImpedance(self._pedb.edb_value(50))
|
|
693
|
+
wave_port = WavePort(self._pedb, edge_term)
|
|
694
|
+
wave_port.horizontal_extent_factor = self.horizontal_extent_factor
|
|
695
|
+
wave_port.vertical_extent_factor = self.vertical_extent_factor
|
|
696
|
+
wave_port.pec_launch_width = self.pec_launch_width
|
|
697
|
+
if self.type == "wave_port":
|
|
698
|
+
wave_port.hfss_type = "Wave"
|
|
699
|
+
else:
|
|
700
|
+
wave_port.hfss_type = "Gap"
|
|
701
|
+
wave_port.do_renormalize = True
|
|
702
|
+
return wave_port
|
|
827
703
|
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
self.parent.name,
|
|
839
|
-
pos_edge,
|
|
840
|
-
isRef=False,
|
|
841
|
-
)
|
|
842
|
-
edge_term.SetImpedance(self._pedb.edb_value(50))
|
|
843
|
-
wave_port = WavePort(self._pedb, edge_term)
|
|
844
|
-
wave_port.horizontal_extent_factor = self.parent.horizontal_extent_factor
|
|
845
|
-
wave_port.vertical_extent_factor = self.parent.vertical_extent_factor
|
|
846
|
-
wave_port.pec_launch_width = self.parent.pec_launch_width
|
|
847
|
-
if self.parent.type == "wave_port":
|
|
848
|
-
wave_port.hfss_type = "Wave"
|
|
849
|
-
else:
|
|
850
|
-
wave_port.hfss_type = "Gap"
|
|
851
|
-
wave_port.do_renormalize = True
|
|
852
|
-
return wave_port
|
|
853
|
-
|
|
854
|
-
def export_properties(self):
|
|
855
|
-
return {
|
|
856
|
-
"name": self.parent.name,
|
|
857
|
-
"type": self.parent.type,
|
|
858
|
-
"primitive_name": self.parent.primitive_name,
|
|
859
|
-
"point_on_edge": self.parent.point_on_edge,
|
|
860
|
-
"horizontal_extent_factor": self.parent.horizontal_extent_factor,
|
|
861
|
-
"vertical_extent_factor": self.parent.vertical_extent_factor,
|
|
862
|
-
"pec_launch_width": self.parent.pec_launch_width,
|
|
863
|
-
}
|
|
704
|
+
def export_properties(self):
|
|
705
|
+
return {
|
|
706
|
+
"name": self.name,
|
|
707
|
+
"type": self.type,
|
|
708
|
+
"primitive_name": self.primitive_name,
|
|
709
|
+
"point_on_edge": self.point_on_edge,
|
|
710
|
+
"horizontal_extent_factor": self.horizontal_extent_factor,
|
|
711
|
+
"vertical_extent_factor": self.vertical_extent_factor,
|
|
712
|
+
"pec_launch_width": self.pec_launch_width,
|
|
713
|
+
}
|
|
864
714
|
|
|
865
715
|
def __init__(self, pedb, **kwargs):
|
|
866
716
|
self._pedb = pedb
|
|
867
|
-
if self._pedb.grpc:
|
|
868
|
-
self.api = self.Grpc(self)
|
|
869
|
-
else:
|
|
870
|
-
self.api = self.DotNet(self)
|
|
871
717
|
self.name = kwargs["name"]
|
|
872
718
|
self.type = kwargs["type"]
|
|
873
719
|
self.primitive_name = kwargs["primitive_name"]
|
|
@@ -876,12 +722,6 @@ class CfgEdgePort:
|
|
|
876
722
|
self.vertical_extent_factor = kwargs.get("vertical_extent_factor", 3)
|
|
877
723
|
self.pec_launch_width = kwargs.get("pec_launch_width", "0.01mm")
|
|
878
724
|
|
|
879
|
-
def set_parameters_to_edb(self, edb_primitives):
|
|
880
|
-
return self.api.set_parameters_to_edb(edb_primitives)
|
|
881
|
-
|
|
882
|
-
def export_properties(self):
|
|
883
|
-
return self.api.export_properties()
|
|
884
|
-
|
|
885
725
|
|
|
886
726
|
class CfgDiffWavePort:
|
|
887
727
|
def __init__(self, pedb, **kwargs):
|
|
@@ -911,9 +751,9 @@ class CfgDiffWavePort:
|
|
|
911
751
|
**kwargs["negative_terminal"],
|
|
912
752
|
)
|
|
913
753
|
|
|
914
|
-
def set_parameters_to_edb(self
|
|
915
|
-
pos_term = self.positive_port.set_parameters_to_edb(
|
|
916
|
-
neg_term = self.negative_port.set_parameters_to_edb(
|
|
754
|
+
def set_parameters_to_edb(self):
|
|
755
|
+
pos_term = self.positive_port.set_parameters_to_edb()
|
|
756
|
+
neg_term = self.negative_port.set_parameters_to_edb()
|
|
917
757
|
edb_list = convert_py_list_to_net_list(
|
|
918
758
|
[pos_term._edb_object, neg_term._edb_object], self._pedb.edb_api.cell.terminal.Terminal
|
|
919
759
|
)
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
# SOFTWARE.
|
|
22
22
|
|
|
23
|
+
from datetime import datetime
|
|
23
24
|
import json
|
|
24
25
|
import os
|
|
25
26
|
from pathlib import Path
|
|
@@ -446,50 +447,76 @@ class Configuration:
|
|
|
446
447
|
self.cfg_data.general.apply()
|
|
447
448
|
|
|
448
449
|
# Configure boundary settings
|
|
450
|
+
now = datetime.now()
|
|
449
451
|
if self.cfg_data.boundaries:
|
|
450
452
|
self.cfg_data.boundaries.apply()
|
|
453
|
+
self._pedb.logger.info(f"Updating boundaries finished. Time lapse {datetime.now() - now}")
|
|
454
|
+
now = datetime.now()
|
|
451
455
|
|
|
452
456
|
# Configure nets
|
|
453
457
|
if self.cfg_data.nets:
|
|
454
458
|
self.cfg_data.nets.apply()
|
|
459
|
+
self._pedb.logger.info(f"Updating nets finished. Time lapse {datetime.now() - now}")
|
|
460
|
+
now = datetime.now()
|
|
455
461
|
|
|
456
462
|
# Configure components
|
|
457
463
|
self.cfg_data.components.apply()
|
|
464
|
+
self._pedb.logger.info(f"Updating components finished. Time lapse {datetime.now() - now}")
|
|
465
|
+
now = datetime.now()
|
|
458
466
|
|
|
459
467
|
# Configure pin groups
|
|
460
468
|
self.cfg_data.pin_groups.apply()
|
|
469
|
+
self._pedb.logger.info(f"Creating pin groups finished. Time lapse {datetime.now() - now}")
|
|
470
|
+
now = datetime.now()
|
|
461
471
|
|
|
462
472
|
# Configure sources
|
|
463
473
|
self.cfg_data.sources.apply()
|
|
474
|
+
self._pedb.logger.info(f"Placing sources finished. Time lapse {datetime.now() - now}")
|
|
475
|
+
now = datetime.now()
|
|
464
476
|
|
|
465
477
|
# Configure setup
|
|
466
478
|
self.cfg_data.setups.apply()
|
|
479
|
+
self._pedb.logger.info(f"Creating setups finished. Time lapse {datetime.now() - now}")
|
|
480
|
+
now = datetime.now()
|
|
467
481
|
|
|
468
482
|
# Configure stackup
|
|
469
483
|
self.api.configuration_stackup(kwargs)
|
|
484
|
+
self._pedb.logger.info(f"Updating stackup finished. Time lapse {datetime.now() - now}")
|
|
485
|
+
now = datetime.now()
|
|
470
486
|
|
|
471
487
|
# Configure padstacks
|
|
472
488
|
if self.cfg_data.padstacks:
|
|
473
489
|
self.cfg_data.padstacks.apply()
|
|
490
|
+
self._pedb.logger.info(f"Applying padstacks finished. Time lapse {datetime.now() - now}")
|
|
491
|
+
now = datetime.now()
|
|
474
492
|
|
|
475
493
|
# Configure S-parameter
|
|
476
494
|
self.cfg_data.s_parameters.apply()
|
|
495
|
+
self._pedb.logger.info(f"Applying S-parameters finished. Time lapse {datetime.now() - now}")
|
|
496
|
+
now = datetime.now()
|
|
477
497
|
|
|
478
498
|
# Configure SPICE models
|
|
479
499
|
for spice_model in self.cfg_data.spice_models:
|
|
480
500
|
spice_model.apply()
|
|
501
|
+
self._pedb.logger.info(f"Assigning Spice models finished. Time lapse {datetime.now() - now}")
|
|
502
|
+
now = datetime.now()
|
|
481
503
|
|
|
482
504
|
# Configure package definitions
|
|
483
505
|
self.cfg_data.package_definitions.apply()
|
|
506
|
+
self._pedb.logger.info(f"Applying package definitions finished. Time lapse {datetime.now() - now}")
|
|
507
|
+
now = datetime.now()
|
|
484
508
|
|
|
485
509
|
# Modeler
|
|
486
510
|
self.cfg_data.modeler.apply()
|
|
487
511
|
|
|
488
512
|
# Configure ports
|
|
489
513
|
self.cfg_data.ports.apply()
|
|
514
|
+
self._pedb.logger.info(f"Placing ports finished. Time lapse {datetime.now() - now}")
|
|
515
|
+
now = datetime.now()
|
|
490
516
|
|
|
491
517
|
# Configure probes
|
|
492
518
|
self.cfg_data.probes.apply()
|
|
519
|
+
self._pedb.logger.info(f"Placing probes finished. Time lapse {datetime.now() - now}")
|
|
493
520
|
|
|
494
521
|
# Configure operations
|
|
495
522
|
self.cfg_data.operations.apply()
|
pyedb/dotnet/clr_module.py
CHANGED
|
@@ -38,6 +38,7 @@ if is_linux: # pragma: no cover
|
|
|
38
38
|
|
|
39
39
|
dotnet_root = None
|
|
40
40
|
runtime_config = None
|
|
41
|
+
runtime_spec = None
|
|
41
42
|
# Use system .NET core runtime or fall back to dotnetcore2
|
|
42
43
|
if os.environ.get("DOTNET_ROOT") is None:
|
|
43
44
|
try:
|
|
@@ -78,11 +79,16 @@ if is_linux: # pragma: no cover
|
|
|
78
79
|
"Please ensure that .NET SDK is correctly installed or "
|
|
79
80
|
"that DOTNET_ROOT is correctly set."
|
|
80
81
|
)
|
|
81
|
-
|
|
82
|
+
runtime_spec = candidates[0]
|
|
82
83
|
# Use specific .NET core runtime
|
|
83
|
-
if dotnet_root is not None and runtime_config is not None:
|
|
84
|
+
if dotnet_root is not None and (runtime_config is not None or runtime_spec is not None):
|
|
84
85
|
try:
|
|
85
|
-
load(
|
|
86
|
+
load(
|
|
87
|
+
"coreclr",
|
|
88
|
+
runtime_config=str(runtime_config) if runtime_config else None,
|
|
89
|
+
runtime_spec=runtime_spec,
|
|
90
|
+
dotnet_root=str(dotnet_root),
|
|
91
|
+
)
|
|
86
92
|
os.environ["DOTNET_ROOT"] = dotnet_root.as_posix()
|
|
87
93
|
if "mono" not in os.getenv("LD_LIBRARY_PATH", ""):
|
|
88
94
|
warnings.warn("LD_LIBRARY_PATH needs to be setup to use pyedb.")
|
|
@@ -80,6 +80,7 @@ def primitive_cast(pedb, edb_object):
|
|
|
80
80
|
class Layout(ObjBase):
|
|
81
81
|
def __init__(self, pedb, edb_object):
|
|
82
82
|
super().__init__(pedb, edb_object)
|
|
83
|
+
self._primitives = []
|
|
83
84
|
|
|
84
85
|
@property
|
|
85
86
|
def cell(self):
|
|
@@ -230,7 +231,15 @@ class Layout(ObjBase):
|
|
|
230
231
|
-------
|
|
231
232
|
list of :class:`dotnet.database.dotnet.primitive.PrimitiveDotNet` cast objects.
|
|
232
233
|
"""
|
|
233
|
-
|
|
234
|
+
primitives = list(self._edb_object.Primitives)
|
|
235
|
+
if len(primitives) != len(self._primitives):
|
|
236
|
+
self._primitives = [primitive_cast(self._pedb, p) for p in primitives]
|
|
237
|
+
return self._primitives
|
|
238
|
+
|
|
239
|
+
@property
|
|
240
|
+
def primitives_by_aedt_name(self) -> dict:
|
|
241
|
+
"""Primitives."""
|
|
242
|
+
return {i.aedt_name: i for i in self.primitives}
|
|
234
243
|
|
|
235
244
|
@property
|
|
236
245
|
def bondwires(self):
|
|
@@ -27,7 +27,6 @@ import sys
|
|
|
27
27
|
|
|
28
28
|
from pyedb import __version__
|
|
29
29
|
from pyedb.dotnet.database.general import convert_py_list_to_net_list
|
|
30
|
-
from pyedb.edb_logger import pyedb_logger
|
|
31
30
|
from pyedb.generic.general_methods import (
|
|
32
31
|
env_path,
|
|
33
32
|
env_path_student,
|
|
@@ -704,7 +703,6 @@ class EdbDotNet(object):
|
|
|
704
703
|
"""Edb Dot Net Class."""
|
|
705
704
|
|
|
706
705
|
def __init__(self, edbversion, student_version=False):
|
|
707
|
-
self._logger = pyedb_logger
|
|
708
706
|
if not edbversion: # pragma: no cover
|
|
709
707
|
try:
|
|
710
708
|
edbversion = "20{}.{}".format(list_installed_ansysem()[0][-3:-1], list_installed_ansysem()[0][-1:])
|
|
@@ -304,20 +304,24 @@ class LayoutValidation:
|
|
|
304
304
|
|
|
305
305
|
def illegal_rlc_values(self, fix=False):
|
|
306
306
|
"""Find and fix RLC illegal values."""
|
|
307
|
-
inductors = self._pedb.components.inductors
|
|
308
307
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
308
|
+
for name, objs in {
|
|
309
|
+
"inductors": self._pedb.components.inductors,
|
|
310
|
+
"resistors": self._pedb.components.resistors,
|
|
311
|
+
"capacitors": self._pedb.components.capacitors,
|
|
312
|
+
}.items():
|
|
313
|
+
temp = []
|
|
314
|
+
for k, v in objs.items():
|
|
315
|
+
componentProperty = v.edbcomponent.GetComponentProperty()
|
|
316
|
+
model = componentProperty.GetModel().Clone()
|
|
317
|
+
pinpairs = model.PinPairs
|
|
318
|
+
|
|
319
|
+
if not len(list(pinpairs)): # pragma: no cover
|
|
320
|
+
temp.append(k)
|
|
321
|
+
if fix:
|
|
322
|
+
v.rlc_values = [0, 1, 0]
|
|
323
|
+
|
|
324
|
+
self._pedb._logger.info(f"Found {len(temp)} {name} have no value.")
|
|
321
325
|
return
|
|
322
326
|
|
|
323
327
|
def padstacks_no_name(self, fix=False):
|