Optical waveguides and waveguide templates

In IPKISS, optical waveguides are based on two concepts: the waveguide template, and the waveguide itself. The waveguide template defines all the aspects of the waveguide that can be extracted from its cross section:

  • how the waveguide is drawn along the shape of the waveguide, i.e. the geometrical cross section;

  • the simulation model, e.g. the effective index of the waveguide.

The waveguide is then drawn based on the following properties:

  • the path of the waveguide (through the shape property);

  • how the bending is performed.

For a detailed guide, please check the waveguide guide.

WindowWaveguideTemplate

Most waveguides can be built using windows. A window is a cross-section in a gdsii layer. By defining several windows the cross section of the waveguide can be defined.

class ipkiss3.all.WindowWaveguideTemplate

Template PCell for an Optical Waveguide Trace based on TraceWindows.

Parameters:
name: String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters

The unique name of the pcell

Views

class Layout
Parameters:
windows: List with type restriction, allowed types: <class ‘ipkiss3.pcell.trace.window.window._TraceWindow’>

List of Trace Windows that know how to draw themselves relative to the shape of the Trace

core_width: float and number > 0

width of the waveguide core

core_layer: __Layer__

layer used to define the core of the waveguide

pin_shape: Shape

shape to be used for the pins

trace_template_for_ports: _TraceTemplate.Layout

Trace template to be used for the ports. Default = this template

width: float and Real, number and number >= 0
control_shape_layer: __Layer__

layer on which the control shape is drawn

draw_control_shape: ( bool, bool_ or int )

draws the control shape on top of the waveguide

cover_layers: List with type restriction, allowed types: <class ‘ipkiss.primitives.layer.Layer’>

layers that can be used to generate additional coverage of the trace (e.g. manhattan corners)

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

Examples

import si_fab.all as pdk  # noqa: F401
import ipkiss3.all as i3

class MyWgTemplate(i3.WindowWaveguideTemplate):
    class Layout(i3.WindowWaveguideTemplate.Layout):
        core_width = i3.PositiveNumberProperty(doc="Core width of the waveguide")
        cladding_width = i3.PositiveNumberProperty(doc="Cladding width of the waveguide")

        def _default_core_width(self):
            return 0.45

        def _default_cladding_width(self):
            return 4.0

        def _default_cover_layers(self):
            # Layer for Manhattan rectangles
            # (drawn in waveguide bends when the waveguide manhattan parameter = True)
            return []

        def _default_windows(self):
            return [
                i3.PathTraceWindow(
                    layer=i3.TECH.PPLAYER.SI,
                    start_offset=-0.5 * self.core_width,
                    end_offset=+0.5 * self.core_width,
                ),
                i3.PathTraceWindow(
                    layer=i3.TECH.PPLAYER.SI_CLADDING,
                    start_offset=-0.5 * self.cladding_width,
                    end_offset=+0.5 * self.cladding_width,
                ),
            ]

# Instantiate the new waveguide template to use it in our waveguide below
wg_tmpl = MyWgTemplate()

wg = i3.RoundedWaveguide(trace_template=wg_tmpl)
wg_lay = wg.Layout(shape=[(0, 0), (10, 0), (10, 10)])

wg_lay.visualize(annotate=True)
../../../../_images/index-11.png
.

# for now disabled: .. autoattribute:: Netlist

TraceTemplate

Simple trace template for drawing waveguides.

class ipkiss3.all.TraceTemplate

Template for a Basic Trace on a chip.

Parameters:
name: String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters

The unique name of the pcell

Views

class Layout
Parameters:
layer: __Layer__
control_shape_layer: __Layer__

layer on which the control shape is drawn

draw_control_shape: ( bool, bool_ or int )

draws the control shape on top of the waveguide

width: float and Real, number and number >= 0
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

Waveguide

A Waveguide is the most basic optical route.

class ipkiss3.all.Waveguide
Parameters:
trace_template: PCell and _WaveguideTemplate
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:
contents: PCell and _Trace, locked

Views

class Layout
Parameters:
core_layer: __Layer__

layer used to define the core of the waveguide

input_port: TracePort
trace_template_for_ports: _TraceTemplate.Layout

Trace template to be used for the ports.

shape: Shape

Shape from which the Trace is calculated

cover_layers: List with type restriction, allowed types: <class ‘ipkiss.primitives.layer.Layer’>

layers that can be used to generate additional coverage of the trace (e.g. manhattan corners)

control_shape_layer: __Layer__

layer on which the control shape is drawn

output_port: TracePort
draw_control_shape: ( bool, bool_ or int )

draws the control shape on top of the waveguide

contents_transformation: GenericNoDistortTransform

transformation to apply to the contents

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

Other Parameters:
center_line_shape: locked

Automatically calculated shape of the center line of the trace

RoundedWaveguide

A RoundedWaveguide rounds the waveguide according to a preset rounding_algorithm.

class ipkiss3.all.RoundedWaveguide
Parameters:
trace_template: PCell and _WaveguideTemplate
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:
contents: PCell and _Trace, locked

Views

class Layout
Parameters:
output_port: TracePort
trace_template_for_ports: _TraceTemplate.Layout

Trace template to be used for the ports.

shape: Shape

Shape from which the Trace is calculated

cover_layers: List with type restriction, allowed types: <class ‘ipkiss.primitives.layer.Layer’>

layers that can be used to generate additional coverage of the trace (e.g. manhattan corners)

reverse_individual_bends: list<( bool, bool_ or int )>

When set to True, it will generate the individual bends backwards. This has only effect when the bend algorithm is not symmetric. Should have length equal to the shape for closed shapes, but equal to shape-2 for open shapes.

rounding_algorithms:

Rounding algorithm for every individual bend. Can be circular, spline, … Should have length equal to the shape for closed shapes, but equal to shape-2 for open shapes.

bend_radii: list<number > 0>

Bend radius for every individual bend.

reverse_bends: ( bool, bool_ or int )

When set to True, it will generate the bends backwards. This has only effect when the bend algorithm is not symmetric.

remove_straight_angles: ( bool, bool_ or int )

Removes the waypoints with straight angles. Set to False if the algorithm uses waypoint-specific information.

core_layer: __Layer__

layer used to define the core of the waveguide

input_port: TracePort
control_shape_layer: __Layer__

layer on which the control shape is drawn

draw_control_shape: ( bool, bool_ or int )

draws the control shape on top of the waveguide

contents_transformation: GenericNoDistortTransform

transformation to apply to the contents

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

Automatically calculated shape of the center line of the trace

TaperedWaveguide

A TaperedWaveguide automatically tapers between two waveguide templates: one which is defined for the straight sections (straight_trace_template), and one which is defined for the start, end and bend sections (trace_template).

class ipkiss3.all.TaperedWaveguide

A Rounded Waveguide that tapers to another template (straight_trace_template) in straight sections

Parameters:
fixed_bend90: ( PCell ), *None allowed*

PCell used for the 90 degree bends in the route. The angle should be a 90 degree bend and have exactly two optical ports. The trace template of the bend should match trace_template. Bends are assumed to be bi-directional in the routing.

straight_trace_template: PCell and _TraceTemplate

template for the straight sections.

trace_template: PCell and _TraceTemplate

template for the start, end and bend sections.

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:
contents: PCell and _Trace, locked

Examples

"""A TaperedWaveguide automatically transitions (=tapers) between different waveguide types."""
import si_fab.all as pdk  # noqa: F401

import ipkiss3.all as i3
from picazzo3.traces.rib_wg import RibWaveguideTemplate

rib_tmpl = RibWaveguideTemplate()
rib_tmpl.Layout(core_width=0.6)
rib_tmpl_wide = RibWaveguideTemplate()
rib_tmpl_wide.Layout(core_width=1.6)

twg = i3.TaperedWaveguide(trace_template=rib_tmpl, straight_trace_template=rib_tmpl_wide)
lay = twg.Layout(shape=[(0, 0), (30, 0), (30, 60)])
lay.visualize(annotate=True)
../../../../_images/index-21.png
"""TaperedWaveguide exposes the same properties as RoundedWaveguide."""

import si_fab.all as pdk  # noqa: F401

import ipkiss3.all as i3
from picazzo3.traces.rib_wg import RibWaveguideTemplate

rib_tmpl = RibWaveguideTemplate()
rib_tmpl.Layout(core_width=0.6)
rib_tmpl_wide = RibWaveguideTemplate()
rib_tmpl_wide.Layout(core_width=1.6)

twg = i3.TaperedWaveguide(trace_template=rib_tmpl, straight_trace_template=rib_tmpl_wide)
lay = twg.Layout(
    shape=[(0, 0), (50, 0), (75, 50)],
    bend_radius=30,
    # we choose a large angle_step to show how it impacts the discretisation
    angle_step=20,
)
lay.visualize(annotate=True)
../../../../_images/index-31.png

Views

class Layout
Parameters:
taper_lengths: list<number >= 0>

Lengths of the tapers for each section. Length of list must be identical to number of segments.

straight_section_positions: list<fraction>

A list of relative positions for the straight_template sections of each path segment. Length of list must be identical to number of segments.Each position is a number between 0 (closest to first waypoint) and 1 (closest to last waypoint).0.5 will place the expanded section in the middle of the segment.

straight_section_lengths: list<number >= 0>

A list of lengths for the straight_template sections of each path segment.Length of list must be identical to number of segments

flatten_waveguides: ( bool, bool_ or int )

If true, all waveguides will be flattened one level to reduce hierarchy

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

length of the taper between the regular waveguide and the expanded waveguide. Ignored if taper_lengths is set. If None, the default taper lengths for each transition are chosen for each transition.

draw_control_shape: ( bool, bool_ or int )

draws the control shape on top of the waveguide

contents_transformation: GenericNoDistortTransform

transformation to apply to the contents

flatten_contents: ( bool, bool_ or int )

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

output_port: TracePort
trace_template_for_ports: _TraceTemplate.Layout

Trace template to be used for the ports.

shape: Shape

Shape from which the Trace is calculated

cover_layers: List with type restriction, allowed types: <class ‘ipkiss.primitives.layer.Layer’>

layers that can be used to generate additional coverage of the trace (e.g. manhattan corners)

reverse_individual_bends: list<( bool, bool_ or int )>

When set to True, it will generate the individual bends backwards. This has only effect when the bend algorithm is not symmetric. Should have length equal to the shape for closed shapes, but equal to shape-2 for open shapes.

rounding_algorithms:

Rounding algorithm for every individual bend. Can be circular, spline, … Should have length equal to the shape for closed shapes, but equal to shape-2 for open shapes.

bend_radii: list<number > 0>

Bend radius for every individual bend.

reverse_bends: ( bool, bool_ or int )

When set to True, it will generate the bends backwards. This has only effect when the bend algorithm is not symmetric.

remove_straight_angles: ( ( bool, bool_ or int ) ), *None allowed*

Remove waypoints with straight angles. When set to None, it will only remove straight angles when all the expansion parameters are calculated automatically

core_layer: __Layer__

layer used to define the core of the waveguide

input_port: TracePort
min_straight: float and Real, number and number >= 0

The minimum length of any straight sections in the route

control_shape_layer: __Layer__

layer on which the control shape is drawn

min_straight_section_length: float and Real, number and number >= 0

minimum_length of the straight sections.

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

start_straight: float and Real, number and number >= 0

The length of the straight start section of the route

end_straight: float and Real, number and number >= 0

The length of the straight end section of the route

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: *None allowed*

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:
min_length_for_taper: float and Real, number and number >= 0, locked

minimum length needed to use tapering

center_line_shape: locked

Automatically calculated shape of the center line of the trace

TaperedWaveguideTemplate

Trace template used to create TaperedWaveguides.

class ipkiss3.all.TaperedWaveguideTemplate
Parameters:
straight_trace_template: PCell and _TraceTemplate, required

template for the straight sections.

trace_template: PCell and _TraceTemplate, required

template for the start, end and bend sections.

name: String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters

The unique name of the pcell

Views

class Layout
Parameters:
flatten_waveguides: ( bool, bool_ or int )

If true, all waveguides will be flattened one level to reduce hierarchy

min_straight_section_length: float and number > 0

minimum_length of the straight template section.

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

length of the taper between the regular waveguide and the expanded waveguide. If None, the default taper lengths for each transition are chosen for each transition.

manhattan: ( bool, bool_ or int )

Adds rectangular blocks in the bends to avoid as much as possible non-manhattan angles.

core_width: float and number > 0

width of the waveguide core

pin_shape: Shape

shape to be used for the pins

trace_template_for_ports: _TraceTemplate.Layout

Trace template to be used for the ports. Default = this template

flatten_contents: ( bool, bool_ or int )

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

reverse_bends: ( bool, bool_ or int )

When set to True, it will generate the bends backwards. This has only effect when the bend algorithm is not symmetric.

remove_straight_angles: ( bool, bool_ or int )

removes the waypoints with straight angles. Set to False if the algorithm uses waypoint-specific information.

core_layer: __Layer__

layer used to define the core of the waveguide

keep_original_trace_template: ( bool, bool_ or int )
width: float and Real, number and number >= 0
control_shape_layer: __Layer__

layer on which the control shape is drawn

draw_control_shape: ( bool, bool_ or int )

draws the control shape on top of the waveguide

cover_layers: List with type restriction, allowed types: <class ‘ipkiss.primitives.layer.Layer’>

layers that can be used to generate additional coverage of the trace (e.g. manhattan corners)

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

start_straight: float and Real, number and number >= 0

The length of the straight start section of the route

end_straight: float and Real, number and number >= 0

The length of the straight end section of the route

min_straight: float and Real, number and number >= 0

The minimum length of any straight sections in the route

angle_step: float and number > 0

Angle step for rounding.

rounding_algorithm: *None allowed*

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:
min_length_for_taper: float and Real, number and number >= 0, locked

minimum length needed to use tapering

Using maximum bend radius

It is possible to calculate the maximum bend radius that can be used for each turn in a given shape. This can then be used with RoundedWaveguide to obtain a waveguide which uses the maximum possible radius in each bend.

maximum_bend_radii

Calculate the maximum bend radius for each turn to be made along a control shape