Electrical Components

Electrical wires & components are an important piece of designs. While IPKISS doesn’t replace existing electronics design tools we provide basic functionality to place electrical wires on your design in order to integrate photonics and electrical components effectively.

ElectricalWire

The behavior of ElectricalWire is very similar to that of Waveguide.

class ipkiss3.pcell.wiring.ElectricalWire(*args, **kwargs)

A basic electrical trace ( wire )

Parameters:

trace_template: PCell and ElectricalWireTemplate, optional

external_port_names: optional

Dictionary for remapping of the port names of the contents to the external ports

cell_instances: _PCellInstanceDict, optional

name: optional

The unique name of the pcell

contents: PCell and _Trace, locked

Notes

This is a very basic version of an electrical wire, variations exist to suit your more advanced needs

Examples

>>> from technologies import silicon_photonics
>>> from ipkiss3.pcell.wiring import ElectricalWireTemplate
>>> etpl = ElectricalWireTemplate('my_ewire_tpl')
>>> wire = ElectricalWire(name="my_ewire", trace_template=etpl)
>>> layout = wire.Layout(shape=[(0, 0), (50, 50)])
>>> layout.visualize()

Views

Layout
Parameters:

contents_transformation: GenericNoDistortTransform, optional

grids_per_unit: optional

Number of grid cells per design unit

shape: Shape, optional

Shape from which the Trace is calculated

units_per_grid: optional

Ratio of grid cell and design unit

view_name: str, optional

The name of the view

trace_template_for_ports: _TraceTemplate.Layout, optional

Trace template to be used for the ports.

control_shape_layer: __Layer__, optional

layer on which the control shape is drawn

draw_control_shape: optional

draws the control shape on top of the waveguide

flatten_contents: optional

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

grid: float and number > 0, optional

design grid. Extracted by default from TECH.METRICS.GRID

unit: float and number > 0, optional

design unit. Extracted by default from TECH.METRICS.UNIT

center_line_shape: locked

Automatically calculated shape of the center line of the trace

Examples

from technologies import silicon_photonics
from ipkiss3.pcell.wiring import ElectricalWireTemplate, ElectricalWire
etpl = ElectricalWireTemplate('my_ewire_tpl')
wire = ElectricalWire(name="my_ewire", trace_template=etpl)
layout = wire.Layout(shape=[(0, 0), (50, 50)])
layout.visualize()
../../../_images/index-11.png
""" Often you'll just want to use the default ElectricalWireTemplate
specified in the TECH file"""
from technologies import silicon_photonics
import ipkiss3.all as i3
from ipkiss3.pcell.wiring import ElectricalWire
wire = ElectricalWire(name="my_thin_ewire",
                      trace_template=i3.TECH.PCELLS.METAL.DEFAULT)
layout = wire.Layout(shape=[(0, 0), (50, 50)])
layout.visualize()
../../../_images/index-21.png
""" Using the electrical wire template you can easily change the
default width of your waveguide"""
from technologies import silicon_photonics
from ipkiss3.pcell.wiring import ElectricalWireTemplate, ElectricalWire
etpl = ElectricalWireTemplate('my_thin_ewire_tpl')
etpl_layout = etpl.Layout(width=2.0)
wire = ElectricalWire(name="my_thin_ewire", trace_template=etpl)
layout = wire.Layout(shape=[(0, 0), (50, 50)])
layout.visualize()
../../../_images/index-31.png
Netlist
Parameters:

trace_template_for_terms: _TraceTemplate.Netlist, optional

Trace template to be used for the terms.

view_name: str, optional

The name of the view

Examples

"""Netlists of an electrical wire are most of the time very simple.
Though it's important to remark that all terms will be connected to 1 net"""

from technologies import silicon_photonics
from ipkiss3.pcell.wiring import ElectricalWire, ElectricalTerm

wire = ElectricalWire(name="my_wire_withnetlist")
netlist = wire.Netlist()

nets = netlist.nets

# The electrical wire only contains 1 net
assert len(nets) == 1

# And this nets contains all the given terms
assert nets[0].terms == netlist.terms.values()

# Let's print the terms
print netlist.terms

ElectricalWindowWireTemplate

As with waveguides you can create new templates for your electrical wires. This way you can build more custom & specialized wires.

class ipkiss3.pcell.wiring.ElectricalWindowWireTemplate(*args, **kwargs)

An advanced trace template that is used to define electrical wires using ‘windows’. These windows will be extruded extruded along the shape of the wire

Parameters:

cell_instances: _PCellInstanceDict, optional

name: optional

The unique name of the pcell

See also

ElectricalWireTemplate, ElectricalWire

Notes

This trace template is only useful in more advanced usecases. When you want to create simple wires, ElectricalWireTemplate should be sufficient.

Views

Layout
Parameters:

grids_per_unit: optional

Number of grid cells per design unit

units_per_grid: optional

Ratio of grid cell and design unit

view_name: str, optional

The name of the view

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

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

width: float and number > 0, optional

Width of the electrical trace

layer: __Layer__, optional

pin_shape: Shape, optional

shape to be used for the pins

trace_template_for_ports: _TraceTemplate.Layout, optional

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

control_shape_layer: __Layer__, optional

layer on which the control shape is drawn

draw_control_shape: optional

draws the control shape on top of the waveguide

grid: float and number > 0, optional

design grid. Extracted by default from TECH.METRICS.GRID

unit: float and number > 0, optional

design unit. Extracted by default from TECH.METRICS.UNIT

Examples

import technologies.silicon_photonics
from ipkiss3.pcell.wiring import ElectricalWindowWireTemplate, ElectricalWire

etpl = ElectricalWindowWireTemplate()
etpl.Layout()
wire = ElectricalWire(name="my_wire_with_windows", trace_template=etpl)
layout = wire.Layout(shape=[(0.0, 0.0), (30.0, 0.0), (30.0, 20.0), (15.0, 30.)])
layout.visualize()
../../../_images/index-4.png
""" A toy example that uses PeriodicReferenceTraceWindow """
import technologies.silicon_photonics
from ipkiss3.pcell.wiring import ElectricalWindowWireTemplate, ElectricalWire
from ipkiss3.pcell.trace.window.reference_window import PeriodicReferenceTraceWindow
from ipkiss.process import PPLayer
import ipkiss3.all as i3

TECH = i3.TECH

metal_layer = PPLayer(process=i3.TECH.METAL.DEFAULT_PROCESS,
                      purpose=i3.TECH.PURPOSE.DF.LINE)

class MyCell(i3.PCell):
    class Layout(i3.LayoutView):
        def _generate_elements(self, elems):
            elems += i3.Rectangle(layer=metal_layer,
                                  box_size=(2.0, 2.0))
            return elems

my_layout = MyCell().Layout()

etpl = ElectricalWindowWireTemplate()

windows = [PeriodicReferenceTraceWindow(reference=my_layout, pitch=3.0)]

etpl.Layout(windows=windows)

wire = ElectricalWire(name="my_crazy_ewire", trace_template=etpl)
layout = wire.Layout(shape=[(0.0, 0.0), (30.0, 0.0), (30.0, 20.0), (15.0, 30.)])
layout.visualize()
../../../_images/index-5.png
""" Windows provide you the possiblity to create more
advanced wires"""
from technologies import silicon_photonics
import ipkiss3.all as i3
from ipkiss3.pcell.wiring import ElectricalWindowWireTemplate, ElectricalWire
from ipkiss3.pcell.trace.window.window import PathTraceWindow
from ipkiss.process import PPLayer

etpl = ElectricalWindowWireTemplate()

metal_layer = PPLayer(process=i3.TECH.METAL.DEFAULT_PROCESS,
                      purpose=i3.TECH.PURPOSE.DF.LINE)

windows = [PathTraceWindow(layer=metal_layer,
                           start_offset=-1,
                           end_offset=0)]

etpl.Layout(draw_control_shape=True,
            windows=windows)

wire = ElectricalWire(name="my_wire_with_windows2", trace_template=etpl)
layout = wire.Layout(shape=[(0.0, 0.0), (30.0, 0.0), (30.0, 20.0), (15.0, 30.)])
layout.visualize()
../../../_images/index-6.png
Netlist
Parameters:

trace_template_for_terms: _TraceTemplate.Netlist, optional

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

view_name: str, optional

The name of the view

Electrical Vias

Vias are components that connect a metal layer with another one that is above or below it using via shapes. Those shapes are also used in the electrical ports in the via. IPKISS only contains base classes for vias should you want to make your own.

ElectricalVia Class for common electrical vias.
GenericElectricalVia Most generic class for electrical vias.