From 6024ac39504c4a894d6f5416016630c65d509500 Mon Sep 17 00:00:00 2001 From: ring630 <@gmail.com> Date: Fri, 27 Oct 2023 15:14:11 +0200 Subject: [PATCH 01/13] fix --- _unittest/test_00_EDB.py | 14 ++++-- pyaedt/edb.py | 27 +++++++++-- pyaedt/edb_core/edb_data/padstacks_data.py | 37 +++++++++++++-- pyaedt/edb_core/edb_data/ports.py | 20 ++++++++ pyaedt/edb_core/edb_data/sources.py | 53 ++++++++++++++-------- pyaedt/edb_core/edb_data/terminals.py | 31 ++++++++++++- 6 files changed, 152 insertions(+), 30 deletions(-) diff --git a/_unittest/test_00_EDB.py b/_unittest/test_00_EDB.py index 717b7d2b97d..644d256593e 100644 --- a/_unittest/test_00_EDB.py +++ b/_unittest/test_00_EDB.py @@ -278,7 +278,7 @@ def test_010_nets_query(self): diff_pair = self.edbapp.differential_pairs.create("new_pair1", "PCIe_Gen4_RX1_P", "PCIe_Gen4_RX1_N") assert diff_pair.positive_net.name == "PCIe_Gen4_RX1_P" assert diff_pair.negative_net.name == "PCIe_Gen4_RX1_N" - assert self.edbapp.differential_pairs.items + assert self.edbapp.differential_pairs["new_pair1"] assert self.edbapp.net_classes.items assert self.edbapp.net_classes.create("DDR4_ADD", ["DDR4_A0", "DDR4_A1"]) @@ -448,12 +448,12 @@ def test_042_create_current_source(self): ) self.edbapp.siwave.create_pin_group( - reference_designator="U1", pin_numbers=["A14", "A15"], group_name="sink_pos" + reference_designator="U1", pin_numbers=["R23", "P23"], group_name="sink_pos" ) assert self.edbapp.siwave.create_voltage_source_on_pin_group("sink_pos", "gnd", name="vrm_voltage_source") self.edbapp.siwave.create_pin_group(reference_designator="U1", pin_numbers=["A27", "A28"], group_name="vp_pos") - self.edbapp.siwave.create_pin_group(reference_designator="U1", pin_numbers=["A14", "A15"], group_name="vp_neg") + self.edbapp.siwave.create_pin_group(reference_designator="U1", pin_numbers=["R23", "P23"], group_name="vp_neg") assert self.edbapp.siwave.create_voltage_probe_on_pin_group("vprobe", "vp_pos", "vp_neg") assert self.edbapp.probes["vprobe"] self.edbapp.siwave.place_voltage_probe( @@ -2402,6 +2402,14 @@ def test_134_create_port_between_pin_and_layer(self): edbapp.siwave.create_port_between_pin_and_layer( component_name="U1", pins_name="A27", layer_name="16_Bottom", reference_net="GND" ) + U7 = edbapp.components["U7"] + U7.pins["G7"].create_port() + port = U7.pins["F7"].create_port(reference=U7.pins["E7"]) + port.is_circuit_port = True + _, pin_group = edbapp.siwave.create_pin_group_on_net( + reference_designator="U7", net_name="GND", group_name="U7_GND" + ) + U7.pins["F7"].create_port(reference=pin_group) edbapp.close() def test_134_siwave_source_setter(self): diff --git a/pyaedt/edb.py b/pyaedt/edb.py index 3eee3c44133..88655c326d5 100644 --- a/pyaedt/edb.py +++ b/pyaedt/edb.py @@ -24,6 +24,7 @@ from pyaedt.edb_core.edb_data.hfss_simulation_setup_data import HfssSimulationSetup from pyaedt.edb_core.edb_data.ports import BundleWavePort from pyaedt.edb_core.edb_data.ports import CoaxPort +from pyaedt.edb_core.edb_data.ports import CircuitPort from pyaedt.edb_core.edb_data.ports import ExcitationSources from pyaedt.edb_core.edb_data.ports import GapPort from pyaedt.edb_core.edb_data.ports import WavePort @@ -400,9 +401,12 @@ def ports(self): ports = {} for t in temp: t2 = Terminal(self, t) - if t2.terminal_type == TerminalType.BundleTerminal.name: - bundle_ter = BundleWavePort(self, t) - ports[bundle_ter.name] = bundle_ter + if t2.is_circuit_port: + port = CircuitPort(self, t) + ports[port.name] = port + elif t2.terminal_type == TerminalType.BundleTerminal.name: + port = BundleWavePort(self, t) + ports[port.name] = port elif t2.hfss_type == "Wave": ports[t2.name] = WavePort(self, t) elif t2.terminal_type == TerminalType.PadstackInstanceTerminal.name: @@ -3639,3 +3643,20 @@ def _get_connected_ports_from_multizone_cutout(self, terminal_info_dict): ): connected_ports_list.append((port1_connexion, port2_connexion)) return connected_ports_list + + @pyaedt_function_handler + def create_port(self, terminal, ref_terminal=None, is_circuit_port=False): + """""" + if not ref_terminal: + from pyaedt.edb_core.edb_data.ports import CoaxPort + port = CoaxPort(self, terminal._edb_object) + else: + if is_circuit_port: + from pyaedt.edb_core.edb_data.ports import CircuitPort + port = CircuitPort(self, terminal._edb_object) + else: + from pyaedt.edb_core.edb_data.ports import GapPort + port = GapPort(self, terminal._edb_object) + port.ref_terminal = ref_terminal + port.is_circuit_port = is_circuit_port + return port \ No newline at end of file diff --git a/pyaedt/edb_core/edb_data/padstacks_data.py b/pyaedt/edb_core/edb_data/padstacks_data.py index a37d2b2987a..63ad03c959b 100644 --- a/pyaedt/edb_core/edb_data/padstacks_data.py +++ b/pyaedt/edb_core/edb_data/padstacks_data.py @@ -1018,12 +1018,38 @@ def _create_terminal(self, name=None): @pyaedt_function_handler def create_coax_port(self, name=None, radial_extent_factor=0): """Create a coax port.""" - from pyaedt.edb_core.edb_data.ports import CoaxPort - term = self._create_terminal(name) - coax = CoaxPort(self._pedb, term._edb_object) - coax.radial_extent_factor = radial_extent_factor - return coax + port = self.create_port(name) + port.radial_extent_factor = radial_extent_factor + return port + + @pyaedt_function_handler + def create_port(self, name=None, reference=None, is_circuit_port=False): + """Create a port on the padstack. + + Parameters + ---------- + name : str, optional + Name of the port. + reference : class:`pyaedt.edb_core.edb_data.nets_data.EDBNetsData`, + class:`pyaedt.edb_core.edb_data.padstacks_data.EDBPadstackInstance`, + class:`pyaedt.edb_core.edb_data.sources.PinGroup`, + + is_circuit_port + + Returns + ------- + + """ + terminal = self._create_terminal(name) + if reference: + ref_terminal = reference._create_terminal(terminal.name + "_ref") + if reference._edb_object.ToString() == "PinGroup": + is_circuit_port = True + else: + ref_terminal = None + + return self._pedb.create_port(terminal, ref_terminal, is_circuit_port) @property def _em_properties(self): @@ -1164,6 +1190,7 @@ def in_polygon(self, polygon_data, include_partial=True, simple_check=False): @property def pin(self): """Return Edb padstack object.""" + warnings.warn("`pin` is deprecated.", DeprecationWarning) return self._edb_padstackinstance @property diff --git a/pyaedt/edb_core/edb_data/ports.py b/pyaedt/edb_core/edb_data/ports.py index a26d240be6f..b96d6051e84 100644 --- a/pyaedt/edb_core/edb_data/ports.py +++ b/pyaedt/edb_core/edb_data/ports.py @@ -54,6 +54,26 @@ def renormalize_z0(self): ) +class CircuitPort(GapPort): + """Manages gap port properties. + + Parameters + ---------- + pedb : pyaedt.edb.Edb + EDB object from the ``Edblib`` library. + edb_object : Ansys.Ansoft.Edb.Cell.Terminal.EdgeTerminal + Edge terminal instance from EDB. + + Examples + -------- + This example shows how to access the ``GapPort`` class. + """ + + def __init__(self, pedb, edb_object): + super().__init__(pedb, edb_object) + + + class WavePort(EdgeTerminal): """Manages wave port properties. diff --git a/pyaedt/edb_core/edb_data/sources.py b/pyaedt/edb_core/edb_data/sources.py index f7a3bc6c0a0..f509259d5de 100644 --- a/pyaedt/edb_core/edb_data/sources.py +++ b/pyaedt/edb_core/edb_data/sources.py @@ -229,6 +229,7 @@ def __init__(self, name="", edb_pin_group=None, pedb=None): self._component = "" self._node_pins = [] self._net = "" + self._edb_object = self._edb_pin_group @property def _active_layout(self): @@ -274,26 +275,42 @@ def net(self, value): def net_name(self): return self._edb_pin_group.GetNet().GetName() + @property + def terminal(self): + """Get terminal.""" + from pyaedt.edb_core.edb_data.terminals import PinGroupTerminal + term = PinGroupTerminal(self._pedb, self._edb_pin_group.GetPinGroupTerminal()) + return term if not term.is_null else None + @pyaedt_function_handler() - def _create_pin_group_terminal(self, is_reference=False): - pg_term = self._edb_pin_group.GetPinGroupTerminal() - pin_group_net = self._edb_pin_group.GetNet() - if pin_group_net.IsNull(): # pragma: no cover - pin_group_net = list(self._edb_pin_group.GetPins())[0].GetNet() - if pg_term.IsNull(): - return self._pedb.edb_api.cell.terminal.PinGroupTerminal.Create( - self._active_layout, - pin_group_net, - self.name, - self._edb_pin_group, - is_reference, - ) - else: + def _create_terminal(self, name=None): + """Create a terminal on the pin group. + + Parameters + ---------- + name : str, optional + Name of the terminal. + + Returns + ------- + :class:`pyaedt.edb_core.edb_data.terminals.PinGroupTerminal` + """ + pg_term = self.terminal + if not name: + name = self.name + + if pg_term: return pg_term + else: + from pyaedt.edb_core.edb_data.terminals import PinGroupTerminal + term = PinGroupTerminal(self._pedb) + + term = term.create(name, self.net_name, self.name) + return term @pyaedt_function_handler() def create_current_source_terminal(self, magnitude=1, phase=0): - terminal = self._create_pin_group_terminal() + terminal = self._create_terminal()._edb_object terminal.SetBoundaryType(self._pedb.edb_api.cell.terminal.BoundaryType.kCurrentSource) terminal.SetSourceAmplitude(self._pedb.edb_value(magnitude)) terminal.SetSourcePhase(self._pedb.edb_api.utility.value(phase)) @@ -301,7 +318,7 @@ def create_current_source_terminal(self, magnitude=1, phase=0): @pyaedt_function_handler() def create_voltage_source_terminal(self, magnitude=1, phase=0, impedance=0.001): - terminal = self._create_pin_group_terminal() + terminal = self._create_terminal()._edb_object terminal.SetBoundaryType(self._pedb.edb_api.cell.terminal.BoundaryType.kVoltageSource) terminal.SetSourceAmplitude(self._pedb.edb_value(magnitude)) terminal.SetSourcePhase(self._pedb.edb_api.utility.value(phase)) @@ -310,14 +327,14 @@ def create_voltage_source_terminal(self, magnitude=1, phase=0, impedance=0.001): @pyaedt_function_handler() def create_voltage_probe_terminal(self, impedance=1000000): - terminal = self._create_pin_group_terminal() + terminal = self._create_terminal()._edb_object terminal.SetBoundaryType(self._pedb.edb_api.cell.terminal.BoundaryType.kVoltageProbe) terminal.SetImpedance(self._pedb.edb_value(impedance)) return terminal @pyaedt_function_handler() def create_port_terminal(self, impedance=50): - terminal = self._create_pin_group_terminal() + terminal = self._create_terminal()._edb_object terminal.SetBoundaryType(self._pedb.edb_api.cell.terminal.BoundaryType.PortBoundary) terminal.SetImpedance(self._pedb.edb_value(impedance)) terminal.SetIsCircuitPort(True) diff --git a/pyaedt/edb_core/edb_data/terminals.py b/pyaedt/edb_core/edb_data/terminals.py index 39245883611..8dd3acd4a87 100644 --- a/pyaedt/edb_core/edb_data/terminals.py +++ b/pyaedt/edb_core/edb_data/terminals.py @@ -516,7 +516,7 @@ def create(self, name, net, location, layer, is_ref=False): Returns ------- - + :class:`pyaedt.edb_core.edb_data.terminals.PointTerminal` """ terminal = self._pedb.edb_api.cell.terminal.PointTerminal.Create( self._pedb.active_layout, @@ -562,3 +562,32 @@ class PinGroupTerminal(Terminal): def __init__(self, pedb, edb_object=None): super().__init__(pedb, edb_object) + + @pyaedt_function_handler + def create(self, name, net_name, pin_group_name, is_ref=False): + """Create a pin group terminal. + + Parameters + ---------- + name : str + Name of the terminal. + net_name : str + Name of the net. + pin_group_name : str, + Name of the pin group. + is_ref : bool, optional + Whether it is a reference terminal. + + Returns + ------- + :class:`pyaedt.edb_core.edb_data.terminals.PinGroupTerminal` + """ + term = self._pedb.edb_api.cell.terminal.PinGroupTerminal.Create( + self._pedb.active_layout, + self._pedb.nets[net_name].net_object, + name, + self._pedb.siwave.pin_groups[pin_group_name]._edb_object, + is_ref, + ) + term = PinGroupTerminal(self._pedb, term) + return term if not term.is_null else False From e9517c9bc5b6399b36dcbacf4fc5b2ea984e4d22 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 27 Oct 2023 13:17:56 +0000 Subject: [PATCH 02/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- _unittest/test_00_EDB.py | 2 +- pyaedt/edb.py | 7 +++++-- pyaedt/edb_core/edb_data/ports.py | 1 - pyaedt/edb_core/edb_data/sources.py | 2 ++ pyaedt/edb_core/edb_data/terminals.py | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/_unittest/test_00_EDB.py b/_unittest/test_00_EDB.py index 644d256593e..b50a3c43315 100644 --- a/_unittest/test_00_EDB.py +++ b/_unittest/test_00_EDB.py @@ -2408,7 +2408,7 @@ def test_134_create_port_between_pin_and_layer(self): port.is_circuit_port = True _, pin_group = edbapp.siwave.create_pin_group_on_net( reference_designator="U7", net_name="GND", group_name="U7_GND" - ) + ) U7.pins["F7"].create_port(reference=pin_group) edbapp.close() diff --git a/pyaedt/edb.py b/pyaedt/edb.py index 88655c326d5..38116658a3e 100644 --- a/pyaedt/edb.py +++ b/pyaedt/edb.py @@ -23,8 +23,8 @@ from pyaedt.edb_core.edb_data.edbvalue import EdbValue from pyaedt.edb_core.edb_data.hfss_simulation_setup_data import HfssSimulationSetup from pyaedt.edb_core.edb_data.ports import BundleWavePort -from pyaedt.edb_core.edb_data.ports import CoaxPort from pyaedt.edb_core.edb_data.ports import CircuitPort +from pyaedt.edb_core.edb_data.ports import CoaxPort from pyaedt.edb_core.edb_data.ports import ExcitationSources from pyaedt.edb_core.edb_data.ports import GapPort from pyaedt.edb_core.edb_data.ports import WavePort @@ -3649,14 +3649,17 @@ def create_port(self, terminal, ref_terminal=None, is_circuit_port=False): """""" if not ref_terminal: from pyaedt.edb_core.edb_data.ports import CoaxPort + port = CoaxPort(self, terminal._edb_object) else: if is_circuit_port: from pyaedt.edb_core.edb_data.ports import CircuitPort + port = CircuitPort(self, terminal._edb_object) else: from pyaedt.edb_core.edb_data.ports import GapPort + port = GapPort(self, terminal._edb_object) port.ref_terminal = ref_terminal port.is_circuit_port = is_circuit_port - return port \ No newline at end of file + return port diff --git a/pyaedt/edb_core/edb_data/ports.py b/pyaedt/edb_core/edb_data/ports.py index b96d6051e84..b68539286ba 100644 --- a/pyaedt/edb_core/edb_data/ports.py +++ b/pyaedt/edb_core/edb_data/ports.py @@ -73,7 +73,6 @@ def __init__(self, pedb, edb_object): super().__init__(pedb, edb_object) - class WavePort(EdgeTerminal): """Manages wave port properties. diff --git a/pyaedt/edb_core/edb_data/sources.py b/pyaedt/edb_core/edb_data/sources.py index f509259d5de..75ee9afc7b3 100644 --- a/pyaedt/edb_core/edb_data/sources.py +++ b/pyaedt/edb_core/edb_data/sources.py @@ -279,6 +279,7 @@ def net_name(self): def terminal(self): """Get terminal.""" from pyaedt.edb_core.edb_data.terminals import PinGroupTerminal + term = PinGroupTerminal(self._pedb, self._edb_pin_group.GetPinGroupTerminal()) return term if not term.is_null else None @@ -303,6 +304,7 @@ def _create_terminal(self, name=None): return pg_term else: from pyaedt.edb_core.edb_data.terminals import PinGroupTerminal + term = PinGroupTerminal(self._pedb) term = term.create(name, self.net_name, self.name) diff --git a/pyaedt/edb_core/edb_data/terminals.py b/pyaedt/edb_core/edb_data/terminals.py index 8dd3acd4a87..dc987930c59 100644 --- a/pyaedt/edb_core/edb_data/terminals.py +++ b/pyaedt/edb_core/edb_data/terminals.py @@ -588,6 +588,6 @@ def create(self, name, net_name, pin_group_name, is_ref=False): name, self._pedb.siwave.pin_groups[pin_group_name]._edb_object, is_ref, - ) + ) term = PinGroupTerminal(self._pedb, term) return term if not term.is_null else False From fb7cafa242f3e5fb197fe6af4b4acc4ddf2155e6 Mon Sep 17 00:00:00 2001 From: ring630 <@gmail.com> Date: Fri, 27 Oct 2023 15:29:48 +0200 Subject: [PATCH 03/13] fix --- pyaedt/edb.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyaedt/edb.py b/pyaedt/edb.py index 38116658a3e..0004e43d130 100644 --- a/pyaedt/edb.py +++ b/pyaedt/edb.py @@ -3653,12 +3653,8 @@ def create_port(self, terminal, ref_terminal=None, is_circuit_port=False): port = CoaxPort(self, terminal._edb_object) else: if is_circuit_port: - from pyaedt.edb_core.edb_data.ports import CircuitPort - port = CircuitPort(self, terminal._edb_object) else: - from pyaedt.edb_core.edb_data.ports import GapPort - port = GapPort(self, terminal._edb_object) port.ref_terminal = ref_terminal port.is_circuit_port = is_circuit_port From 62d5ad969fdd4b3ef2f34d688183ab5f995007b7 Mon Sep 17 00:00:00 2001 From: ring630 <@gmail.com> Date: Fri, 27 Oct 2023 15:56:33 +0200 Subject: [PATCH 04/13] fix --- pyaedt/edb.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyaedt/edb.py b/pyaedt/edb.py index 0004e43d130..3459d69ace8 100644 --- a/pyaedt/edb.py +++ b/pyaedt/edb.py @@ -3648,8 +3648,6 @@ def _get_connected_ports_from_multizone_cutout(self, terminal_info_dict): def create_port(self, terminal, ref_terminal=None, is_circuit_port=False): """""" if not ref_terminal: - from pyaedt.edb_core.edb_data.ports import CoaxPort - port = CoaxPort(self, terminal._edb_object) else: if is_circuit_port: From 055d1135b6f36c4cead1d06f46efa4290c2d542b Mon Sep 17 00:00:00 2001 From: ring630 <@gmail.com> Date: Fri, 27 Oct 2023 16:03:20 +0200 Subject: [PATCH 05/13] fix --- pyaedt/edb.py | 21 ++++++++++++++++++++- pyaedt/edb_core/edb_data/padstacks_data.py | 3 ++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/pyaedt/edb.py b/pyaedt/edb.py index 3459d69ace8..b1ce5724f43 100644 --- a/pyaedt/edb.py +++ b/pyaedt/edb.py @@ -3646,7 +3646,26 @@ def _get_connected_ports_from_multizone_cutout(self, terminal_info_dict): @pyaedt_function_handler def create_port(self, terminal, ref_terminal=None, is_circuit_port=False): - """""" + """Create a port between two terminals. + + Parameters + ---------- + terminal : class:`pyaedt.edb_core.edb_data.terminals.EdgeTerminal`, + class:`pyaedt.edb_core.edb_data.terminals.PadstackInstanceTerminal`, + class:`pyaedt.edb_core.edb_data.terminals.PointTerminal`, + class:`pyaedt.edb_core.edb_data.terminals.PinGroupTerminal`, + ref_terminal : class:`pyaedt.edb_core.edb_data.terminals.EdgeTerminal`, + class:`pyaedt.edb_core.edb_data.terminals.PadstackInstanceTerminal`, + class:`pyaedt.edb_core.edb_data.terminals.PointTerminal`, + class:`pyaedt.edb_core.edb_data.terminals.PinGroupTerminal`, + optional + is_circuit_port : bool, optional + Whether it is a circuit port. + + Returns + ------- + + """ if not ref_terminal: port = CoaxPort(self, terminal._edb_object) else: diff --git a/pyaedt/edb_core/edb_data/padstacks_data.py b/pyaedt/edb_core/edb_data/padstacks_data.py index 63ad03c959b..cff71ddfed1 100644 --- a/pyaedt/edb_core/edb_data/padstacks_data.py +++ b/pyaedt/edb_core/edb_data/padstacks_data.py @@ -1035,7 +1035,8 @@ def create_port(self, name=None, reference=None, is_circuit_port=False): class:`pyaedt.edb_core.edb_data.padstacks_data.EDBPadstackInstance`, class:`pyaedt.edb_core.edb_data.sources.PinGroup`, - is_circuit_port + is_circuit_port : bool, optional + Whether it is a circuit port. Returns ------- From 22e9f22951bd99437fd54d483e8b429f1e610b28 Mon Sep 17 00:00:00 2001 From: Hui Zhou Date: Fri, 27 Oct 2023 16:28:44 +0200 Subject: [PATCH 06/13] Update pyaedt/edb_core/edb_data/terminals.py Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com> --- pyaedt/edb_core/edb_data/terminals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyaedt/edb_core/edb_data/terminals.py b/pyaedt/edb_core/edb_data/terminals.py index dc987930c59..61de92cbba8 100644 --- a/pyaedt/edb_core/edb_data/terminals.py +++ b/pyaedt/edb_core/edb_data/terminals.py @@ -576,7 +576,7 @@ def create(self, name, net_name, pin_group_name, is_ref=False): pin_group_name : str, Name of the pin group. is_ref : bool, optional - Whether it is a reference terminal. + Whether it is a reference terminal. The default is ``False``. Returns ------- From a8c6af503f81f35232b8ccabd5102b9137057be4 Mon Sep 17 00:00:00 2001 From: Hui Zhou Date: Fri, 27 Oct 2023 16:28:50 +0200 Subject: [PATCH 07/13] Update pyaedt/edb_core/edb_data/sources.py Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com> --- pyaedt/edb_core/edb_data/sources.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyaedt/edb_core/edb_data/sources.py b/pyaedt/edb_core/edb_data/sources.py index 75ee9afc7b3..dd801f0f45b 100644 --- a/pyaedt/edb_core/edb_data/sources.py +++ b/pyaedt/edb_core/edb_data/sources.py @@ -290,7 +290,8 @@ def _create_terminal(self, name=None): Parameters ---------- name : str, optional - Name of the terminal. + Name of the terminal. The default is ``None``, in which case a name is + automatically assigned. Returns ------- From 27c87f1d12124497394f35be3d70f01892a17369 Mon Sep 17 00:00:00 2001 From: Hui Zhou Date: Fri, 27 Oct 2023 16:28:58 +0200 Subject: [PATCH 08/13] Update pyaedt/edb_core/edb_data/sources.py Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com> --- pyaedt/edb_core/edb_data/sources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyaedt/edb_core/edb_data/sources.py b/pyaedt/edb_core/edb_data/sources.py index dd801f0f45b..5adcb6e259b 100644 --- a/pyaedt/edb_core/edb_data/sources.py +++ b/pyaedt/edb_core/edb_data/sources.py @@ -277,7 +277,7 @@ def net_name(self): @property def terminal(self): - """Get terminal.""" + """Terminal.""" from pyaedt.edb_core.edb_data.terminals import PinGroupTerminal term = PinGroupTerminal(self._pedb, self._edb_pin_group.GetPinGroupTerminal()) From 994acf6789fbb0120334becfc661cdae8983f2ce Mon Sep 17 00:00:00 2001 From: Hui Zhou Date: Fri, 27 Oct 2023 16:29:04 +0200 Subject: [PATCH 09/13] Update pyaedt/edb_core/edb_data/padstacks_data.py Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com> --- pyaedt/edb_core/edb_data/padstacks_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyaedt/edb_core/edb_data/padstacks_data.py b/pyaedt/edb_core/edb_data/padstacks_data.py index cff71ddfed1..e7644e70006 100644 --- a/pyaedt/edb_core/edb_data/padstacks_data.py +++ b/pyaedt/edb_core/edb_data/padstacks_data.py @@ -1190,7 +1190,7 @@ def in_polygon(self, polygon_data, include_partial=True, simple_check=False): @property def pin(self): - """Return Edb padstack object.""" + """EDB padstack object.""" warnings.warn("`pin` is deprecated.", DeprecationWarning) return self._edb_padstackinstance From 6d838fa0cacff9cfdc617c124f3cbaab0ea6cba0 Mon Sep 17 00:00:00 2001 From: Hui Zhou Date: Fri, 27 Oct 2023 16:29:13 +0200 Subject: [PATCH 10/13] Update pyaedt/edb_core/edb_data/padstacks_data.py Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com> --- pyaedt/edb_core/edb_data/padstacks_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyaedt/edb_core/edb_data/padstacks_data.py b/pyaedt/edb_core/edb_data/padstacks_data.py index e7644e70006..f029fee8a28 100644 --- a/pyaedt/edb_core/edb_data/padstacks_data.py +++ b/pyaedt/edb_core/edb_data/padstacks_data.py @@ -1033,7 +1033,7 @@ def create_port(self, name=None, reference=None, is_circuit_port=False): Name of the port. reference : class:`pyaedt.edb_core.edb_data.nets_data.EDBNetsData`, class:`pyaedt.edb_core.edb_data.padstacks_data.EDBPadstackInstance`, - class:`pyaedt.edb_core.edb_data.sources.PinGroup`, + class:`pyaedt.edb_core.edb_data.sources.PinGroup`, optional is_circuit_port : bool, optional Whether it is a circuit port. From cd62bd81e923ded9a1359a150051287dc8c05537 Mon Sep 17 00:00:00 2001 From: Hui Zhou Date: Fri, 27 Oct 2023 16:29:21 +0200 Subject: [PATCH 11/13] Update pyaedt/edb.py Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com> --- pyaedt/edb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyaedt/edb.py b/pyaedt/edb.py index b1ce5724f43..bf5f0c5b214 100644 --- a/pyaedt/edb.py +++ b/pyaedt/edb.py @@ -3660,7 +3660,7 @@ def create_port(self, terminal, ref_terminal=None, is_circuit_port=False): class:`pyaedt.edb_core.edb_data.terminals.PinGroupTerminal`, optional is_circuit_port : bool, optional - Whether it is a circuit port. + Whether it is a circuit port. The default is ``False``. Returns ------- From 7c0495205e2cd6c3ddac46dfa6f1a456610de94b Mon Sep 17 00:00:00 2001 From: ring630 <@gmail.com> Date: Fri, 27 Oct 2023 16:32:11 +0200 Subject: [PATCH 12/13] fix --- pyaedt/edb.py | 2 ++ pyaedt/edb_core/edb_data/padstacks_data.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pyaedt/edb.py b/pyaedt/edb.py index bf5f0c5b214..3613c80450e 100644 --- a/pyaedt/edb.py +++ b/pyaedt/edb.py @@ -3654,11 +3654,13 @@ def create_port(self, terminal, ref_terminal=None, is_circuit_port=False): class:`pyaedt.edb_core.edb_data.terminals.PadstackInstanceTerminal`, class:`pyaedt.edb_core.edb_data.terminals.PointTerminal`, class:`pyaedt.edb_core.edb_data.terminals.PinGroupTerminal`, + Positive terminal of the port. ref_terminal : class:`pyaedt.edb_core.edb_data.terminals.EdgeTerminal`, class:`pyaedt.edb_core.edb_data.terminals.PadstackInstanceTerminal`, class:`pyaedt.edb_core.edb_data.terminals.PointTerminal`, class:`pyaedt.edb_core.edb_data.terminals.PinGroupTerminal`, optional + Negative terminal of the port. is_circuit_port : bool, optional Whether it is a circuit port. The default is ``False``. diff --git a/pyaedt/edb_core/edb_data/padstacks_data.py b/pyaedt/edb_core/edb_data/padstacks_data.py index f029fee8a28..e15d5562546 100644 --- a/pyaedt/edb_core/edb_data/padstacks_data.py +++ b/pyaedt/edb_core/edb_data/padstacks_data.py @@ -1034,7 +1034,7 @@ def create_port(self, name=None, reference=None, is_circuit_port=False): reference : class:`pyaedt.edb_core.edb_data.nets_data.EDBNetsData`, class:`pyaedt.edb_core.edb_data.padstacks_data.EDBPadstackInstance`, class:`pyaedt.edb_core.edb_data.sources.PinGroup`, optional - + Negative terminal of the port. is_circuit_port : bool, optional Whether it is a circuit port. From eac312a9e68ac7ad045a3f41930afab0d5012e29 Mon Sep 17 00:00:00 2001 From: Hui Zhou Date: Fri, 27 Oct 2023 16:33:17 +0200 Subject: [PATCH 13/13] Update pyaedt/edb_core/edb_data/padstacks_data.py Co-authored-by: Kathy Pippert <84872299+PipKat@users.noreply.github.com> --- pyaedt/edb_core/edb_data/padstacks_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyaedt/edb_core/edb_data/padstacks_data.py b/pyaedt/edb_core/edb_data/padstacks_data.py index e15d5562546..ed25ff69b08 100644 --- a/pyaedt/edb_core/edb_data/padstacks_data.py +++ b/pyaedt/edb_core/edb_data/padstacks_data.py @@ -1030,7 +1030,7 @@ def create_port(self, name=None, reference=None, is_circuit_port=False): Parameters ---------- name : str, optional - Name of the port. + Name of the port. The default is ``None``, in which case a name is automatically assigned. reference : class:`pyaedt.edb_core.edb_data.nets_data.EDBNetsData`, class:`pyaedt.edb_core.edb_data.padstacks_data.EDBPadstackInstance`, class:`pyaedt.edb_core.edb_data.sources.PinGroup`, optional