IoFibcoupGeneric

class picazzo3.container.iofibcoup.IoFibcoupGeneric

generic adapter for grating fiber couplers.

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

Here, we discuss the use for the East ports, but a similar set of parameters is available for the West ports. A lot of the properties are “plural”. This means that they can accept a list of parameters (e.g. east_trace_templates). This allows you to specify the template (or other parameter) for each individual port. The lists do not need to have the exact same length as the number of ports. If the number of elements is different from the number of ports in your component, the IoFibcoupGeneric will just cycle through the list. That way, if all the ports use the same value, you only need to supply a list of one element.

  1. First of all, the ports of the component are transitioned to a common trace template east_trace_templates. By default, it uses the standard waveguide definition defined in TECH.PCELLS.WG.DEFAULT. However, if an element of the list is None , it will use the trace template of the actual port. The same holds for east_transition_lengths. This can be manually specified by the user, but if a value in the list is set to None, the default length of that 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 east_fanout_length. Bend radius and rounding algorithm is shared between all ports in the parameter bend_radius and rounding_algorithm. If west_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_templates. By default, this is the same template as east_trace_templates, 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 lengths can be manually specified using the east_connect_transition_lengths.

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

  5. Finally, the circuit is terminated with the individual fiber couplers, specified in east_fiber_couplers

The same procedure and parameters are used for the west ports

Parameters
east_trace_templates: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’> and ( _WaveguideTemplate or None ) and [1,None]

The trace templates that will be used for the Fanout of the East ports. and the traces of the Fanout. If an entry of the list is ‘None’, the trace template of the individual port will be used. Defaults to [TECH.PCELLS.WG.DEFAULT]. 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_trace_templates: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’> and ( _WaveguideTemplate or None ) and [1,None]

The trace templates that will be used for the Fanout of the West ports. and the traces of the Fanout. If an entry of the list is ‘None’, the trace template of the individual port will be used. Defaults to [TECH.PCELLS.WG.DEFAULT]. 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_connect_trace_templates: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’> and ( _WaveguideTemplate or None ) and [1,None]

The trace templates that will be used for connecting the Fanout of the East ports. to the Grating couplers. If an entry of the list is ‘None’, the trace template of the individual port will be used. Defaults to the same as east_trace_templates. 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_connect_trace_templates: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’> and ( _WaveguideTemplate or None ) and [1,None]

The trace templates that will be used for connecting the Fanout of the West ports. to the Grating couplers. If an entry of the list is ‘None’, the trace template of the individual port will be used. Defaults to the same as west_trace_templates. 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_external_port_name_maps: str

list of dicts to map the names of the East fiber coupler ports that will be exposed as external ports. The format is [dict1, dict2, …] with for each termination a dict 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.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. 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.

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.

east_fiber_couplers: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’> and [1,None]

List of the fiber couplers to be attached on the East ports. Defaults to [TECH.IO.FIBCOUP.DEFAULT.PCELLS.DEFAULT_GRATING] 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_fiber_coupler_external_port_name_maps: str

list of dicts to map the names of the West fiber coupler ports that will be exposed as external ports. The format is [dict1, dict2, …] with for each termination a dict 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.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. 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.

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.

west_fiber_couplers: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’> and [1,None]

List of the fiber couplers to be attached on the West ports. Defaults to [TECH.IO.FIBCOUP.DEFAULT.PCELLS.DEFAULT_GRATING] 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_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.

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.

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
port_labels: locked

Examples

"""This example illustrates how the IoFibcoupGeneric properties can customize the routing in an IoColumn."""
from technologies import silicon_photonics  # 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 IoFibcoupGeneric

from ipkiss3.pcell.blocks.iocolumn import IoColumn

my_column = IoColumn(name="iocol", adapter=IoFibcoupGeneric, max_n_o_lines=100)
my_column.Layout(south_east=(1500.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))

my_column.Layout()

Views

class Layout
Parameters
east_connect_transition_lengths: ( number >= 0 or None ) and [1,None]

The lengths of the transitions between the East fanout ports and the straight connection traces to the fiber coupler. If an entry of the list is ‘None’, the default length of the transition of that type will be used. Defaults to [None]. 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.

east_fiber_coupler_transition_lengths: ( number >= 0 or None ) and [1,None]

The lengths of the transitions between the East straight connection traces and the fiber coupler. If an entry of the list is ‘None’, the default length of the transition of that type will be used. Defaults to [None]. 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.

east_transition_lengths: ( number >= 0 or None ) and [1,None]

The lengths of the transitions between the East ports of the component and the traces of the Fanout. If an entry of the list is ‘None’, the default length of the transition of that type will be used. Defaults to [None]. 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_connect_transition_lengths: ( number >= 0 or None ) and [1,None]

The lengths of the transitions between the West fanout ports and the straight connection traces to the fiber coupler. If an entry of the list is ‘None’, the default length of the transition of that type will be used. Defaults to [None]. 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.

west_fiber_coupler_transition_lengths: ( number >= 0 or None ) and [1,None]

The lengths of the transitions between the West straight connection traces and the fiber coupler. If an entry of the list is ‘None’, the default length of the transition of that type will be used. Defaults to [None]. 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.

west_transition_lengths: ( number >= 0 or None ) and [1,None]

The lengths of the transitions between the West ports of the component and the traces of the Fanout. If an entry of the list is ‘None’, the default length of the transition of that type will be used. Defaults to [None]. 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_align_fanout: ( bool, bool_, bool or int )

if True, the outputs of the waveguides in the East Fanout will be aligned.

east_bundle_traces: ( bool, bool_, bool or int )

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

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.

east_max_s_bend_angles: ]0.0,90.0]

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

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

west_align_fanout: ( bool, bool_, bool or int )

if True, the outputs of the waveguides in the West Fanout will be aligned.

west_bundle_traces: ( bool, bool_, bool or int )

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

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.

west_max_s_bend_angles: ]0.0,90.0]

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

east_fiber_coupler_transformations: List with type restriction, allowed types: <class ‘ipkiss.geometry.transforms.no_distort.NoDistortTransform’>

Transformations of the individual East fiber couplers, relative to the y_spacing grid of the adapter. By default, a Horizontal Mirroring is applied. 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_fiber_coupler_transformations: List with type restriction, allowed types: <class ‘ipkiss.geometry.transforms.no_distort.NoDistortTransform’>

Transformations of the individual West fiber couplers, relative to the y_spacing grid of the adapter. By default, a no transformation is applied. 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.

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
draw_block_outline: ( bool, bool_, bool or int )

Draw the outline of the block when set to True

flatten_contents: ( bool, 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

relative_offset: Coord2

Offset of the component as it is positioned by absolute_offset

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

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:

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

Other Parameters
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 IoFibcoupGeneric,
by adding a Ring resonator to the adapter"""
from technologies import silicon_photonics  # noqa: F401
from picazzo3.filters.ring import RingRect180DropFilter

my_ring = RingRect180DropFilter()

from picazzo3.container.iofibcoup import IoFibcoupGeneric

iofb = IoFibcoupGeneric(contents=my_ring)
iofb_layout = iofb.Layout()
iofb_layout.visualize(annotate=True)
../../../../_images/picazzo3-container-iofibcoup-IoFibcoupGeneric-2.png
"""This example takes an MMI and encapsulates it in an IoFibcoup adapter.
It customizes several parameters of the adapter for individual tailoring of each input and output.
For instance, it explicitly lists the east ports of the MMI, skipping port 'out4'.
It also uses 2 different grating couplers on the East side, and 3 different transformations.
The cycling of the parameters will cause the fiber couplers to be repeated every even and odd line
(because there are 2 fiber couplers specified), while the transformation will repeat every 3 lines.
As a result, the 4 outputs of the MMI all have a different combination of fiber coupler
and its transformation."""

from technologies import silicon_photonics  # noqa: F401
from ipkiss3 import all as i3
from picazzo3.traces.wire_wg import WireWaveguideTemplate
from picazzo3.container.iofibcoup import IoFibcoupGeneric
from picazzo3.filters.mmi import MMIIdentical

# 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)

# input and output traces of the MMI
wg_t1 = WireWaveguideTemplate()
wg_t1.Layout(core_width=7.0, cladding_width=8.0)
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])

from picazzo3.fibcoup.uniform import UniformLineGrating

my_gc = UniformLineGrating(trace_template=wg_t1)
my_gc2 = i3.TECH.IO.FIBCOUP.STRAIGHT.PCELLS.DEFAULT_GRATING_TM

iofb = IoFibcoupGeneric(
    contents=my_mmi,  # the component
    east_trace_templates=[wg_t],  # trace template for East fanout
    west_trace_templates=[wg_t],  # trace_template for West fanout
    east_connect_trace_templates=[wgc_t],  # trace template for wide connections
    west_connect_trace_templates=[wgc_t],  # trace template for wide connections
    east_fiber_couplers=[my_gc, my_gc2],  # fiber couplers East
    west_fiber_couplers=[my_gc],  # fiber couplers West
    east_port_labels=["out1", "out2", "out3", "out5"],  # skipping "out3""
    east_fiber_coupler_external_port_name_maps=[{}, {}, {"vertical_in": "Whooopeeee", "out": "Yuk"}, {}]
    # the line above will map the port names of the fiber coupler on the third port (out3)
    # to Whoopee and Yuk.
)

iofb_layout = iofb.Layout(
    contents_transformation=i3.Rotation(rotation=30.0),  # rotate the contents
    east_connect_transition_lengths=[30.0],  # transition lengths
    east_fiber_coupler_transformations=[
        i3.HMirror(),
        i3.HMirror() + i3.Translation((-30.0, -5.0)),
        i3.HMirror() + i3.Translation((-20.0, 5.0)),
    ],
    east_fiber_coupler_transition_lengths=[
        50.0,
        100.0,
        25.0,
    ],  # transition lengths between connection WG and the fiber coupler
    south_west=(-0.0, 50.0),  # south west corner of the adapter
    south_east=(1200.0, 100.0),  # south east corner of the adapter
    relative_offset=(-100.0, 50.0),  # offset of component from the center.
)

iofb_layout.visualize(annotate=True)
../../../../_images/picazzo3-container-iofibcoup-IoFibcoupGeneric-3.png
"""This example uses IoFibcoupGeneric to route all ports to fiber couplers on the same side."""
from technologies import silicon_photonics  # noqa: F401
from picazzo3.filters.ring import RingRect180DropFilter

my_ring = RingRect180DropFilter()

from picazzo3.container.iofibcoup.cell import IoFibcoupGeneric

iofb = IoFibcoupGeneric(
    contents=my_ring, west_port_labels=["out1", "in1", "out2", "in2"], east_port_labels=[]
)
iofb_layout = iofb.Layout(south_east=(1200.0, 0.0), relative_offset=(0.0, 50.0), west_bundle_traces=False)

iofb_layout.visualize(annotate=True)
../../../../_images/picazzo3-container-iofibcoup-IoFibcoupGeneric-4.png