pyedb 0.49.0__py3-none-any.whl → 0.50.1__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 (79) hide show
  1. pyedb/__init__.py +1 -1
  2. pyedb/configuration/cfg_modeler.py +42 -11
  3. pyedb/configuration/cfg_ports_sources.py +9 -1
  4. pyedb/dotnet/database/cell/hierarchy/component.py +6 -6
  5. pyedb/dotnet/database/components.py +3 -3
  6. pyedb/dotnet/database/edb_data/padstacks_data.py +13 -0
  7. pyedb/dotnet/database/edb_data/primitives_data.py +3 -3
  8. pyedb/dotnet/database/edb_data/variables.py +3 -3
  9. pyedb/dotnet/database/materials.py +16 -16
  10. pyedb/dotnet/database/modeler.py +38 -4
  11. pyedb/dotnet/database/sim_setup_data/data/settings.py +28 -0
  12. pyedb/dotnet/database/stackup.py +1 -0
  13. pyedb/dotnet/database/utilities/hfss_simulation_setup.py +5 -6
  14. pyedb/dotnet/edb.py +22 -20
  15. pyedb/extensions/__init__.py +0 -0
  16. pyedb/extensions/via_design_backend.py +681 -0
  17. pyedb/grpc/database/components.py +537 -686
  18. pyedb/grpc/database/control_file.py +458 -149
  19. pyedb/grpc/database/definition/component_def.py +17 -14
  20. pyedb/grpc/database/definition/materials.py +60 -60
  21. pyedb/grpc/database/definition/package_def.py +8 -8
  22. pyedb/grpc/database/definition/padstack_def.py +31 -33
  23. pyedb/grpc/database/definitions.py +6 -4
  24. pyedb/grpc/database/geometry/arc_data.py +5 -5
  25. pyedb/grpc/database/geometry/point_3d_data.py +3 -3
  26. pyedb/grpc/database/geometry/polygon_data.py +5 -5
  27. pyedb/grpc/database/hfss.py +399 -397
  28. pyedb/grpc/database/hierarchy/component.py +60 -58
  29. pyedb/grpc/database/hierarchy/pin_pair_model.py +6 -6
  30. pyedb/grpc/database/hierarchy/pingroup.py +13 -11
  31. pyedb/grpc/database/hierarchy/s_parameter_model.py +1 -1
  32. pyedb/grpc/database/hierarchy/spice_model.py +1 -1
  33. pyedb/grpc/database/layers/layer.py +2 -2
  34. pyedb/grpc/database/layers/stackup_layer.py +144 -44
  35. pyedb/grpc/database/layout/layout.py +12 -12
  36. pyedb/grpc/database/layout/voltage_regulator.py +8 -8
  37. pyedb/grpc/database/layout_validation.py +5 -5
  38. pyedb/grpc/database/modeler.py +248 -245
  39. pyedb/grpc/database/net/differential_pair.py +4 -4
  40. pyedb/grpc/database/net/extended_net.py +7 -8
  41. pyedb/grpc/database/net/net.py +57 -46
  42. pyedb/grpc/database/nets.py +139 -122
  43. pyedb/grpc/database/padstacks.py +174 -190
  44. pyedb/grpc/database/ports/ports.py +23 -17
  45. pyedb/grpc/database/primitive/padstack_instance.py +45 -30
  46. pyedb/grpc/database/primitive/path.py +7 -7
  47. pyedb/grpc/database/primitive/polygon.py +9 -9
  48. pyedb/grpc/database/primitive/primitive.py +21 -21
  49. pyedb/grpc/database/primitive/rectangle.py +1 -1
  50. pyedb/grpc/database/simulation_setup/hfss_advanced_settings.py +1 -1
  51. pyedb/grpc/database/simulation_setup/hfss_general_settings.py +1 -1
  52. pyedb/grpc/database/simulation_setup/hfss_settings_options.py +1 -1
  53. pyedb/grpc/database/simulation_setup/hfss_simulation_settings.py +6 -6
  54. pyedb/grpc/database/simulation_setup/hfss_simulation_setup.py +2 -2
  55. pyedb/grpc/database/simulation_setup/raptor_x_simulation_settings.py +2 -2
  56. pyedb/grpc/database/simulation_setup/raptor_x_simulation_setup.py +1 -1
  57. pyedb/grpc/database/simulation_setup/siwave_simulation_setup.py +3 -3
  58. pyedb/grpc/database/siwave.py +166 -214
  59. pyedb/grpc/database/source_excitations.py +156 -0
  60. pyedb/grpc/database/stackup.py +415 -316
  61. pyedb/grpc/database/terminal/bundle_terminal.py +12 -12
  62. pyedb/grpc/database/terminal/edge_terminal.py +6 -5
  63. pyedb/grpc/database/terminal/padstack_instance_terminal.py +13 -13
  64. pyedb/grpc/database/terminal/pingroup_terminal.py +12 -12
  65. pyedb/grpc/database/terminal/point_terminal.py +6 -6
  66. pyedb/grpc/database/terminal/terminal.py +26 -26
  67. pyedb/grpc/database/utility/heat_sink.py +5 -5
  68. pyedb/grpc/database/utility/hfss_extent_info.py +21 -21
  69. pyedb/grpc/database/utility/layout_statistics.py +13 -13
  70. pyedb/grpc/database/utility/rlc.py +3 -3
  71. pyedb/grpc/database/utility/sources.py +1 -1
  72. pyedb/grpc/database/utility/sweep_data_distribution.py +1 -1
  73. pyedb/grpc/edb.py +524 -764
  74. {pyedb-0.49.0.dist-info → pyedb-0.50.1.dist-info}/METADATA +1 -1
  75. {pyedb-0.49.0.dist-info → pyedb-0.50.1.dist-info}/RECORD +77 -77
  76. pyedb/extensions/pre_layout_design_toolkit/via_design.py +0 -1151
  77. pyedb/grpc/database/utility/simulation_configuration.py +0 -3305
  78. {pyedb-0.49.0.dist-info → pyedb-0.50.1.dist-info}/LICENSE +0 -0
  79. {pyedb-0.49.0.dist-info → pyedb-0.50.1.dist-info}/WHEEL +0 -0
@@ -35,7 +35,7 @@ class DifferentialPairs:
35
35
  self._pedb = pedb
36
36
 
37
37
  @property
38
- def items(self):
38
+ def items(self) -> dict[str, any]:
39
39
  """Extended nets.
40
40
 
41
41
  Returns
@@ -71,7 +71,7 @@ class DifferentialPairs:
71
71
  GrpcDifferentialPair.create(layout=self._pedb.layout, name=name, pos_net=net_p, neg_net=net_n)
72
72
  return self.items[name]
73
73
 
74
- def auto_identify(self, positive_differentiator="_P", negative_differentiator="_N"):
74
+ def auto_identify(self, positive_differentiator="_P", negative_differentiator="_N") -> list[str]:
75
75
  """Auto identify differential pairs by naming conversion.
76
76
 
77
77
  Parameters
@@ -128,11 +128,11 @@ class DifferentialPair(GrpcDifferentialPair):
128
128
  self._pedb = pedb
129
129
 
130
130
  @property
131
- def positive_net(self):
131
+ def positive_net(self) -> Net:
132
132
  """Positive Net."""
133
133
  return Net(self._pedb, super().positive_net)
134
134
 
135
135
  @property
136
- def negative_net(self):
136
+ def negative_net(self) -> Net:
137
137
  """Negative Net."""
138
138
  return Net(self._pedb, super().negative_net)
@@ -30,7 +30,7 @@ class ExtendedNets:
30
30
  self._pedb = pedb
31
31
 
32
32
  @property
33
- def items(self):
33
+ def items(self) -> dict[str, any]:
34
34
  """Extended nets.
35
35
 
36
36
  Returns
@@ -44,7 +44,6 @@ class ExtendedNets:
44
44
  return nets
45
45
 
46
46
  def create(self, name, net):
47
- # type: (str, str|list)->ExtendedNet
48
47
  """Create a new Extended net.
49
48
 
50
49
  Parameters
@@ -70,7 +69,7 @@ class ExtendedNets:
70
69
  return self.items[name]
71
70
 
72
71
  def auto_identify_signal(self, resistor_below=10, inductor_below=1, capacitor_above=1e-9, exception_list=None):
73
- # type: (int | float, int | float, int |float, list) -> list
72
+ # type: (int | float, int | float, int |float, list) -> list[ExtendedNet]
74
73
  """Get extended signal net and associated components.
75
74
 
76
75
  Parameters
@@ -142,7 +141,7 @@ class ExtendedNets:
142
141
  include_signal=True,
143
142
  include_power=True,
144
143
  ):
145
- # type: (int | float, int | float, int |float, list, bool, bool) -> list
144
+ # type: (int | float, int | float, int |float, list, bool, bool) -> list[ExtendedNet]
146
145
  """Get extended net and associated components.
147
146
 
148
147
  Parameters
@@ -275,7 +274,7 @@ class ExtendedNet(GrpcExtendedNet):
275
274
  return {net.name: Net(self._pedb, net) for net in super().nets}
276
275
 
277
276
  @property
278
- def components(self):
277
+ def components(self) -> dict[str, any]:
279
278
  """Dictionary of components.
280
279
 
281
280
  Returns
@@ -289,7 +288,7 @@ class ExtendedNet(GrpcExtendedNet):
289
288
  return comps
290
289
 
291
290
  @property
292
- def rlc(self):
291
+ def rlc(self) -> dict[str, any]:
293
292
  """Dictionary of RLC components.
294
293
 
295
294
  Returns
@@ -302,7 +301,7 @@ class ExtendedNet(GrpcExtendedNet):
302
301
  }
303
302
 
304
303
  @property
305
- def serial_rlc(self):
304
+ def serial_rlc(self) -> dict[str, any]:
306
305
  """Dictionary of serial RLC components.
307
306
 
308
307
  Returns
@@ -321,7 +320,7 @@ class ExtendedNet(GrpcExtendedNet):
321
320
  return res
322
321
 
323
322
  @property
324
- def shunt_rlc(self):
323
+ def shunt_rlc(self) -> dict[str, any]:
325
324
  """Dictionary of shunt RLC components.
326
325
 
327
326
  Returns
@@ -20,6 +20,8 @@
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 typing import Union
24
+
23
25
  from ansys.edb.core.net.net import Net as GrpcNet
24
26
  from ansys.edb.core.primitive.primitive import PrimitiveType as GrpcPrimitiveType
25
27
 
@@ -32,16 +34,25 @@ from pyedb.grpc.database.primitive.rectangle import Rectangle
32
34
 
33
35
 
34
36
  class Net(GrpcNet):
35
- """Manages EDB functionalities for a primitives.
36
- It Inherits EDB Object properties.
37
+ """Manages EDB functionalities for net objects and their primitives.
38
+
39
+ Inherits properties from EDB objects and provides additional functionality
40
+ specific to nets.
41
+
42
+ Parameters
43
+ ----------
44
+ pedb : :class:`pyedb.Edb`
45
+ Main EDB object.
46
+ raw_net :
47
+ Raw net object from gRPC.
37
48
 
38
49
  Examples
39
50
  --------
40
51
  >>> from pyedb import Edb
41
52
  >>> edb = Edb(myedb, edbversion="2021.2")
42
- >>> edb_net = edb.nets.nets["GND"]
43
- >>> edb_net.name # Class Property
44
- >>> edb_net.name # EDB Object Property
53
+ >>> edb_net = edb.nets["GND"]
54
+ >>> edb_net.name
55
+ 'GND'
45
56
  """
46
57
 
47
58
  def __init__(self, pedb, raw_net):
@@ -52,14 +63,18 @@ class Net(GrpcNet):
52
63
  self._edb_object = raw_net
53
64
 
54
65
  @property
55
- def primitives(self):
56
- """Primitives that belongs to the net.
66
+ def primitives(self) -> list[Union[Path, Polygon, Circle, Rectangle, Bondwire]]:
67
+ """All primitives belonging to this net.
57
68
 
58
69
  Returns
59
70
  -------
60
- List[:class:`Primitive <pyedb.grpc.database.primitive.primitive.Primitive>`].
61
- List of Primitive object.
62
-
71
+ list
72
+ List of primitive objects which can be one of:
73
+ - :class:`Path <pyedb.grpc.database.primitive.path.Path>`
74
+ - :class:`Polygon <pyedb.grpc.database.primitive.polygon.Polygon>`
75
+ - :class:`Circle <pyedb.grpc.database.primitive.circle.Circle>`
76
+ - :class:`Rectangle <pyedb.grpc.database.primitive.rectangle.Rectangle>`
77
+ - :class:`Bondwire <pyedb.grpc.database.primitive.bondwire.Bondwire>`
63
78
  """
64
79
  primitives = []
65
80
  for primitive in super().primitives:
@@ -76,24 +91,25 @@ class Net(GrpcNet):
76
91
  return primitives
77
92
 
78
93
  @property
79
- def padstack_instances(self):
80
- """Padstack instance which belong to net.
94
+ def padstack_instances(self) -> list[PadstackInstance]:
95
+ """All padstack instances belonging to this net.
81
96
 
82
97
  Returns
83
98
  -------
84
- List[:class:`PadstackInstance <pyedb.grpc.database.primitive.padstack_instance.PadstackInstance>`]
85
- LIst of PadstackInstance object.
86
-
99
+ list of :class:`PadstackInstance <pyedb.grpc.database.primitive.padstack_instance.PadstackInstance>`
100
+ Padstack instances associated with the net.
87
101
  """
88
102
  return [PadstackInstance(self._pedb, i) for i in super().padstack_instances]
89
103
 
90
104
  @property
91
- def components(self):
92
- """Components connected to net.
105
+ def components(self) -> dict[str, any]:
106
+ """Components connected to this net.
93
107
 
94
108
  Returns
95
109
  -------
96
- Dict[str, :class:`Component <pyedb.grpc.database.hierarchy.component.Component>`]
110
+ dict
111
+ Dictionary of components keyed by component name, with values as
112
+ :class:`Component <pyedb.grpc.database.hierarchy.component.Component>` objects.
97
113
  """
98
114
  components = {}
99
115
  for padstack_instance in self.padstack_instances:
@@ -105,47 +121,44 @@ class Net(GrpcNet):
105
121
  pass
106
122
  return components
107
123
 
108
- def find_dc_short(self, fix=False):
109
- """Find DC-shorted nets.
124
+ def find_dc_short(self, fix=False) -> list[list[str, str]]:
125
+ """Find DC-shorted nets connected to this net.
110
126
 
111
127
  Parameters
112
128
  ----------
113
129
  fix : bool, optional
114
- If `True`, rename all the nets. (default)
115
- If `False`, only report dc shorts.
130
+ Whether to automatically rename nets to resolve shorts.
131
+ Default: ``False`` (only report shorts).
116
132
 
117
133
  Returns
118
134
  -------
119
- List[List[str, str]]
120
- [[net name, net name]].
135
+ list[list[str]]
136
+ List of shorted net pairs in the format [[net_name1, net_name2], ...].
121
137
  """
122
138
  return self._pedb.layout_validation.dc_shorts(self.name, fix)
123
139
 
124
140
  def plot(
125
141
  self, layers=None, show_legend=True, save_plot=None, outline=None, size=(2000, 1000), show=True, title=None
126
142
  ):
127
- """Plot a net to Matplotlib 2D chart.
143
+ """Plot the net using Matplotlib.
128
144
 
129
145
  Parameters
130
146
  ----------
131
- layers : str, list, optional
132
- Name of the layers to include in the plot. If `None` all the signal layers will be considered.
147
+ layers : str or list[str], optional
148
+ Layer name(s) to include. If ``None``, uses all signal layers.
133
149
  show_legend : bool, optional
134
- If `True` the legend is shown in the plot. (default)
135
- If `False` the legend is not shown.
150
+ Enable legend display. Default: ``True``.
136
151
  save_plot : str, optional
137
- If a path is specified the plot will be saved in this location.
138
- If ``save_plot`` is provided, the ``show`` parameter is ignored.
152
+ Full path to save the plot image. If specified, overrides ``show``.
139
153
  outline : list, optional
140
- List of points of the outline to plot.
154
+ Outline points for plot boundary.
141
155
  size : tuple, optional
142
- Image size in pixel (width, height).
156
+ Image dimensions in pixels (width, height). Default: (2000, 1000).
143
157
  show : bool, optional
144
- Whether to show the plot or not. Default is ``True``.
158
+ Display the plot. Default: ``True``.
145
159
  title : str, optional
146
- Plot title. If value is ``None`` the project name is assigned by default. Default value is ``None``.
160
+ Plot title. Uses net name if ``None``. Default: ``None``.
147
161
  """
148
-
149
162
  self._pedb.nets.plot(
150
163
  self.name,
151
164
  layers=layers,
@@ -156,18 +169,17 @@ class Net(GrpcNet):
156
169
  show=show,
157
170
  plot_components=True,
158
171
  plot_vias=True,
159
- title=None,
172
+ title=title,
160
173
  )
161
174
 
162
- def get_smallest_trace_width(self):
163
- """Retrieve the smallest trace width from paths.
175
+ def get_smallest_trace_width(self) -> float:
176
+ """Get the minimum trace width from path primitives in this net.
164
177
 
165
178
  Returns
166
179
  -------
167
180
  float
168
- Trace smallest width.
181
+ Smallest width found in database units. Returns 1e10 if no paths exist.
169
182
  """
170
-
171
183
  current_value = 1e10
172
184
  paths = [prim for prim in self.primitives if prim.primitive_type == GrpcPrimitiveType.PATH]
173
185
  for path in paths:
@@ -177,17 +189,16 @@ class Net(GrpcNet):
177
189
 
178
190
  @property
179
191
  def extended_net(self):
180
- """Get extended net and associated components.
192
+ """Extended net associated with this net.
181
193
 
182
194
  Returns
183
195
  -------
184
- :class:`ExtendedNet <pyedb.grpc.database.net.extended_net.ExtendedNet>`
196
+ :class:`ExtendedNet <pyedb.grpc.database.net.extended_net.ExtendedNet>` or None
197
+ Extended net object if exists, otherwise ``None``.
185
198
 
186
199
  Examples
187
200
  --------
188
- >>> from pyedb import Edb
189
- >>> app = Edb()
190
- >>> app.nets["BST_V3P3_S5"].extended_net
201
+ >>> edb.nets["BST_V3P3_S5"].extended_net
191
202
  """
192
203
  if self.name in self._pedb.extended_nets.items:
193
204
  return self._pedb.extended_nets.items[self.name]