SourceExcitation#
- class pyedb.grpc.database.source_excitations.SourceExcitation(pedb)#
Manage sources and excitations.
Examples
>>> # Initialize EDB session >>> from pyedb import Edb >>> edb = Edb(edbpath="path/to/your/edb")
>>> # Access SourceExcitation class >>> source_excitations = edb.source_excitation
>>> # 1. create_source_on_component >>> # Create voltage source on component pins >>> from pyedb.grpc.database.utility.sources import Source, SourceType >>> source = Source( ... source_type=SourceType.Vsource, ... name="V1", ... positive_node=("U1", "VCC"), ... negative_node=("U1", "GND"), ... amplitude="1V", ... phase="0deg", ... impedance="50ohm", ... ) >>> source_excitations.create_source_on_component([source])
>>> # 2. create_port >>> # Create port between two terminals >>> pos_terminal = edb.terminals["MyTerminal"] >>> ref_terminal = edb.terminals["MyRefTerminal"] >>> port = source_excitations.create_port(pos_terminal, ref_terminal)
>>> # 3. create_port_on_pins >>> # Create circuit port between component pins >>> port_term = source_excitations.create_port_on_pins( ... refdes="U1", pins="Pin1", reference_pins=["GND_Pin1", "GND_Pin2"], impedance=50, port_name="Port1" ... )
>>> # 4. create_port_on_component >>> # Create coaxial ports on component nets >>> source_excitations.create_port_on_component( ... component="U1", net_list=["PCIe_RX0", "PCIe_RX1"], port_type=SourceType.CoaxPort, reference_net="GND" ... )
>>> # 5. add_port_on_rlc_component >>> # Replace RLC component with circuit port >>> source_excitations.add_port_on_rlc_component("R1")
>>> # 6. _create_terminal (Internal method - typically not called directly)
>>> # 7. _create_pin_group_terminal (Internal method)
>>> # 8. create_coax_port >>> # Create coaxial port on padstack >>> pin = edb.components["U1"].pins["Pin1"] >>> port_name = source_excitations.create_coax_port(pin)
>>> # 9. create_circuit_port_on_pin >>> # Create circuit port between two pins >>> pin1 = edb.components["U1"].pins["Pin1"] >>> pin2 = edb.components["U1"].pins["Pin2"] >>> port_name = source_excitations.create_circuit_port_on_pin(pin1, pin2, 50, "Port1")
>>> # 10. create_voltage_source_on_pin >>> # Create voltage source between pins >>> source_name = source_excitations.create_voltage_source_on_pin(pin1, pin2, 3.3, 0, "V1")
>>> # 11. create_current_source_on_pin >>> # Create current source between pins >>> source_name = source_excitations.create_current_source_on_pin(pin1, pin2, 0.1, 0, "I1")
>>> # 12. create_resistor_on_pin >>> # Create resistor between pins >>> res_name = source_excitations.create_resistor_on_pin(pin1, pin2, 100, "R1")
>>> # 13. create_circuit_port_on_net >>> # Create port between component nets >>> port_name = source_excitations.create_circuit_port_on_net( >>> "U1", "SignalNet", "U1", "GND", 50, "Port1" >>> )
>>> # 14. create_voltage_source_on_net >>> # Create voltage source between nets >>> source_name = source_excitations.create_voltage_source_on_net( >>> "U1", "VCC", "U1", "GND", 5.0, 0, "VCC_Source" >>> )
>>> # 15. create_current_source_on_net >>> # Create current source between nets >>> source_name = source_excitations.create_current_source_on_net( >>> "U1", "InputNet", "U1", "GND", 0.02, 0, "InputCurrent" >>> )
>>> # 16. create_coax_port_on_component >>> # Create coaxial ports on component >>> ports = source_excitations.create_coax_port_on_component( ... ["U1", "U2"], ["PCIe_RX0", "PCIe_TX0"], delete_existing_terminal=True ... )
>>> # 17. create_differential_wave_port >>> # Create differential wave port >>> pos_prim = edb.modeler.primitives[0] >>> neg_prim = edb.modeler.primitives[1] >>> port_name, diff_port = source_excitations.create_differential_wave_port( ... pos_prim.id, [0, 0], neg_prim.id, [0, 0.2], "DiffPort" ... )
>>> # 18. create_wave_port >>> # Create wave port >>> port_name, wave_port = source_excitations.create_wave_port(pos_prim.id, [0, 0], "WavePort")
>>> # 19. create_bundle_wave_port >>> # Create bundle wave port >>> port_name, bundle_port = source_excitations.create_bundle_wave_port( ... [pos_prim.id, neg_prim.id], [[0, 0], [0, 0.2]], "BundlePort" ... )
>>> # 20. create_dc_terminal >>> # Create DC terminal >>> source_excitations.create_dc_terminal("U1", "VCC", "VCC_Terminal")
>>> # 21. create_voltage_probe >>> # Create voltage probe >>> probe = source_excitations.create_voltage_probe(term1, term2)
>>> # 22. place_voltage_probe >>> # Place voltage probe between points >>> source_excitations.place_voltage_probe( ... "Probe1", "SignalNet", [0, 0], "TopLayer", "GND", [0.1, 0.1], "BottomLayer" ... )
>>> # Save and close EDB >>> edb.save() >>> edb.close()
Overview#
Create voltage, current source, or resistor on component. |
|
Create a port. |
|
Create circuit port between pins and reference ones. |
|
Create ports on a component. |
|
Deactivate RLC component and replace it with a circuit port. |
|
Add RLC gap boundary on component and replace it with a circuit port. |
|
Create HFSS 3Dlayout coaxial lumped port on a pastack |
|
Create a circuit port on a pin. |
|
Create a voltage source. |
|
Create a voltage source. |
|
Create a Resistor boundary between two given pins.. |
|
Create a circuit port on a NET. |
|
Create a pin group terminal. |
|
Create a voltage source. |
|
Create a voltage source. |
|
Create a coaxial port on a component or component list on a net or net list. |
|
Create a differential wave port. |
|
Create a wave port. |
|
Create a vertical edge port. |
|
Create a horizontal edge port. |
|
Create an edge port on nets. This command looks for traces and polygons on the |
|
Create an edge port on clipped signal traces. |
|
Create a bundle wave port. |
|
Create an HFSS port on a padstack. |
|
Return the total number of excitation ports in a layout. |
|
Place terminal between two points. |
|
Create hfss rlc boundary on pins. |
|
Create lumped port between two edges from two different polygons. Can also create a vertical port when |
|
Create circuit port between pin and a reference layer. |
|
Create a current source. |
|
Create current source between two pin groups. |
|
Create a voltage source. |
|
Create voltage source between two pin groups. |
|
Create a voltage probe. |
|
Create voltage probe between two pin groups. |
|
Create a dc terminal. |
|
Create a port between two pin groups. |
|
Place a voltage probe between two points. |
Get all excitations. |
|
Get all sources. |
|
Get all probes. |
Import detail#
from pyedb.grpc.database.source_excitations import SourceExcitation
Property detail#
Method detail#
- SourceExcitation.create_source_on_component(sources: pyedb.grpc.database.utility.sources.Source | List[pyedb.grpc.database.utility.sources.Source] | None = None) bool#
Create voltage, current source, or resistor on component.
- Parameters:
- sources
list[Source] List of
pyedb.grpc.utility.sources.Sourceobjects.
- sources
- Returns:
- bool
Truewhen successful,Falsewhen failed.
Examples
>>> from pyedb import Edb >>> from pyedb.grpc.utility.sources import Source, SourceType >>> edb = Edb() >>> source = Source(source_type=SourceType.Vsource, amplitude="1V", ...) >>> edb.source_excitation.create_source_on_component([source])
- SourceExcitation.create_port(terminal: pyedb.grpc.database.terminal.terminal.Terminal, ref_terminal: pyedb.grpc.database.terminal.terminal.Terminal | None = None, is_circuit_port: bool = False, name: str | None = None) Any#
Create a port.
- Parameters:
- terminalclass:pyedb.dotnet.database.edb_data.terminals.EdgeTerminal,
class:pyedb.grpc.database.terminals.PadstackInstanceTerminal, class:pyedb.grpc.database.terminals.PointTerminal, class:pyedb.grpc.database.terminals.PinGroupTerminal, Positive terminal of the port.
- ref_terminalclass:pyedb.grpc.database.terminals.EdgeTerminal,
class:pyedb.grpc.database.terminals.PadstackInstanceTerminal, class:pyedb.grpc.database.terminals.PointTerminal, class:pyedb.grpc.database.terminals.PinGroupTerminal, optional Negative terminal of the port.
- is_circuit_portbool,
optional Whether it is a circuit port. The default is
False.- name: str, optional
Name of the created port. The default is None, a random name is generated.
- Returns
- ——-
- list: [:class:`GapPort
, WavePort].
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> term = edb.terminals["MyTerminal"] >>> ref_term = edb.terminals["RefTerminal"] >>> port = edb.source_excitation.create_port(term, ref_term, name="Port1")
- SourceExcitation.create_port_on_pins(refdes: str | pyedb.grpc.database.components.Component, pins: int | str | pyedb.grpc.database.primitive.padstack_instance.PadstackInstance | List[int | str | pyedb.grpc.database.primitive.padstack_instance.PadstackInstance], reference_pins: int | str | pyedb.grpc.database.primitive.padstack_instance.PadstackInstance | List[int | str | pyedb.grpc.database.primitive.padstack_instance.PadstackInstance] = None, impedance: str | float = '50ohm', port_name: str | None = None, pec_boundary: bool = False, pingroup_on_single_pin: bool = False) pyedb.grpc.database.terminal.padstack_instance_terminal.PadstackInstanceTerminal#
Create circuit port between pins and reference ones.
- Parameters:
- refdes
Componentreferencedesignator str or Component object.
- pins
pinspecifier(s)orinstance(s)wheretheportterminalistobecreated.Singlepinnameoralistof - several can be provided. If several pins are provided a pin group will be created. Pin specifiers can be the
- global EDB object ID or padstack instance name or pin name on component with refdes ``refdes``. Pin instances
- can be provided as ``EDBPadstackInstance`` objects.
- For instance for the pin called ``Pin1`` located on component with refdes ``U1``: ``U1-Pin1``, ``Pin1`` with
- ``refdes=U1``, the pin’s global EDB object ID, or the ``EDBPadstackInstance`` corresponding to the pin can be
- provided.
Union[int, str, PadstackInstance], List[Union[int, str, PadstackInstance]]
- reference_pins
referencepinspecifier(s)orinstance(s)fortheportreferenceterminal.Allowedvaluesare - the same as for the ``pins`` parameter.
Union[int, str, PadstackInstance], List[Union[int, str, PadstackInstance]]
- impedance
Portimpedance str, float
- port_name
str,optional Port name. The default is
None, in which case a name is automatically assigned.- pec_boundarybool,
optional - Whether to define the PEC boundary, The default is ``False``. If set to ``True``,
- a perfect short is created between the pin and impedance is ignored. This
- parameter is only supported on a port created between two pins, such as
- when there is no pin group.
- pingroup_on_single_pinbool
If
Trueforce using pingroup definition on single pin to have the port created at the pad center. IfFalsethe port is created at the pad edge. Default value isFalse.
- refdes
- Returns:
EDBterminalcreated,orFalseiffailedtocreate.- Example:
>>> :obj:`from` :obj:`pyedb` :obj:`import` :obj:`Edb` ..>>> :obj:`edb` = :obj:`Edb`\(:obj:`path_to_edb_file`) ..>>> :obj:`pin` = "AJ6" ..>>> :obj:`ref_pins` = ["AM7", "AM4"] ..Ortotakeallreferencepins
>>> :obj:`ref_pins` = [:obj:`pin` :obj:`for` :obj:`pin` :obj:`in` :class:`python:list`\(:obj:`edb.components`\["U2A5"]:obj:`.pins.values`\()) :obj:`if` :obj:`pin.net_name` == "GND"] ..>>> :obj:`edb.components.create_port_on_pins`\(refdes="U2A5", pins=pin, reference_pins=ref_pins) ..>>> :obj:`edb.save_edb`\() ..>>> :obj:`edb.close_edb`\() ..
- SourceExcitation.create_port_on_component(component: str | pyedb.grpc.database.components.Component, net_list: str | List[str], port_type: str = 'coax_port', do_pingroup: bool | None = True, reference_net: str | None = None, port_name: List[str] | None = None, solder_balls_height: float | str = None, solder_balls_size: float | str = None, solder_balls_mid_size: float | str = None, extend_reference_pins_outside_component: bool | None = False) List[str]#
Create ports on a component.
- Parameters:
- component
strorComponent EDB component or str component name.
- net_list
strorlistofstring. List of nets where ports must be created on the component. If the net is not part of the component, this parameter is skipped.
- port_type
str,optional Type of port to create.
coax_portgenerates solder balls.circuit_portgenerates circuit ports on pins belonging to the net list.- do_pingroupbool
True activate pingroup during port creation (only used with combination of CircPort), False will take the closest reference pin and generate one port per signal pin.
- reference_net
strorlistofstring. list of the reference net.
- port_name
str Port name for overwriting the default port-naming convention, which is
[component][net][pin]. The port name must be unique. If a port with the specified name already exists, the default naming convention is used so that port creation does not fail.- solder_balls_height
float,optional Solder balls height used for the component. When provided default value is overwritten and must be provided in meter.
- solder_balls_size
float,optional Solder balls diameter. When provided auto evaluation based on padstack size will be disabled.
- solder_balls_mid_size
float,optional Solder balls mid-diameter. When provided if value is different than solder balls size, spheroid shape will be switched.
- extend_reference_pins_outside_componentbool
When no reference pins are found on the component extend the pins search with taking the closest one. If do_pingroup is True will be set to False. Default value is False.
- component
- Returns:
double, boolSalder ball height vale,
Falsewhen failed.
Examples
>>> from pyedb import Edb >>> edbapp = Edb("myaedbfolder") >>> net_list = ["M_DQ<1>", "M_DQ<2>", "M_DQ<3>", "M_DQ<4>", "M_DQ<5>"] >>> edbapp.excitations.create_port_on_component(cmp="U2A5", net_list=net_list, >>> port_type=SourceType.CoaxPort, do_pingroup=False, refnet="GND")
- SourceExcitation.add_port_on_rlc_component(component: str | pyedb.grpc.database.components.Component | None = None, circuit_ports: bool = True, pec_boundary: bool = False) bool#
Deactivate RLC component and replace it with a circuit port. The circuit port supports only two-pin components.
- Parameters:
- component
str Reference designator of the RLC component.
- circuit_portsbool
Truewill replace RLC component by circuit ports,Falsegap ports compatible with HFSS 3D modeler export.- pec_boundarybool,
optional Whether to define the PEC boundary, The default is
False. If set toTrue, a perfect short is created between the pin and impedance is ignored. This parameter is only supported on a port created between two pins, such as when there is no pin group.
- component
- Returns:
- bool
Truewhen successful,Falsewhen failed.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> edb.source_excitation.add_port_on_rlc_component("R1")
- SourceExcitation.add_rlc_boundary(component: str | pyedb.grpc.database.components.Component | None = None, circuit_type: bool = True) bool#
Add RLC gap boundary on component and replace it with a circuit port. The circuit port supports only 2-pin components.
- SourceExcitation.create_coax_port(padstackinstance: pyedb.grpc.database.primitive.padstack_instance.PadstackInstance | int, use_dot_separator: bool = True, name: str | None = None, create_on_top: bool = True) str | None#
Create HFSS 3Dlayout coaxial lumped port on a pastack Requires to have solder ball defined before calling this method.
- Parameters:
- padstackinstanceEdb.Cell.Primitive.PadstackInstance or
int Padstack instance object.
- use_dot_separatorbool,
optional Whether to use
.as the separator for the naming convention, which is[component][net][pin]. The default isTrue. IfFalse,_is used as the separator instead.- name
str Port name for overwriting the default port-naming convention, which is
[component][net][pin]. The port name must be unique. If a port with the specified name already exists, the default naming convention is used so that port creation does not fail.
- padstackinstanceEdb.Cell.Primitive.PadstackInstance or
- Returns:
strTerminal name.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> pin = edb.padstacks.instances[0] >>> edb.source_excitation.create_coax_port(pin, name="CoaxPort1")
- SourceExcitation.create_circuit_port_on_pin(pos_pin: str | pyedb.grpc.database.primitive.padstack_instance.PadstackInstance, neg_pin: str | pyedb.grpc.database.primitive.padstack_instance.PadstackInstance, impedance: int | float = 50, port_name: str | None = None) str | None#
Create a circuit port on a pin.
- Parameters:
- Returns:
strPort Name.
Examples
>>> from pyedb import Edb >>> edbapp = Edb("myaedbfolder", "project name", "release version") >>> pins = edbapp.components.get_pin_from_component("U2A5") >>> edbapp.siwave.create_circuit_port_on_pin(pins[0], pins[1], 50, "port_name")
- SourceExcitation.create_voltage_source_on_pin(pos_pin: str | pyedb.grpc.database.primitive.padstack_instance.PadstackInstance, neg_pin: str | pyedb.grpc.database.primitive.padstack_instance.PadstackInstance, voltage_value: int | float = 0, phase_value: int | float = 0, source_name: str | None = None) str | None#
Create a voltage source.
- Parameters:
- Returns:
strSource Name.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> pin1 = edb.components["U1"].pins["VCC"] >>> pin2 = edb.components["U1"].pins["GND"] >>> edb.source_excitation.create_voltage_source_on_pin(pin1, pin2, 3.3, name="VSource1")
- SourceExcitation.create_current_source_on_pin(pos_pin: str | pyedb.grpc.database.primitive.padstack_instance.PadstackInstance, neg_pin: str | pyedb.grpc.database.primitive.padstack_instance.PadstackInstance, current_value: int | float = 0, phase_value: int | float = 0, source_name: str | None = None) str | None#
Create a voltage source.
- Parameters:
- Returns:
strSource Name.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> pin1 = edb.components["U1"].pins["IN"] >>> pin2 = edb.components["U1"].pins["GND"] >>> edb.source_excitation.create_current_source_on_pin(pin1, pin2, 0.1, name="ISource1")
- SourceExcitation.create_resistor_on_pin(pos_pin: str | pyedb.grpc.database.primitive.padstack_instance.PadstackInstance, neg_pin: str | pyedb.grpc.database.primitive.padstack_instance.PadstackInstance, rvalue: int | float = 1, resistor_name: str | None = '') str | None#
Create a Resistor boundary between two given pins..
- Parameters:
- Returns:
strName of the resistor.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> pin1 = edb.components["U1"].pins["R1_p"] >>> pin2 = edb.components["U1"].pins["R1_n"] >>> edb.source_excitation.create_resistor_on_pin(pin1, pin2, 50, "R1")
- SourceExcitation.create_circuit_port_on_net(positive_component_name: str, positive_net_name: str, negative_component_name: str, negative_net_name: str | None = None, impedance_value: int | float = 50, port_name: str | None = None) str | None#
Create a circuit port on a NET.
It groups all pins belonging to the specified net and then applies the port on PinGroups.
- Parameters:
- positive_component_name
str Name of the positive component.
- positive_net_name
str Name of the positive net.
- negative_component_name
str,optional Name of the negative component. The default is
None, in which case the name of the positive net is assigned.- negative_net_name
str,optional Name of the negative net name. The default is
Nonewhich will look for GND Nets.- impedance_value
float,optional Port impedance value. The default is
50.- port_name
str,optional Name of the port. The default is
"".
- positive_component_name
- Returns:
strThe name of the port.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> edb.source_excitation.create_circuit_port_on_net("U1", "VCC", "U1", "GND", 50, "PowerPort")
- SourceExcitation.create_pin_group_terminal(positive_pins: pyedb.grpc.database.primitive.padstack_instance.PadstackInstance | List[pyedb.grpc.database.primitive.padstack_instance.PadstackInstance], negatives_pins: pyedb.grpc.database.primitive.padstack_instance.PadstackInstance | List[pyedb.grpc.database.primitive.padstack_instance.PadstackInstance] | None = None, name: str | None = None, impedance: int | float | str = 50, source_type: str = 'circuit_port', magnitude: float | str = 1.0, phase: float | str = 0, r: float = 0.0, l: float = 0.0, c: float = 0.0) str | None#
Create a pin group terminal.
- Parameters:
- positive_pins
positivepinsused. - class:
PadstackInstance or List[:class: ´PadstackInstance´]
- negatives_pins
negativepinsused. - class:
PadstackInstance or List[:class: ´PadstackInstance´]
- impedance
float,intorstr Terminal impedance. Default value is 50 Ohms.
- source_type
str Source type assigned on terminal. Supported values : “circuit_port”, “lumped_port”, “current_source”, “voltage_source”, “rlc”, “dc_terminal”. Default value is “circuit_port”.
- name
str,optional Source name.
- magnitude
float,intorstr,optional source magnitude.
- phase
float,intorstr,optional phase magnitude.
- r
float,optional Resistor value.
- l
float,optional Inductor value.
- c
float,optional Capacitor value.
- positive_pins
- SourceExcitation.create_voltage_source_on_net(positive_component_name: str, positive_net_name: str, negative_component_name: str | None = None, negative_net_name: str | None = None, voltage_value: int | float = 0, phase_value: int | float = 0, source_name: str | None = None) str | None#
Create a voltage source.
- Parameters:
- positive_component_name
str Name of the positive component.
- positive_net_name
str Name of the positive net.
- negative_component_name
str,optional Name of the negative component. The default is
None, in which case the name of the positive net is assigned.- negative_net_name
str,optional Name of the negative net name. The default is
Nonewhich will look for GND Nets.- voltage_value
float,optional Value for the voltage. The default is
3.3.- phase_value
optional Value for the phase. The default is
0.- source_name
str,optional Name of the source. The default is
"".
- positive_component_name
- Returns:
strThe name of the source.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> edb.source_excitation.create_voltage_source_on_net("U1", "VCC", "U1", "GND", 3.3, name="VCC_Source")
- SourceExcitation.create_current_source_on_net(positive_component_name: str, positive_net_name: str, negative_component_name: str | None = None, negative_net_name: str | None = None, current_value: int | float = 0, phase_value: int | float = 0, source_name: str | None = None) str | None#
Create a voltage source.
- Parameters:
- positive_component_name
str Name of the positive component.
- positive_net_name
str Name of the positive net.
- negative_component_name
str,optional Name of the negative component. The default is
None, in which case the name of the positive net is assigned.- negative_net_name
str,optional Name of the negative net name. The default is
Nonewhich will look for GND Nets.- voltage_value
float,optional Value for the voltage. The default is
3.3.- phase_value
optional Value for the phase. The default is
0.- source_name
str,optional Name of the source. The default is
"".
- positive_component_name
- Returns:
strThe name of the source.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> edb.source_excitation.create_current_source_on_net("U1", "INPUT", "U1", "GND", 0.1, name="InputCurrent") "InputCurrent"
- SourceExcitation.create_coax_port_on_component(ref_des_list: str | List[str], net_list: str | List[str], delete_existing_terminal: bool = False) List[str]#
- Create a coaxial port on a component or component list on a net or net list.
The name of the new coaxial port is automatically assigned.
- Parameters:
- Returns:
- bool
Truewhen successful,Falsewhen failed.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> edb.source_excitation.create_coax_port_on_component(["U1"], ["RF1", "RF2"])
- SourceExcitation.check_before_terminal_assignement(connectable: Any, delete_existing_terminal: bool = False) bool#
- SourceExcitation.create_differential_wave_port(positive_primitive_id: int | pyedb.grpc.database.primitive.primitive.Primitive, positive_points_on_edge: List[float], negative_primitive_id: int | pyedb.grpc.database.primitive.primitive.Primitive, negative_points_on_edge: List[float], port_name: str | None = None, horizontal_extent_factor: int | float = 5, vertical_extent_factor: int | float = 3, pec_launch_width: str = '0.01mm') Tuple[str, pyedb.grpc.database.terminal.bundle_terminal.BundleTerminal]#
Create a differential wave port.
- Parameters:
- positive_primitive_id
int,EDBPrimitives Primitive ID of the positive terminal.
- positive_points_on_edge
list Coordinate of the point to define the edge terminal. The point must be close to the target edge but not on the two ends of the edge.
- negative_primitive_id
int,EDBPrimitives Primitive ID of the negative terminal.
- negative_points_on_edge
list Coordinate of the point to define the edge terminal. The point must be close to the target edge but not on the two ends of the edge.
- port_name
str,optional Name of the port. The default is
None.- horizontal_extent_factor
int,float,optional Horizontal extent factor. The default value is
5.- vertical_extent_factor
int,float,optional Vertical extent factor. The default value is
3.- pec_launch_width
str,optional Launch Width of PEC. The default value is
"0.01mm".
- positive_primitive_id
- Returns:
tupleThe tuple contains: (port_name, pyedb.dotnet.database.edb_data.sources.ExcitationDifferential).
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> port_name, port = edb.source_excitation.create_differential_wave_port(0, [0, 0], 1, [0, 0.2])
- SourceExcitation.create_wave_port(prim_id: int | pyedb.grpc.database.primitive.primitive.Primitive, point_on_edge: List[float], port_name: str | None = None, impedance: int | float = 50, horizontal_extent_factor: int | float = 5, vertical_extent_factor: int | float = 3, pec_launch_width: str = '0.01mm') Tuple[str, pyedb.grpc.database.ports.ports.WavePort]#
Create a wave port.
- Parameters:
- prim_id
int,Primitive Primitive ID.
- point_on_edge
list Coordinate of the point to define the edge terminal. The point must be on the target edge but not on the two ends of the edge.
- port_name
str,optional Name of the port. The default is
None.- impedance
int,float,optional Impedance of the port. The default value is
50.- horizontal_extent_factor
int,float,optional Horizontal extent factor. The default value is
5.- vertical_extent_factor
int,float,optional Vertical extent factor. The default value is
3.- pec_launch_width
str,optional Launch Width of PEC. The default value is
"0.01mm".
- prim_id
- Returns:
tupleThe tuple contains: (Port name, pyedb.dotnet.database.edb_data.sources.Excitation).
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> port_name, port = edb.source_excitation.create_wave_port(0, [0, 0])
- SourceExcitation.create_edge_port_vertical(prim_id: int, point_on_edge: List[float], port_name: str | None = None, impedance: int | float = 50, reference_layer: str | None = None, hfss_type: str = 'Gap', horizontal_extent_factor: int | float = 5, vertical_extent_factor: int | float = 3, pec_launch_width: str = '0.01mm') str#
Create a vertical edge port.
- Parameters:
- prim_id
int Primitive ID.
- point_on_edge
list Coordinate of the point to define the edge terminal. The point must be on the target edge but not on the two ends of the edge.
- port_name
str,optional Name of the port. The default is
None.- impedance
int,float,optional Impedance of the port. The default value is
50.- reference_layer
str,optional Reference layer of the port. The default is
None.- hfss_type
str,optional Type of the port. The default value is
"Gap". Options are"Gap","Wave".- horizontal_extent_factor
int,float,optional Horizontal extent factor. The default value is
5.- vertical_extent_factor
int,float,optional Vertical extent factor. The default value is
3.- radial_extent_factor
int,float,optional Radial extent factor. The default value is
0.- pec_launch_width
str,optional Launch Width of PEC. The default value is
"0.01mm".
- prim_id
- Returns:
strPort name.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> term = edb.source_excitation.create_edge_port_vertical(0, [0, 0], reference_layer="TopLayer")
- SourceExcitation.create_edge_port_horizontal(prim_id: int | pyedb.grpc.database.primitive.primitive.Primitive, point_on_edge: List[float], ref_prim_id: int | pyedb.grpc.database.primitive.primitive.Primitive | None = None, point_on_ref_edge: List[float] | None = None, port_name: str | None = None, impedance: int | float = 50, layer_alignment: str = 'Upper') pyedb.grpc.database.terminal.edge_terminal.EdgeTerminal | None#
Create a horizontal edge port.
- Parameters:
- prim_id
int Primitive ID.
- point_on_edge
list Coordinate of the point to define the edge terminal. The point must be on the target edge but not on the two ends of the edge.
- ref_prim_id
int,optional Reference primitive ID. The default is
None.- point_on_ref_edge
list,optional Coordinate of the point to define the reference edge terminal. The point must be on the target edge but not on the two ends of the edge. The default is
None.- port_name
str,optional Name of the port. The default is
None.- impedance
int,float,optional Impedance of the port. The default value is
50.- layer_alignment
str,optional Layer alignment. The default value is
Upper. Options are"Upper","Lower".
- prim_id
- Returns:
strName of the port.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> edb.source_excitation.create_edge_port_horizontal(0, [0, 0], 1, [0, 0.1], "EdgePort")
- SourceExcitation.create_lumped_port_on_net(nets: str | List[str] | None = None, reference_layer: str | pyedb.grpc.database.layers.stackup_layer.StackupLayer | None = None, return_points_only: bool = False, digit_resolution: int = 6, at_bounding_box: bool = True) bool#
Create an edge port on nets. This command looks for traces and polygons on the nets and tries to assign vertical lumped port.
- Parameters:
- nets
list,optional List of nets, str or Edb net.
- reference_layer
str,Edblayer. Name or Edb layer object.
- return_points_onlybool,
optional Use this boolean when you want to return only the points from the edges and not creating ports. Default value is
False.- digit_resolution
int,optional The number of digits carried for the edge location accuracy. The default value is
6.- at_bounding_boxbool
- When
Truewill keep the edges from traces at the layout bounding box location. This is recommended when a cutout has been performed before and lumped ports have to be created on ending traces. Default value is
True.
- When
- nets
- Returns:
- bool
Truewhen successful,Falsewhen failed.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> points = edb.source_excitation.create_lumped_port_on_net(["Net1"], return_points_only=True)
- SourceExcitation.create_vertical_circuit_port_on_clipped_traces(nets: str | List[str] | pyedb.grpc.database.net.net.Net | List[pyedb.grpc.database.net.net.Net] | None = None, reference_net: str | pyedb.grpc.database.net.net.Net | None = None, user_defined_extent: List[float] | ansys.edb.core.geometry.polygon_data.PolygonData | None = None) List[List[str]] | bool#
Create an edge port on clipped signal traces.
- Parameters:
- Returns:
- [[
str]] Nested list of str, with net name as first value, X value for point at border, Y value for point at border, and terminal name.
- [[
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> terminals = edb.source_excitation.create_vertical_circuit_port_on_clipped_traces(["Net1"], "GND")
- SourceExcitation.create_bundle_wave_port(primitives_id: List[int | pyedb.grpc.database.primitive.primitive.Primitive], points_on_edge: List[List[float]], port_name: str | None = None, horizontal_extent_factor: int | float = 5, vertical_extent_factor: int | float = 3, pec_launch_width: str = '0.01mm') Tuple[str, pyedb.grpc.database.ports.ports.BundleWavePort]#
Create a bundle wave port.
- Parameters:
- primitives_id
list Primitive ID of the positive terminal.
- points_on_edge
list Coordinate of the point to define the edge terminal. The point must be close to the target edge but not on the two ends of the edge.
- port_name
str,optional Name of the port. The default is
None.- horizontal_extent_factor
int,float,optional Horizontal extent factor. The default value is
5.- vertical_extent_factor
int,float,optional Vertical extent factor. The default value is
3.- pec_launch_width
str,optional Launch Width of PEC. The default value is
"0.01mm".
- primitives_id
- Returns:
tupleThe tuple contains: (port_name, pyedb.egacy.database.edb_data.sources.ExcitationDifferential).
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> port_name, port = edb.source_excitation.create_bundle_wave_port([0, 1], [[0, 0], [0, 0.2]])
- SourceExcitation.create_hfss_ports_on_padstack(pinpos: pyedb.grpc.database.primitive.padstack_instance.PadstackInstance, portname: str | None = None) bool#
Create an HFSS port on a padstack.
- Parameters:
- pinpos
Position of the pin.
- portname
str,optional Name of the port. The default is
None.
- Returns:
- bool
Truewhen successful,Falsewhen failed.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> pin = edb.padstacks.instances[0] >>> edb.source_excitation.create_hfss_ports_on_padstack(pin, "Port1")
- SourceExcitation.get_ports_number() int#
Return the total number of excitation ports in a layout.
- Parameters:
- None
- Returns:
intNumber of ports.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> num_ports = edb.source_excitation.get_ports_number()
- SourceExcitation.get_point_terminal(name: str, net_name: str, location: List[float], layer: str) pyedb.grpc.database.terminal.point_terminal.PointTerminal#
Place terminal between two points.
- Parameters:
- Returns:
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> term = edb.source_excitation.get_point_terminal("Term1", "Net1", [0, 0], "TopLayer")
- SourceExcitation.create_rlc_boundary_on_pins(positive_pin: pyedb.grpc.database.primitive.padstack_instance.PadstackInstance | None = None, negative_pin: pyedb.grpc.database.primitive.padstack_instance.PadstackInstance | None = None, rvalue: float = 0.0, lvalue: float = 0.0, cvalue: float = 0.0) pyedb.grpc.database.terminal.terminal.Terminal | bool#
Create hfss rlc boundary on pins.
- Parameters:
- positive_pin
Positivepin. Edb.Cell.Primitive.PadstackInstance
- negative_pin
Negativepin. Edb.Cell.Primitive.PadstackInstance
- rvalue
Resistancevalue - lvalue
Inductancevalue - cvalue . Capacitance value.
- positive_pin
- Returns:
- bool
Truewhen successful,Falsewhen failed.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> pin1 = edb.components["U1"].pins["Pin1"] >>> pin2 = edb.components["U1"].pins["Pin2"] >>> term = edb.source_excitation.create_rlc_boundary_on_pins(pin1, pin2, rvalue=50)
- SourceExcitation.create_edge_port_on_polygon(polygon: pyedb.grpc.database.primitive.primitive.Primitive | None = None, reference_polygon: pyedb.grpc.database.primitive.primitive.Primitive | None = None, terminal_point: List[float] | None = None, reference_point: List[float] | None = None, reference_layer: str | pyedb.grpc.database.layers.stackup_layer.StackupLayer | None = None, port_name: str | None = None, port_impedance: int | float = 50.0, force_circuit_port: bool = False) str | None#
Create lumped port between two edges from two different polygons. Can also create a vertical port when the reference layer name is only provided. When a port is created between two edge from two polygons which don’t belong to the same layer, a circuit port will be automatically created instead of lumped. To enforce the circuit port instead of lumped,use the boolean force_circuit_port.
- Parameters:
- polygon
TheEDBpolygonobjectusedtoassigntheport. Edb.Cell.Primitive.Polygon object.
- reference_polygon
TheEDBpolygonobjectusedtodefinetheportreference. Edb.Cell.Primitive.Polygon object.
- terminal_point
Thecoordinateofthepointtodefinetheedgeterminaloftheport.Thispointmustbe - located on the edge of the polygon where the port has to be placed. For instance taking the middle point
- of an edge is a good practice but any point of the edge should be valid. Taking a corner might cause unwanted
- port location.
list[float, float] with values provided in meter.
- reference_point
sameasterminal_pointbutusedfordefiningthereferencelocationontheedge. list[float, float] with values provided in meter.
- reference_layer
Nameusedtodefineportreferenceforverticalports. str the layer name.
- port_name
Nameoftheport. str.
- port_impedance
portimpedancevalue.Defaultvalueis50 Ohms. float, impedance value.
- force_circuit_port ; used to force circuit port creation instead of lumped. Works for vertical and coplanar
- ports.
- polygon
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> poly = edb.modeler.primitives[0] >>> ref_poly = edb.modeler.primitives[1] >>> edb.source_excitation.create_edge_port_on_polygon(poly, ref_poly, [0, 0], [0.1, 0])
- SourceExcitation.create_port_between_pin_and_layer(component_name: str | None = None, pins_name: str | List[str] | None = None, layer_name: str | None = None, reference_net: str | None = None, impedance: int | float = 50.0) bool#
Create circuit port between pin and a reference layer.
- Parameters:
- Returns:
PadstackInstanceTerminalCreated terminal.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> terms = edb.source_excitation.create_port_between_pin_and_layer("U1", "Pin1", "GND", "GND")
- SourceExcitation.create_current_source(terminal: pyedb.grpc.database.terminal.padstack_instance_terminal.PadstackInstanceTerminal | pyedb.grpc.database.terminal.edge_terminal.EdgeTerminal, ref_terminal: pyedb.grpc.database.terminal.padstack_instance_terminal.PadstackInstanceTerminal | pyedb.grpc.database.terminal.edge_terminal.EdgeTerminal) bool#
Create a current source.
- Parameters:
- terminal
EdgeTerminalor PadstackInstanceTerminalorPointTerminalorPinGroupTerminal.Positive terminal of the source.
- ref_terminal
EdgeTerminalor pyedb.grpc.database.terminals.PadstackInstanceTerminalorPadstackInstanceTerminalorPinGroupTerminal.Negative terminal of the source.
- terminal
- Returns:
ExcitationSources
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> edb.source_excitation.create_current_source_on_pin_group("PG1", "PG2", 0.1, name="ISource1")
- SourceExcitation.create_current_source_on_pin_group(pos_pin_group_name: str, neg_pin_group_name: str, magnitude: int | float = 1, phase: int | float = 0, name: str | None = None) bool#
Create current source between two pin groups.
- SourceExcitation.create_voltage_source(terminal: pyedb.grpc.database.terminal.padstack_instance_terminal.PadstackInstanceTerminal | pyedb.grpc.database.terminal.edge_terminal.EdgeTerminal, ref_terminal: pyedb.grpc.database.terminal.padstack_instance_terminal.PadstackInstanceTerminal | pyedb.grpc.database.terminal.edge_terminal.EdgeTerminal, magnitude: int | float = 1, phase: int | float = 0) bool#
Create a voltage source.
- Parameters:
- name
str,optional Voltage source name
- terminal
EdgeTerminal, PadstackInstanceTerminal,PointTerminal,PinGroupTerminal, Positive terminal of the source.- ref_terminal
EdgeTerminal, pyedb.grpc.database.terminals.PadstackInstanceTerminal,PadstackInstanceTerminal,PinGroupTerminal, Negative terminal of the source.- magnitude
int,float,optional Magnitude of the source.
- phase
int,float,optional Phase of the source
- name
- Returns:
- class:ExcitationSources
- class:ExcitationSources
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> edb.source_excitation.create_voltage_source_on_pin_group("PG1", "PG2", 3.3, name="VSource1")
- SourceExcitation.create_voltage_source_on_pin_group(pos_pin_group_name: str, neg_pin_group_name: str, magnitude: int | float = 1, phase: int | float = 0, name: str | None = None, impedance: int | float = 0.001) bool#
Create voltage source between two pin groups.
- Parameters:
- Returns:
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> edb.source_excitation.create_voltage_probe_on_pin_group("Probe1", "PG1", "PG2")
- SourceExcitation.create_voltage_probe(terminal: pyedb.grpc.database.terminal.terminal.Terminal, ref_terminal: pyedb.grpc.database.terminal.terminal.Terminal) pyedb.grpc.database.terminal.terminal.Terminal#
Create a voltage probe.
- Parameters:
- terminal
EdgeTerminal, PadstackInstanceTerminal,PointTerminal,PinGroupTerminal, Positive terminal of the port.- ref_terminal
EdgeTerminal, pyedb.grpc.database.terminals.PadstackInstanceTerminal,PadstackInstanceTerminal,PinGroupTerminal, Negative terminal of the probe.
- terminal
- Returns:
Terminal
- SourceExcitation.create_voltage_probe_on_pin_group(probe_name: str, pos_pin_group_name: str, neg_pin_group_name: str, impedance: int | float = 1000000) bool#
Create voltage probe between two pin groups.
- SourceExcitation.create_dc_terminal(component_name: str, net_name: str, source_name: str | None = None) str | None#
Create a dc terminal.
- Parameters:
- Returns:
strThe name of the source.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> edb.source_excitation.create_dc_terminal("U1", "VCC", "DC_VCC")
- SourceExcitation.create_circuit_port_on_pin_group(pos_pin_group_name: str, neg_pin_group_name: str, impedance: int | float = 50, name: str | None = None) bool#
Create a port between two pin groups.
- Parameters:
- Returns:
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> edb.source_excitation.create_circuit_port_on_pin_group("PG1", "PG2", 50, "Port1")
- SourceExcitation.place_voltage_probe(name: str, positive_net_name: str, positive_location: List[float], positive_layer: str, negative_net_name: str, negative_location: List[float], negative_layer: str) pyedb.grpc.database.terminal.terminal.Terminal#
Place a voltage probe between two points.
- Parameters:
- namestr,
Name of the probe.
- positive_net_name
str Name of the positive net.
- positive_location
list Location of the positive terminal.
- positive_layerstr,
Layer of the positive terminal.
- negative_net_namestr,
Name of the negative net.
- negative_location
list Location of the negative terminal.
- negative_layer
str Layer of the negative terminal.
Examples
>>> from pyedb import Edb >>> edb = Edb() >>> probe = edb.source_excitation.place_voltage_probe( ... "Probe1", "Net1", [0, 0], "TopLayer", "GND", [0.1, 0], "TopLayer" ... )