# IoFibcoup¶

IoFibcoup is a Block Adapter that packages a component in a standard block for use in an i3.IoColumn. For this, the East and West component ports are first transitioned to a (single-mode) waveguide that is then used for a Fanout to the level of the individual fiber couplers. The connection to the fiber coupler is then made with a straight waveguide, for which a broad waveguide template can be used to minimize losses.

These different sections are illustrated in the figure below.

• The Contents section takes the component defined by the user through the PCell property contents. The component can be transformed using the Layout property contents_transformation and can be displaced from the center using an (x,y) offset. The reference for the offset is the x-center of the column, at the y-coordinate of south_west. By default, the offset is calculated to x-center the component ports and y-align the first West port to the south_west.
• The Fanout section will first transition the waveguide templates of the contents’s ports to a waveguide template that the user can specify in trace_template. By default, the standard template in TECH.PCELLS.WG.DEFAULT is used. It is advised to use a single-mode waveguide, as the fanout will introduce bends. If trace_template is explicitly set to None, no transition is applied and the waveguide templates of the ports are used. The Fanout itself seperates the wavegudies to the level of the fiber coupler ports. Usually these are positioned at fixed spacings, but this is not strictly necessary. When bundle_traces is set to True, a cover layer will be added at the fanout, which will reduce chances of sharp-angle DRC errors.
• The Connect section will route the waveguides to the fiber couplers. This can be done with a separate trace template, specified through connect_trace_template. By default, this is the same as the Fanout trace template, but for long connections it is advised to use a wider, lower-loss waveguide.
• The Fiber coupler section will place the fiber couplers and connect the waveguides. Most fiber couplers only have a single port and therefore there will be only one waveguide per fiber coupler. However, with multi-port fiber couplers (e.g. 2D couplers), less fiber couplers will be placed, enough to accomodate all the ports of the contents.

Some of the more commonly used parameters for IoFibcoup are illustrated in the figure below.

The normal behavior for IoFibcoup is to route all East-facing ports to the East fiber couplers, and all West facing ports to the West fiber couplers. East facing ports are identified as ports with an angle between -45 and +45 degrees, after the contents_transformation has been applied. Similarly, West ports should have an angle between 135 and 225 degrees. If a component has no East ports or West ports, no connection waveguides will be created on that side.

However, it is possible to manually specify the ports that need to be connected, using the east_port_labels and west_port_labels property of the PCell. That way, it is even possible to route a West port to the East (although such auto-routings might not always be very reliable).

There are 3 flavors of IoFibcoup, that offer increasingly detailed levels of control to the designer:

• IoFibcoup is the simplest one, using the same grating coupler for all ports, and uniform settings for routing the ports.
• IoFibcoupEastWest offers the possibility to differentiate the East and West settings, so you can for instance use a different grating coupler on both sides. The parameters of IoFibcoupEastWest are the same as those of IoFibcoup, but with an additional prefix east or west. E.g. fanout_length becomes east_fanout_length and west_fanout_length.
• IoFibcoupGeneric allows you to customize every individual grating coupler, its transformation, and the trace template for the routes used to connect the component to the grating. The parameters are again similar as IoFibcoupEastWest, but now organized as a list, and plural. east_fanout_length thus becomes east_fanout_lengths.

As an adapter, IoFibcoup can be used in a column. The following code adds the ring to a column using an IoFibcoup, rotates it 10 degrees and adjusts the fanout length and the bend radius in the fanout.

from technologies import silicon_photonics
from ipkiss3 import all as i3
from picazzo3.filters.ring import RingRect180DropFilter
from picazzo3.container.iofibcoup import IoFibcoup

my_column = i3.IoColumn(name="my_column",

 IoFibcoupGeneric generic adapter for grating fiber couplers. IoFibcoupEastWest Adapter for grating fiber couplers East and West. IoFibcoup Adapter for grating fiber couplers.