create_port_on_pins#
- Components.create_port_on_pins(refdes, pins, reference_pins, impedance=50.0, port_name=None, pec_boundary=False)[source]#
Create circuit port between pins and reference ones.
- Parameters:
- refdes
Component
reference
designator
str or EDBComponent object.
- pins
pin
name
where
the
terminal
has
to
be
created.Single
pin
orseveral
ones
can
be
provided.If
several
- pins are provided a pin group will is created. Pin names can be the EDB name or the EDBPadstackInstance one.
- For instance the pin called ``Pin1`` located on component ``U1``, ``U1-Pin1`` or ``Pin1`` can be provided and
- will be handled.
str, [str], EDBPadstackInstance, [EDBPadstackInstance]
- reference_pins
reference
pin
name
used
for
terminal
reference.Single
pin
orseveral
ones
can
be
provided. - If several pins are provided a pin group will is created. Pin names can be the EDB name or the
- EDBPadstackInstance one. For instance the pin called ``Pin1`` located on component ``U1``, ``U1-Pin1``
- or ``Pin1`` can be provided and will be handled.
str, [str], EDBPadstackInstance, [EDBPadstackInstance]
- impedance
Port
impedance
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.
- refdes
- Returns:
EDB
terminal
created
,or
False
if
failed
to
create.- 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"] ..
Or
to
take
all
reference
pins
>>> :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`\() ..