gdsfactory.routing.add_electrical_pads_top#
- gdsfactory.routing.add_electrical_pads_top(component: ComponentSpec = functools.partial(<function straight>, cross_section='metal_routing', length=200.0), direction: str = 'top', spacing: tuple[float, float] = (0.0, 100.0), pad_array: ComponentSpec = <function pad_array>, select_ports: ~collections.abc.Callable = functools.partial(<function select_ports>, port_type='electrical'), port_names: ~collections.abc.Sequence[str] | None = None, layer: LayerSpec = 'MTOP', **kwargs: ~typing.Any) Component [source]#
Returns new component with electrical ports connected to top pad array.
- Parameters:
component – to route.
direction – sets direction of the array (top or right).
spacing – component to pad spacing.
pad_array – function for pad_array.
select_ports – function to select electrical ports.
port_names – optional port names. Overrides select_ports.
layer – for the routes.
kwargs – additional arguments.
- Keyword Arguments:
ports – Dict[str, Port] a port dict {port name: port}.
prefix – select ports with port name prefix.
suffix – select ports with port name suffix.
orientation – select ports with orientation in degrees.
width – select ports with port width.
layers_excluded – List of layers to exclude.
port_type – select ports with port type (optical, electrical, vertical_te).
clockwise – if True, sort ports clockwise, False: counter-clockwise.
import gdsfactory as gf c = gf.components.wire_straight(length=200.) cc = gf.routing.add_electrical_pads_top(component=c, spacing=(-150, 30)) cc.plot()
(
Source code
,png
,hires.png
,pdf
)