IoFibcoup

class picazzo3.container.iofibcoup.IoFibcoup

Adapter for grating fiber couplers.

The component East and West ports are routed towards the East and West, respectively. For this routing, they go through several steps.

  1. First of all, the ports of the component are transitioned to a common trace template trace_template. By default, it uses the standard waveguide definition defined in TECH.PCELLS.WG.DEFAULT. However, if set to None , the trace will use the trace template of the actual port. The same holds for transition_length. This can be manually specified by the user, but if a value in the list is set to None, the default length of that type of transition will be used.

  2. Then, the ports are fanned out to the fixed y_spacing of the fiber couplers. The length of that Fanout can be specified through fanout_length. Similarly, bend radius and rounding algorithm can be set through the parameter bend_radius and rounding_algorithm. If bundle_traces is True, the cover layers will be drawn over the Fanout. This can help reduce DRC errors.

  3. Then, the waveguides are transitioned to another waveguide template, specified in east_connect_trace_template. By default, this is the same template as trace_template, but it is possible to override it to use a lower loss multi-mode waveguide. The connection for which this waveguide is used is a simple straight connection, but depending on the chip layout it can have a long length. The transition length can be manually specified using the connect_transition_length.

  4. At the output, the waveguides are transitioned to the waveguide template of the individual input and output fiber couplers. The transition length from the connection waveguide to the grating coupler can be specified using fiber_coupler_transition_length.

  5. Finally, the circuit is terminated with fiber couplers, using the PCell specified in fiber_coupler

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

The trace template that will be used for the Fanout of the East and West ports. If ‘None’, the trace template of the individual port will be used. Defaults to TECH.PCELLS.WG.DEFAULT.

fiber_coupler_external_port_name_map: str

Dicts to map the names of the fiber coupler ports that will be exposed as external ports. The dict is of the form {‘port_name_on_termination’: ‘unique_external_port_name’, …}. the ‘unique_external_port_name’ string can contain the identifier {port}, which will be replaced by the corresponding port name on the component. For example, the default is {‘vertical_in’ : ‘{port}’}, which will map the port ‘vertical_in’ of the fiber coupler to the name of port on the component.

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

The trace template that will be used for connecting the Fanout of the East and West ports. to the Grating couplers. If ‘None’, the trace template of the individual port will be used. Defaults to the same as trace_template.

fiber_coupler: PCell

Fiber coupler to be attached to the East and West ports. Defaults to TECH.IO.FIBCOUP.DEFAULT.PCELLS.DEFAULT_GRATING

west_fiber_coupler_port_labels: List with type restriction, allowed types: <class ‘str’>

Port labels of the West fiber couplers connected to the ports of the contents. For fiber couplers with more than one port, the port labels should be concatenated with a ‘,’. For example, when using 2D grating couplers, the ports could be [‘in1,in2’, ‘in’]. This will use ports ‘in1’ and ‘in2’ of the first grating coupler, and ‘in’ of the second.By default, all the East ports of the fiber coupler are used. If an entry in the list is ‘None’, also the East ports of that fiber coupler are used. The number of entries in the list should not be identical to the number of West port. If the component has fewer West ports, only the first entries in the list will be used. If the component has more West ports, the list is just recycled. Therefore, it is allowed to use a list of just one element for multiple ports.

east_fiber_coupler_port_labels: List with type restriction, allowed types: <class ‘str’>

Port labels of the East fiber couplers connected to the ports of the contents. For fiber couplers with more than one port, the port labels should be concatenated with a ‘,’. For example, when using 2D grating couplers, the ports could be [‘in1,in2’, ‘in’]. This will use ports ‘in1’ and ‘in2’ of the first grating coupler, and ‘in’ of the second.By default, all the West ports of all the fiber couplers are used. If an entry in the list is ‘None’, also the west ports of that fiber coupler are used. The number of entries in the list should not be identical to the number of East port. If the component has fewer East ports, only the first entries in the list will be used. If the component has more East ports, the list is just recycled. Therefore, it is allowed to use a list of just one element for multiple ports.

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

Labels of the ports to directed to the West. Set to None to process all West ports.

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

Labels of the ports to directed to the East. Set to None to process all East 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:
west_trace_template: PCell and _WaveguideTemplate, locked
east_trace_template: PCell and _WaveguideTemplate, locked
west_trace_templates: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’>, locked
east_trace_templates: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’>, locked
west_fiber_coupler: PCell, locked
east_fiber_coupler: PCell, locked
west_fiber_coupler_external_port_name_map: locked
west_connect_trace_template: PCell and _WaveguideTemplate, locked
east_connect_trace_template: PCell and _WaveguideTemplate, locked
east_fiber_coupler_external_port_name_map: locked
west_connect_trace_templates: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’>, locked
east_connect_trace_templates: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’>, locked
west_fiber_coupler_external_port_name_maps: locked
west_fiber_couplers: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’>, locked
east_fiber_coupler_external_port_name_maps: locked
east_fiber_couplers: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’>, locked
port_labels: locked

Examples

"""This example illustrates how the IoFibcoup properties can customize
the routing in an IoColumn."""
import si_fab.all as pdk  # noqa: F401
from ipkiss3 import all as i3
from picazzo3.filters.mmi import MMIIdentical
from picazzo3.traces.wire_wg import WireWaveguideTemplate

wg_t1 = WireWaveguideTemplate()
wg_t1.Layout(core_width=7.0, cladding_width=8.0)
my_mmi = MMIIdentical(mmi_trace_template=wg_t1, n_inputs=1, n_outputs=5)
my_mmi.Layout(length=10.0, input_y_positions=[-1.0], output_y_positions=[-2.0, -1.0, 0.0, 1.0, 2.0])

from picazzo3.container.iofibcoup import IoFibcoup

from ipkiss3.pcell.blocks.iocolumn import IoColumn

my_column = IoColumn(name="iocol", adapter=IoFibcoup, max_n_o_lines=100)
layout = my_column.Layout(south_east=(1400.0, 0.0))

my_column.add(my_mmi)
my_column.add(my_mmi, relative_offset=(0.0, 50.0), transformation=i3.Rotation(rotation=180.0))

layout.visualize(annotate=True)
../../../../../_images/picazzo3-container-iofibcoup-IoFibcoup-1.png

Views

class Layout
Parameters:
fiber_coupler_transition_length: ( float and Real, number and number >= 0 ), *None allowed*

The length of the transition between the straight connection traces and the fiber coupler. If ‘None’, the default length for that type of transition is used.

connect_transition_length: ( float and Real, number and number >= 0 ), *None allowed*

The length of the transitions between the fanout ports and the straight connection traces to the fiber coupler. If ‘None’, the default length for that type of transition is used.

transition_length: ( float and Real, number and number >= 0 ), *None allowed*

The lengths of the transitions between the East and West ports of the component and the traces of the Fanout. If ‘None’, the default length for that type of transition is used.

max_s_bend_angle: float and number > 0 and ]0.0,90.0]

Maximum angle for the S-bend in the fanout.

fanout_length: float and number > 0

Length of the Fanout section

bundle_traces: ( bool, bool_ or int )

Combine the Fanout waveguides on the east in a bundle (adding Cover layers)?

west_max_s_bend_angle: float and number > 0 and ]0.0,90.0]

Maximum angle for the S-bend in the fanout of the West ports.

east_max_s_bend_angle: float and number > 0 and ]0.0,90.0]

Maximum angle for the S-bend in the fanout of the East ports.

fiber_coupler_transformation: GenericNoDistortTransform
west_max_s_bend_angles: ]0.0,90.0]

Maximum angle for the S-bend in the fanout of the West ports.

east_max_s_bend_angles: ]0.0,90.0]

Maximum angles for the S-bend in the fanout of the East ports.

west_fanout_lengths: ( number > 0 or None )

Lengths of the waveguides in the Fanout section of the West ports. If an entry in the list is None the lengths will be chosen automatically.If the required length is larger than the specified length, additional space will be used.

east_fanout_lengths: ( number > 0 or None )

Lengths of the waveguides in the Fanout section of the East ports. If an entry in the list is None the lengths will be chosen automatically.If the required length is larger than the specified length, additional space will be used.

relative_offset: Coord2

Offset of the component as it is positioned by absolute_offset

absolute_offset: Coord2

Offset of the component from the (0,0) of the adapter.By default this offset will be calculated such that the component ports areX-aligned around the center and that the first West port is Y-aligned to the south_west.This is after the contents_transformation has been applied.

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

outline_layer: __Layer__

Layer on which to draw the block outline

draw_block_outline: ( bool, bool_ or int )

Draw the outline of the block when set to True

south_east: Coord2

Position of the south east corner of the block

south_west: Coord2

Position of the south west corner of the block

y_spacing: float and number > 0

The spacing between blocks

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:
east_fiber_coupler_transition_length: locked
west_connect_transition_length: locked
east_connect_transition_length: locked
west_fiber_coupler_transition_lengths: locked
east_fiber_coupler_transition_lengths: locked
west_connect_transition_lengths: locked
east_connect_transition_lengths: locked
west_transition_length: locked
east_transition_length: locked
west_transition_lengths: locked
east_transition_lengths: locked
west_fanout_length: locked
east_fanout_length: locked
west_fiber_coupler_transition_length: locked
west_fiber_coupler_transformation: locked
east_fiber_coupler_transformation: locked
west_bundle_traces: locked
west_align_fanout: locked
east_align_fanout: locked
east_bundle_traces: locked
west_fiber_coupler_transformations: locked
east_fiber_coupler_transformations: locked
south_offset: int, locked

The y-offset between south_west & south_east, measured in units of y_spacing

width: float and Real, number and number >= 0, locked

The width of the block, calculated using south_west & south_east

Examples

"""This example illustrates the default settings of IoFibcoup,
by adding a Ring resonator to the adapter"""
import si_fab.all as pdk  # noqa: F401
from picazzo3.filters.ring import RingRect180DropFilter

my_ring = RingRect180DropFilter()

from picazzo3.container.iofibcoup import IoFibcoup

iofb = IoFibcoup(contents=my_ring)
iofb_layout = iofb.Layout()

iofb_layout.visualize(annotate=True)
../../../../../_images/picazzo3-container-iofibcoup-IoFibcoup-2.png
"""This example takes an MMI and encapsulates it in an IoFibcoupadapter.
It customizes several parameters of the adapter for individual tailoring of the East and West outputs."""
import si_fab.all as pdk  # noqa: F401
from ipkiss3 import all as i3
from picazzo3.filters.mmi import MMIIdentical
from picazzo3.traces.wire_wg import WireWaveguideTemplate

# normal waveguide template: single mode
wg_t = WireWaveguideTemplate()
wg_t.Layout(core_width=0.46)

# connect_template: wider to reduce losses
wgc_t = WireWaveguideTemplate()
wgc_t.Layout(core_width=2.0)

# MMI
wg_t1 = WireWaveguideTemplate()
wg_t1.Layout(core_width=7.0, cladding_width=8.0)
# input and output traces of the MMI
wg_t2 = WireWaveguideTemplate()
wg_t2.Layout(core_width=0.6)

my_mmi = MMIIdentical(
    mmi_trace_template=wg_t1,
    input_trace_template=wg_t2,
    output_trace_template=wg_t2,
    n_inputs=1,
    n_outputs=5,
)
my_mmi.Layout(length=10.0, input_y_positions=[-1.0], output_y_positions=[-2.0, -1.0, 0.0, 1.0, 2.0])

# fiber coupler
from picazzo3.fibcoup.uniform import UniformLineGrating

my_gc = UniformLineGrating(trace_template=wg_t1)

from picazzo3.container.iofibcoup import IoFibcoup

iofb = IoFibcoup(
    contents=my_mmi,  # the component
    trace_template=wg_t,  # trace template for fanout
    connect_trace_template=wgc_t,  # trace template for wide connections
    fiber_coupler=my_gc,  # fiber coupler
)

iofb_layout = iofb.Layout(
    contents_transformation=i3.Rotation(rotation=-10.0),  # rotate the contents
    connect_transition_length=30.0,  # transition length
    fiber_coupler_transition_length=50.0,  # transition length between connection WG and the fiber coupler
    south_west=(-0.0, 0.0),  # south west corner of the adapter
    south_east=(1200.0, 0.0),  # south east corner of the adapter
    relative_offset=(0.0, 70.0),  # offset of component from the center.
)
iofb_layout.visualize(annotate=True)
../../../../../_images/picazzo3-container-iofibcoup-IoFibcoup-3.png
"""This example shows how to use fiber couplers that don't have their waveguide port facing towards the east.

We use a fiber coupler with both an east-facing and a west-facing port here,
but this example can easily be applied to other couplers.
"""

import si_fab.all as pdk  # noqa: F401
from ipkiss3 import all as i3
from picazzo3.filters.mmi import MMI1x2
from picazzo3.traces.wire_wg import WireWaveguideTemplate

# normal waveguide template: single mode
wg_t = WireWaveguideTemplate()
wg_t.Layout(core_width=0.46)

# MMI
wg_t1 = WireWaveguideTemplate()
wg_t1.Layout(core_width=7.0, cladding_width=8.0)
# input and output traces of the MMI
wg_t2 = WireWaveguideTemplate()
wg_t2.Layout(core_width=0.6)

my_mmi = MMI1x2(
    mmi_trace_template=wg_t1,
    input_trace_template=wg_t2,
    output_trace_template=wg_t2,
)
my_mmi.Layout(length=10.0, trace_spacing=2.0)

# fiber coupler
from picazzo3.fibcoup.uniform import UniformLineGrating

my_gc = UniformLineGrating(trace_template=wg_t1)

from picazzo3.container.iofibcoup import IoFibcoup

# we want to use the west-facing 'in' port of the fiber coupler

iofb = IoFibcoup(
    contents=my_mmi,  # the component
    trace_template=wg_t,  # trace template for fanout
    fiber_coupler=my_gc,  # fiber coupler
    west_fiber_coupler_port_labels=["in"],
    east_fiber_coupler_port_labels=["in"],
)

iofb_layout = iofb.Layout(
    south_west=(0.0, 0.0),  # south west corner of the adapter
    south_east=(500.0, 0.0),  # south east corner of the adapter
    # we need to mirror the fiber coupler so the 'in' port faces east
    fiber_coupler_transformation=i3.HMirror(),
)
iofb_layout.visualize(annotate=True)
../../../../../_images/picazzo3-container-iofibcoup-IoFibcoup-4.png