class picazzo3.container.fanout_ports.FanoutPorts

Fanout Container. Routes all ports listed in port_labels into a given direction, with a given spacing. This is typically used to redirect a set of ports on a component to a regularly spaced array of ports. The user can use this to convert from one input/output waveguide pitch to another, or from irregular input/output waveguide positioning to a regular pitch.

If port_labels is not specified, all ports will be routed.

By default, the default waveguide template specified in the technology, TECH.PCELLS.WG.DEFAULT, will be used. This can be overridden by setting trace_template=None, in which case the trace templates of the ports of the contents will be used.

trace_template: ( PCell and _WaveguideTemplate ), *None allowed*

Template for all ports, defaults to TECH.PCELLS.WG.DEFAULT.When set to None, the waveguide templates of the ports will be used.

auto_transition: ( bool, bool_, bool or int )

If True, automatically transition all ports of contents to the given trace template. If False, no transitions are applied, which might lead to a discontinuity in the waveguide. Also, if trace_template is None, no transitions are applied.

port_labels: ( List with type restriction, allowed types: <class ‘str’> ), *None allowed*

Labels of the ports to be processed. Set to None to process all ports.

contents: PCell

the contents of the container: the child cell

external_port_names: str

Dictionary for remapping of the port names of the contents to the external ports

name: String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters

The unique name of the pcell

Other Parameters
trace_templates: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’>, locked

list of templates to apply to all ports

waveguides: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’>, locked
bundle: ( PCell ), locked, *None allowed*

bundle of waveguides added to the contents, generated based on the supplied waveguides list


class Layout
max_s_bend_angle: float and ]0.0,90.0]
spacing: float

spacing between adjacent output waveguides

target_coordinate: ( float ), *None allowed*

The coordinate where the endpoints of the waveguides are aligned. An x-coordinate when routing toEAST or WEST, a y-coordinate when routing to NORTH or SOUTH. When the waveguides extend beyond thetarget coordinate, the value is ignored.

align_outputs: ( bool, bool_, bool or int )

If True, all outputs will be aligned to the outermost waveguide end, even if it extends beyond its target coordinate.

output_direction: List with value restriction, allowed values: [C2(1.000000, 0.000000), C2(-1.000000, 0.000000), C2(0.000000, 1.000000), C2(0.000000, -1.000000)]

direction of the output waveguides. Should be EAST, WEST, NORTH or SOUTH

reference_coordinate: ( float ), *None allowed*

The coordinate where the first waveguide will be aligned. An x-coordinate if routed towards NORTH or SOUTH,a y-coordinate when routed towards EAST or WEST. If not specified, the x or y coordinate of the first port is taken.

area_layer_on: ( bool, bool_, bool or int )

When True, the waveguide area will be covered by i3.Rectangles on all cover layers.

view_name: String that contains only alphanumeric characters from the ASCII set or contains _$. ASCII set is extended on PY3.

The name of the view


routes along which the waveguides will be generated

contents_transformation: GenericNoDistortTransform
flatten_contents: ( bool, bool_, bool or int )

if True, it will insert the contents as elements in the layout, rather than as an Instance

manhattan: ( bool, bool_, bool or int )

Adds rectangular blocks in the bends to avoid as much as possible non-manhattan angles.

angle_step: float and number > 0

Angle step for rounding.

bend_radius: float and number > 0

Bend radius for the auto-generated bends.


Rounding algorithm used to generate the bends. Can be circular, spline, ….

Other Parameters
max_s_bend_angles: locked
spacings_from_reference: locked
target_coordinates: locked


from technologies import silicon_photonics  # noqa: F401
from picazzo3.filters.ring import RingRect180DropFilter
from picazzo3.container.fanout_ports import FanoutPorts
from ipkiss3 import all as i3

my_ring = RingRect180DropFilter()

my_ring_fanout = FanoutPorts(contents=my_ring, port_labels=["E0", "E1"])

lay = my_ring_fanout.Layout(
    area_layer_on=False,  # if True, adds area layer on the bundle
    spacing=20.0,  # spacing between outputs
    reference_coordinate=-12.5,  # y-coordinate (or x for NORTH and SOUTH) of first waveguide
    target_coordinate=20.0,  # x-coordinate (or y for NORTH and SOUTH) of output port
    max_s_bend_angle=45.0,  # maximum angle of S-bend
    bend_radius=4.5,  # bend radius of waveguides
from technologies import silicon_photonics  # noqa: F401
from picazzo3.filters.ring import RingRect180DropFilter
from picazzo3.traces.wire_wg import WireWaveguideTemplate
from picazzo3.container.fanout_ports import FanoutPorts
from ipkiss3 import all as i3

wg_t1 = WireWaveguideTemplate()
wg_t2 = WireWaveguideTemplate()

my_ring = RingRect180DropFilter(name="ring_for_fanout", coupler_trace_templates=[wg_t1, wg_t2])

my_ring_fanout = FanoutPorts(
    port_labels=["E0", "E1"],
    auto_transition=True,  # this adds transitions when the waveguide templates don't match.

layout = my_ring_fanout.Layout(
    area_layer_on=False,  # draws a cover layer between the waveguides
    spacing=20.0,  # spacing between outputs
    max_s_bend_angle=60.0,  # maximum angle of S-bend
    bend_radius=10.0,  # bend radius of waveguides