Routing API#

single route#

get_route(input_port, output_port[, bend, ...])

Returns a Manhattan Route between 2 ports.

get_route_from_steps(port1, port2[, steps, ...])

Returns a route formed by the given waypoints steps.

route_quad(port1, port2[, width1, width2, ...])

Routes a basic quadrilateral polygon directly between two ports.

route_sharp(port1, port2[, width, ...])

Returns Component route between ports.

bundle route#

When you need to route groups of ports together without them crossing each other You can use a bundle/river/bus router. get bundle is the generic river bundle bus routing function that will call different function depending on the port orientation. Get bundle acts as a high level entry point. Based on the angle configurations of the banks of ports, it decides which sub-routine to call:

  • get_bundle_same_axis, banks or ports facing each other (but with arbitrary and varying pitch on each side)

  • get_bundle_corner, banks of ports with 90Deg / 270Deg between them (again pitch is flexible on both sides)

  • get_bundle_udirect, banks of ports with direct U-turns

  • get_bundle_uindirect, banks of ports with indirect U-turns

get_bundle(ports1, ports2[, separation, ...])

Returns list of routes to connect two groups of ports.

get_bundle_from_steps#

get_bundle_from_steps(ports1, ports2[, ...])

Returns a list of routes formed by the given waypoints steps.

get_bundle_path_length_match(ports1, ports2)

Returns list of routes that are path length matched.

get_bundle_all_angle#

get_bundle_all_angle(ports1, ports2[, ...])

Connects a bundle of ports, allowing steps which create waypoints at arbitrary, non-manhattan angles.

route_ports_to_side#

For now get_bundle is not smart enough to decide whether it should call route_ports_to_side. So you either need to connect your ports to face in one direction first, or to use route_ports_to_side before calling get_bundle

route_ports_to_side(ports[, side, x, y, ...])

Routes ports to a given side.

route_south(component[, ...])

Returns Routes to route a component ports to the south.

fanout#

get_route_sbend(port1, port2, *[, bend_s])

Returns an Sbend Route to connect two ports.

get_bundle_sbend(ports1, ports2[, ...])

Returns a list of routes from ports1 to ports2.

fanout2x2([component, port_spacing, ...])

Returns component with Sbend fanout routes.

fanout_component(component, port_names[, ...])

Returns component with Sbend fanout routes.

fanout_ports(ports[, pitch, dx])

Returns fanout Sbend routes.

add_fiber_array / add_fiber_single#

In cases where individual components have to be tested, you can generate the array of optical I/O and connect them to the component.

You can connect the waveguides to a 127um pitch fiber array or to individual fibers for input and output.

add_fiber_array.add_fiber_array([component, ...])

Returns component with south routes and grating_couplers.

add_fiber_single.add_fiber_single([...])

Returns component with grating couplers and labels on each port.

add_pads#

add_pads_top([component])

Returns new component with ports connected top pads.

add_pads_bot([component, select_ports, ...])

Returns new component with ports connected bottom pads.

add_electrical_pads_shortest([component, ...])

Returns new Component with a pad by each electrical port.

add_electrical_pads_top([component, ...])

Returns new component with electrical ports connected to top pad array.

add_electrical_pads_top_dc([component, ...])

Returns new component with electrical ports connected to top pad array.