PlaceComponents

class picazzo3.routing.place_route.cell.PlaceComponents(*args, **kwargs)

Parametric Cell for manual Placement of multiple components.

The user supplies a dictionary of the instances of child cells that need to be placed through the property child_cells. This dictionary maps the instance names to the PCell objects. The same PCell object can be used for multiple instances.

child_cells={ "ring1"  : my_ring1,
              "ring2"  : my_ring2,
              "spl"    : my_splitter,
              "com"    : my_splitter # the same cell is used both for splitting and combining
              }

In the layout, the placement is specified manually using the child_transformations property, which defines a transformation for each instance. If no transformation if supplied for an instance, no transformation will be applied. It is also possible to supply a coordinate (Coord2) or tuple, which will be interpreted as a position for placement.

child_transformations={"arm1": (50, -50),
                       "arm2": (50,50),
                       "com": i3.HMirror(0.0)+i3.Translation((100,0))}

On the netlist level, no connectivity is defined. All the terms of the instances are connected to outside terms. You can override the default external term names using the external_port_names property. There you can specify the individual names of the external terms. If no name is specified, the default pattern of ‘instname_termname’ will be used.

external_port_names={ "spl:in1"  : "input",
                      "com:out1" : "output"
                      }

You can subclass this PCell in order to implement your own additional functionality, or define subcircuits that define their own child cells and child transformations. Warning: do not refer to self.child_cells from within an overridden _default_child_transformations - rather refer to the child cell directly (like self.my_child_cell).

Parameters:

child_cells: optional

dict to create the instances of the child cells. Format is {‘inst_name1’: PCell}

external_port_names: optional

Map of the free instance terms/ports to the names of external terms/ports.Format is a dict {‘inst:term’ : ‘new_term_name’}.If a term/port is not listed, the format instname_portname will be used

cell_instances: _PCellInstanceDict, optional

name: optional

The unique name of the pcell

Views

Layout
Parameters:

child_transformations: optional

dictionary with the transformation of each child instance.

netlist_view: NetlistView, optional

Netlist view in the same cell on which this Layout is based. Normally no need to manually override.

view_name: str, optional

The name of the view

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

""" Here we place 2 splitters and two rings.
    We use the splitter twice but use two different rings.
    """
from technologies import silicon_photonics
from ipkiss3 import all as i3

from picazzo3.filters.ring import RingRect180DropFilter, RingRectNotchFilter
from picazzo3.wg.splitters import WgY90Splitter

from picazzo3.routing.place_route import PlaceComponents

ring1 = RingRectNotchFilter()
ring2 = RingRect180DropFilter()
splitter = WgY90Splitter()

pc = PlaceComponents(child_cells={"spl": splitter,
                                   "com": splitter,
                                   "arm1": ring1,
                                   "arm2": ring2},
                     )

layout = pc.Layout(child_transformations={"arm1": (30, -30),
                                          "arm2": (30, 30),
                                          "com": i3.HMirror(0.0)+i3.Translation((60, 0))}
                   )

layout.visualize()
../../../../_images/picazzo3-routing-place_route-cell-PlaceComponents-1.png