gdsfactory.routing.add_pads_top

Contents

gdsfactory.routing.add_pads_top#

gdsfactory.routing.add_pads_top(component='straight_heater_metal', select_ports=functools.partial(<function select_ports>, port_type='electrical'), port_names=None, cross_section='metal_routing', pad_port_name='e1', pad='pad_rectangular', bend='wire_corner', straight_separation=15.0, pad_pitch=100.0, port_type='electrical', allow_width_mismatch=True, fanout_length=0, route_width=0, bboxes=None, avoid_component_bbox=False, auto_taper=True, **kwargs)[source]#

Returns new component with ports connected top pads.

Parameters:
  • component (ComponentSpec) – component spec to connect to.

  • select_ports (Callable[[...], Sequence[DPort]]) – function to select_ports.

  • port_names (Sequence[str] | None) – optional port names. Overrides select_ports.

  • cross_section (CrossSectionSpec) – cross_section spec.

  • get_input_labels_function – function to get input labels. None skips labels.

  • layer_label – optional layer for grating coupler label.

  • pad_port_name (str) – pad input port name.

  • pad_port_labels – pad list of labels.

  • pad (ComponentSpec) – spec for route terminations.

  • bend (ComponentSpec) – bend spec.

  • straight_separation (float) – from wire edge to edge. Defaults to xs.width+xs.gap

  • pad_pitch (float) – in um. Defaults to pad_pitch constant from the PDK.

  • port_type (str) – port type.

  • allow_width_mismatch (bool) – True

  • fanout_length (float | None) – if None, automatic calculation of fanout length.

  • route_width (float | None) – width of the route. If None, defaults to cross_section.width.

  • bboxes (Sequence[tuple[float, float, float, float]] | None) – list of bounding boxes to avoid.

  • avoid_component_bbox (bool) – True

  • auto_taper (bool) – adds tapers to the routing.

  • kwargs (Any) – additional arguments.

Keyword Arguments:
  • straight – straight spec.

  • get_input_label_text_loopback_function – function to get input label test.

  • get_input_label_text_function – for labels.

  • max_y0_optical – in um.

  • with_loopback – True, adds loopback structures.

  • list_port_labels – None, adds TM labels to port indices in this list.

  • connected_port_list_ids – names of ports only for type 0 optical routing.

  • nb_optical_ports_lines – number of grating coupler lines.

  • force_manhattan – False

  • excluded_ports – list of port names to exclude when adding gratings.

  • grating_indices – list of grating coupler indices.

  • routing_straight – function to route.

  • routing_method – route_single.

  • gc_rotation – fiber coupler rotation in degrees. Defaults to -90.

  • input_port_indexes – to connect.

  • allow_width_mismatch – True

Return type:

Component

import gdsfactory as gf
c = gf.c.nxn(
    xsize=600,
    ysize=200,
    north=2,
    south=3,
    wg_width=10,
    layer="M3",
    port_type="electrical",
)
cc = gf.routing.add_pads_top(component=c, port_names=("e1", "e4"), fanout_length=50)
cc.plot()

(Source code, png, hires.png, pdf)

../_images/gdsfactory-routing-add_pads_top-1.png