# Bundles¶

class ipkiss3.all.TraceBundle(*args, **kwargs)

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: , required the traces in this bundle cell_instances: _PCellInstanceDict, optional name: optional The unique name of the pcell

Views

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: optional When True, the entire bundle area will be covered by all the cover layers. trace_transformations: list and List with type restriction, allowed types: , optional transformations to be applied to each of the traces view_name: str, optional The name of the view cover_layers: List with type restriction, allowed types: , optional layers that can be used to generate additional coverage of the trace (e.g. manhattan corners) grids_per_unit: locked Number of grid cells per design unit units_per_grid: locked Ratio of grid cell and design unit grid: float and number > 0, locked design grid. Extracted by default from TECH.METRICS.GRID unit: float and number > 0, locked design unit. Extracted by default from TECH.METRICS.UNIT

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_layout_t = trace_t.Layout(windows=windows)
# create the trace itself
trace = TemplatedWindowTrace(template=trace_t)
trace_layout = 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()

class ipkiss3.all.TemplatedTraceBundle(*args, **kwargs)

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

Parameters: trace_templates: list, optional templates to use for each of the traces cell_instances: _PCellInstanceDict, optional name: optional The unique name of the pcell traces: List with type restriction, allowed types: , locked the traces in this bundle

Views

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: , optional shapes of the traces view_name: str, optional The name of the view area_layer_on: optional When True, the entire bundle area will be covered by all the cover layers. trace_transformations: list and List with type restriction, allowed types: , optional transformations to be applied to each of the traces cover_layers: List with type restriction, allowed types: , optional layers that can be used to generate additional coverage of the trace (e.g. manhattan corners) grids_per_unit: locked Number of grid cells per design unit units_per_grid: locked Ratio of grid cell and design unit grid: float and number > 0, locked design grid. Extracted by default from TECH.METRICS.GRID unit: float and number > 0, locked design unit. Extracted by default from TECH.METRICS.UNIT

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 TemplatedWindowTrace, 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_layout_t = 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()

# 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 TemplatedWindowTrace, 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_layout_t = 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()