FanoutPorts¶

class picazzo3.container.fanout_ports.FanoutPorts(*args, **kwargs)

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.

Parameters: Other Parameters: trace_template: ( PCell and _WaveguideTemplate ), *None allowed* Template for all ports. If 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: ), *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: Dictionary for remapping of the port names of the contents to the external ports name: The unique name of the pcell trace_templates: List with type restriction, allowed types: , locked list of templates to apply to all ports waveguides: List with type restriction, allowed types: , locked bundle: ( PCell ), locked, *None allowed* bundle of waveguides added to the contents, generated based on the supplied waveguides list

Views

Layout
Parameters: Other Parameters: angle_step: float and number > 0 Angle step for rounding. manhattan: ( bool, bool_, bool or int ) Adds rectangular blocks in the bends to avoid as much as possible non-manhattan angles. max_s_bend_angle: float and ]0.0,90.0] rounding_algorithm: Rounding algorithm used to generate the bends. Can be circular, spline, …. 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. view_name: str and ( Alphanumeric string or Contains _\$ ) The name of the view 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: 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. routes: 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 bend_radius: float and number > 0 Bend radius for the auto-generated bends. max_s_bend_angles: locked spacings_from_reference: locked target_coordinates: locked

Examples

from technologies import silicon_photonics
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()

from picazzo3.container.fanout_ports import FanoutPorts

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
)
lay.visualize(annotate=True)

from technologies import silicon_photonics
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    # 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