FanoutPorts

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.

Parameters:
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_ 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.

external_port_names: str

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

contents: PCell

the contents of the container: the child cell

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:
bundle: ( PCell ), locked, *None allowed*

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

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

list of templates to apply to all ports

Views

class Layout
Parameters:
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.

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

spacing between adjacent output waveguides

align_outputs: ( bool, bool_ or int )

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

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.

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

area_layer_on: ( bool, bool_ or int )

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

routes:

routes along which the waveguides will be generated

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

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

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

manhattan: ( 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.

rounding_algorithm:

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

bend_radius: float and number > 0

Bend radius for the auto-generated bends.

Other Parameters:
target_coordinates: locked
max_s_bend_angles: locked
spacings_from_reference: locked

Examples

import si_fab.all as pdk  # 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.Layout()

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

lay = my_ring_fanout.Layout(
    contents_transformation=i3.Rotation(rotation=10.0),
    flatten_contents=False,
    area_layer_on=False,  # if True, adds area layer on the bundle
    output_direction=i3.EAST,
    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
)
lay.visualize(annotate=True)
../../../../../_images/picazzo3-container-fanout_ports-FanoutPorts-1.png
import si_fab.all as pdk  # 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_t1.Layout(core_width=0.55)
wg_t2 = WireWaveguideTemplate()
wg_t2.Layout(core_width=0.35)

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

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

layout = my_ring_fanout.Layout(
    contents_transformation=i3.Rotation(rotation=10.0),
    flatten_contents=False,
    area_layer_on=False,  # draws a cover layer between the waveguides
    output_direction=i3.DIRECTION.EAST,
    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
)
layout.visualize(annotate=True)
../../../../../_images/picazzo3-container-fanout_ports-FanoutPorts-2.png