Bundles

class ipkiss3.all.TraceBundle

A base class for bundles of traces

Bundles can be used to implement a bus, a set of waveguides which are routed together over the chip, and so forth.

The traces can be different in nature (e.g. template)

Parameters:
traces: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’>

the traces in this bundle

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

Bundle of traces layout with a shape covering all of the traces, on a given set of cover layers

The traces can be different in nature (e.g. having different trace templates). The cover layer takes into account the facets and total width of each trace

Each trace can be given a transformation, using the trace_transformations property.

Parameters:
area_layer_on: ( bool, bool_ or int )

When True, the entire bundle area will be covered by all the cover layers.

trace_transformations: list and List with type restriction, allowed types: <class ‘ipkiss.geometry.transform.Transform’>

transformations to be applied to each of the traces

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

# create a trace bundle from 5 traces with differening trace templates
from ipkiss3.ipkiss2_all import Layer
from ipkiss3.pcell.trace.bundle import TraceBundle
from ipkiss3.ipkiss2_all import Translation
from ipkiss3.pcell.trace.window.window import PathTraceWindow
from ipkiss3.pcell.trace.window_trace import TemplatedWindowTrace, WindowTraceTemplate

# Example 1: create a trace bundle from 5 traces with differening trace templates

# Windows

trace_widths = [
    0.5,
    1.0,
    2.0,
    3.0,
    4.0,
]  # we'll use this to generate a trace template for each of the 5 traces
trace_shape = [(0.0, 0.0), (20.0, 5.0)]  # all traces will have the same shape
trace_positions = [0.0, 5.0, 10.0, 15.0, 20.0]  # but their position will be different

traces = []  # list of traces we'll pass to the TraceBundle
trace_transformations = []

for w, p in zip(trace_widths, trace_positions):  # loop over all trace parameters
    # create a template for this trace based on windows
    windows = [
        PathTraceWindow(layer=Layer(0), start_offset=-0.5 * w, end_offset=0.5 * w),
        PathTraceWindow(layer=Layer(1), start_offset=-0.25 * w, end_offset=0.25 * w),
    ]

    trace_t = WindowTraceTemplate()
    trace_t.Layout(windows=windows)
    # create the trace itself
    trace = TemplatedWindowTrace(template=trace_t)
    trace.Layout(shape=trace_shape)
    # add it to our list of traces
    traces.append(trace)
    trace_transformations.append(Translation(translation=(0.0, p)))

# create a TraceBundle and visualize its layout
bundle = TraceBundle(traces=traces)
bundle_layout = bundle.Layout(trace_transformations=trace_transformations, cover_layers=[Layer(2)])
bundle_layout.visualize(annotate=True)
../../../_images/bundle-1.png
class ipkiss3.all.TemplatedTraceBundle

Base class for bundles of traces with given (potentially different) trace templates.

Parameters:
trace_templates: list

templates to use for each of the traces

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:
traces: List with type restriction, allowed types: <class ‘ipkiss3.pcell.cell.pcell.PCell’>, locked

the traces in this bundle

Views

class Layout

Bundle of traces layout, auto-generates the traces based on the given trace templatse and a given list of shapes (one for each trace).

The traces are covered by a shape drawn on a set of cover layers, take into account the facets and total width of each trace.

Each trace can be given a transformation, using the trace_transformations property.

Parameters:
shapes: list and List with type restriction, allowed types: <class ‘ipkiss.geometry.shape.Shape’>

shapes of the traces

area_layer_on: ( bool, bool_ or int )

When True, the entire bundle area will be covered by all the cover layers.

trace_transformations: list and List with type restriction, allowed types: <class ‘ipkiss.geometry.transform.Transform’>

transformations to be applied to each of the traces

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

# create a trace bundle from 5 traces using the same trace template and shape
# using TemplatedTraceBundle
from ipkiss3.ipkiss2_all import Layer, Shape
from ipkiss3.pcell.trace.bundle import TemplatedTraceBundle
from ipkiss3.ipkiss2_all import Translation
from ipkiss3.pcell.trace.window.window import PathTraceWindow
from ipkiss3.pcell.trace.window_trace import WindowTraceTemplate

trace_shape = Shape([(0.0, 0.0), (20.0, 5.0)])  # all traces will have the same shape
trace_positions = [0.0, 5.0, 10.0, 15.0, 20.0]  # but their position will be different

# create a template based on windows
windows = [
    PathTraceWindow(layer=Layer(0), start_offset=-0.5, end_offset=0.5),
    PathTraceWindow(layer=Layer(1), start_offset=-0.25, end_offset=0.25),
]
trace_t = WindowTraceTemplate()
trace_t.Layout(windows=windows)

# calculate the translation for each trace
trace_transformations = [Translation(translation=(0.0, p)) for p in trace_positions]

# create a TemplatedTraceBundle and visualize its layout
bundle = TemplatedTraceBundle(trace_templates=[trace_t for p in trace_positions])
bundle_layout = bundle.Layout(
    trace_transformations=trace_transformations,
    shapes=[trace_shape for p in trace_positions],
    cover_layers=[Layer(2)],
)
bundle_layout.visualize(annotate=True)
../../../_images/bundle-2.png
# create a trace bundle from 5 traces with differing trace templates,
# using TemplatedTraceBundle
# we'll also use different shapes for each trace

from ipkiss3.ipkiss2_all import Layer, Shape, angle_deg, Translation
from ipkiss3.pcell.trace.bundle import TemplatedTraceBundle
from ipkiss3.pcell.trace.window.window import PathTraceWindow
from ipkiss3.pcell.trace.window_trace import WindowTraceTemplate

trace_shape = Shape([(0.0, 0.0), (20.0, 5.0)])  # shape of the first trace
trace_widths = [0.5, 1.0, 2.0, 3.0, 4.0]
trace_positions = [0.0, 5.0, 10.0, 15.0, 20.0]
trace_extensions = [0.0, 5.0, 10.0, 15.0, 20.0]
trace_templates = []  # list of trace templates we'll pass to TemplatedTraceBundle
trace_transformations = []
trace_shapes = []  # list of shapes

trace_angle = angle_deg(trace_shape[1], trace_shape[0])

for w, p, e in zip(trace_widths, trace_positions, trace_extensions):  # loop over all trace parameters
    # create a template for this trace based on windows
    windows = [
        PathTraceWindow(layer=Layer(0), start_offset=-0.5 * w, end_offset=0.5 * w),
        PathTraceWindow(layer=Layer(1), start_offset=-0.25 * w, end_offset=0.25 * w),
    ]

    trace_t = WindowTraceTemplate()
    trace_t.Layout(windows=windows)
    # add it to our list of trace templates
    trace_templates.append(trace_t)
    trace_transformations.append(Translation(translation=(0.0, p)))
    # create the shape for this trace and add it to our list
    shape = Shape([trace_shape[0], trace_shape[1].move_polar_copy(e, trace_angle)])  # make it 5.0um longer
    trace_shapes.append(shape)

# create a TemplatedTraceBundle and visualize its layout
bundle = TemplatedTraceBundle(trace_templates=trace_templates)
bundle_layout = bundle.Layout(
    trace_transformations=trace_transformations, shapes=trace_shapes, cover_layers=[Layer(2)]
)
bundle_layout.visualize(annotate=True)
../../../_images/bundle-3.png