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.all.ElectricalWire(*args, **kwargs)

A basic electrical trace ( wire )

Parameters:

trace_template: PCell and ElectricalWireTemplate

external_port_names:

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

name:

The unique name of the pcell

Other Parameters:
 

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, ElectricalWire
>>> etpl = ElectricalWireTemplate('my_ewire_tpl')
>>> wire = ElectricalWire(name="my_ewire", trace_template=etpl)
>>> layout = wire.Layout(shape=[(0, 0), (0, 50), (50, 50)])
>>> layout.visualize(annotate=True)

Views

Layout
Parameters:

control_shape_layer: __Layer__

layer on which the control shape is drawn

draw_control_shape: ( bool, bool_, bool or int )

draws the control shape on top of the waveguide

flatten_contents: ( bool, bool_, bool or int )

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

view_name: str and ( Alphanumeric string or Contains _$ )

The name of the view

trace_template_for_ports: _TraceTemplate.Layout

Trace template to be used for the ports.

shape: Shape

Shape from which the Trace is calculated

contents_transformation: GenericNoDistortTransform

Other Parameters:
 

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(annotate=True)
../../../_images/index-14.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-22.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-31.png
Netlist
Parameters:

trace_template_for_terms: _TraceTemplate.Netlist

Trace template to be used for the terms.

view_name: str and ( Alphanumeric string or Contains _$ )

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.all.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:

name:

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:

layer: __Layer__

view_name: str and ( Alphanumeric string or Contains _$ )

The name of the view

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

width: float and number > 0

Width of the electrical trace

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

control_shape_layer: __Layer__

layer on which the control shape is drawn

draw_control_shape: ( bool, bool_, bool or int )

draws the control shape on top of the waveguide

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(annotate=True)
../../../_images/index-4.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-5.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-6.png
Netlist
Parameters:

trace_template_for_terms: _TraceTemplate.Netlist

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

view_name: str and ( Alphanumeric string or Contains _$ )

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.