pyedb 0.10.dev0__py3-none-any.whl → 0.11.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.

Files changed (39) hide show
  1. pyedb/__init__.py +1 -1
  2. pyedb/configuration/cfg_boundaries.py +115 -0
  3. pyedb/configuration/cfg_components.py +205 -0
  4. pyedb/configuration/cfg_data.py +38 -15
  5. pyedb/configuration/cfg_general.py +34 -0
  6. pyedb/{dotnet/sim_setup_data/data/siw_dc_ir_settings.py → configuration/cfg_nets.py} +18 -21
  7. pyedb/configuration/cfg_padstacks.py +125 -0
  8. pyedb/configuration/cfg_pin_groups.py +58 -0
  9. pyedb/configuration/cfg_ports_sources.py +164 -0
  10. pyedb/configuration/cfg_s_parameter_models.py +60 -0
  11. pyedb/configuration/cfg_setup.py +201 -0
  12. pyedb/configuration/cfg_spice_models.py +49 -0
  13. pyedb/configuration/configuration.py +37 -532
  14. pyedb/dotnet/edb.py +37 -8
  15. pyedb/dotnet/edb_core/components.py +43 -0
  16. pyedb/dotnet/edb_core/edb_data/hfss_pi_simulation_setup_data.py +465 -0
  17. pyedb/dotnet/edb_core/edb_data/nets_data.py +6 -2
  18. pyedb/dotnet/edb_core/edb_data/padstacks_data.py +17 -1
  19. pyedb/dotnet/edb_core/edb_data/raptor_x_simulation_setup_data.py +0 -4
  20. pyedb/dotnet/edb_core/edb_data/siwave_simulation_setup_data.py +4 -2
  21. pyedb/dotnet/edb_core/edb_data/sources.py +21 -5
  22. pyedb/dotnet/edb_core/edb_data/terminals.py +2 -1
  23. pyedb/dotnet/edb_core/layout.py +13 -8
  24. pyedb/dotnet/edb_core/nets.py +7 -3
  25. pyedb/dotnet/edb_core/padstack.py +23 -3
  26. pyedb/dotnet/edb_core/sim_setup_data/__init__.py +3 -0
  27. pyedb/dotnet/edb_core/sim_setup_data/data/__init__.py +3 -0
  28. pyedb/dotnet/edb_core/sim_setup_data/data/siw_dc_ir_settings.py +235 -0
  29. pyedb/dotnet/edb_core/siwave.py +2 -1
  30. pyedb/dotnet/edb_core/stackup.py +45 -33
  31. pyedb/dotnet/edb_core/utilities/simulation_setup.py +21 -5
  32. pyedb/generic/plot.py +6 -5
  33. pyedb/siwave.py +32 -6
  34. pyedb/siwave_core/icepak.py +153 -0
  35. {pyedb-0.10.dev0.dist-info → pyedb-0.11.2.dist-info}/METADATA +6 -6
  36. {pyedb-0.10.dev0.dist-info → pyedb-0.11.2.dist-info}/RECORD +38 -25
  37. pyedb/configuration/cfg_ports.py +0 -149
  38. {pyedb-0.10.dev0.dist-info → pyedb-0.11.2.dist-info}/LICENSE +0 -0
  39. {pyedb-0.10.dev0.dist-info → pyedb-0.11.2.dist-info}/WHEEL +0 -0
@@ -1,149 +0,0 @@
1
- # Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates.
2
- # SPDX-License-Identifier: MIT
3
- #
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
-
23
- from enum import Enum
24
-
25
- from pyedb.dotnet.edb_core.edb_data.padstacks_data import EDBPadstackInstance
26
-
27
-
28
- class CfgNegTerm:
29
- """Manage negative terminal."""
30
-
31
- class CfgTermType(Enum):
32
- """Terminal types."""
33
-
34
- pin = [list, str]
35
- net = [str]
36
- pin_group = [str]
37
-
38
- @property
39
- def pedb(self):
40
- """Edb."""
41
- return self.pport.pedb
42
-
43
- def __init__(self, pport, **kwargs):
44
- self.pport = pport
45
- self.type = kwargs.get("type", None)
46
- self.value = kwargs.get("value", None)
47
-
48
- def _get_candidates(self, distributed):
49
- """Get list of objects."""
50
-
51
- def get_pin_obj(pin_name):
52
- port_name = "{}_{}".format(self.pport.reference_designator, pin_name)
53
- return {port_name: self.pport.pdata.edb_comps[self.pport.reference_designator].pins[pin_name]}
54
-
55
- def get_pin_group_obj(pin_group_name):
56
- pin_group_obj = self.pedb.siwave.pin_groups[pin_group_name]
57
- return {pin_group_obj.name: pin_group_obj}
58
-
59
- term_objs = dict()
60
- if self.type in "pin":
61
- term_objs.update(get_pin_obj(self.value))
62
- elif self.type == "pin_group":
63
- term_objs.update(get_pin_group_obj(self.value))
64
- elif self.type == "net":
65
- pins = self.pport.pdata.pedb.components.get_pin_from_component(self.pport.reference_designator, self.value)
66
- pins = [EDBPadstackInstance(p, self.pedb) for p in pins]
67
-
68
- pin_objs = {f"{self.value}_{p.GetName()}": p for p in pins}
69
- if distributed:
70
- term_objs.update(pin_objs)
71
- else:
72
- pg_name = f"pg_{self.pport.reference_designator}_{self.value}"
73
- pin_objs = {p.GetName(): p for p in pin_objs.values()}
74
- if self.pport.type == "coax":
75
- term_objs.update(get_pin_obj(pins[0].GetName()))
76
- else:
77
- temp = self.pport.pdata.pedb.siwave.create_pin_group(
78
- self.pport.reference_designator, list(pin_objs.keys()), pg_name
79
- )
80
- term_objs.update({temp[0]: temp[1]})
81
- return term_objs
82
-
83
- def get_candidates(self):
84
- """Get list of objects."""
85
- return self._get_candidates(False)
86
-
87
-
88
- class CfgPosTerm(CfgNegTerm):
89
- """Manage positive terminal."""
90
-
91
- def __init__(self, pport, **kwargs):
92
- super().__init__(pport, **kwargs)
93
-
94
- def get_candidates(self):
95
- """Get list of objects."""
96
- return self._get_candidates(self.pport.distributed)
97
-
98
-
99
- class CfgPort:
100
- """Manage port."""
101
-
102
- class CfgPortType(Enum):
103
- """Port type."""
104
-
105
- circuit = [str]
106
- coax = [str]
107
-
108
- @property
109
- def pedb(self):
110
- """Edb."""
111
- return self.pdata.pedb
112
-
113
- def __init__(self, pdata, **kwargs):
114
- self.pdata = pdata
115
- self.name = kwargs.get("name", None)
116
- self.type = kwargs.get("type", None)
117
- self.reference_designator = kwargs.get("reference_designator", None)
118
- pos_term = kwargs.get("positive_terminal", None)
119
- neg_term = kwargs.get("negative_terminal", None)
120
- if pos_term:
121
- self.positive_terminal = CfgPosTerm(
122
- pport=self, type=list(pos_term.keys())[0], value=list(pos_term.values())[0]
123
- )
124
- if neg_term:
125
- self.negative_terminal = CfgPosTerm(
126
- pport=self, type=list(neg_term.keys())[0], value=list(neg_term.values())[0]
127
- )
128
- self.distributed = kwargs.get("distributed", False)
129
-
130
- self._port_name = None
131
-
132
- def create(self):
133
- """Create port."""
134
- if self.type == "circuit":
135
- candidates = [i for i in self.negative_terminal.get_candidates().values()][0]
136
- neg_term = candidates.get_terminal(create_new_terminal=True)
137
- else:
138
- neg_term = None
139
- ports = []
140
- for name, p in self.positive_terminal.get_candidates().items():
141
- if self.distributed:
142
- port_name = f"{self.name}_{name}" if self.name else name
143
- else:
144
- port_name = self.name if self.name else name
145
- pos_term = p.get_terminal(port_name, create_new_terminal=True)
146
- is_circuit_port = True if self.type == "circuit" else False
147
- port = self.pedb.create_port(pos_term, neg_term, is_circuit_port)
148
- ports.append(port)
149
- return ports