Anchor
- class ipkiss3.all.Anchor
An anchor is a virtual element in a cell. It is exposed, which means you can use it in a
i3.place_and_route
call or in ani3.Circuit
, to refer to its specific position.Note
Anchors are only supported on Layout.
- Parameters:
- name: str and String that contains only ISO/IEC 8859-1 (extended ASCII py3) or pure ASCII (py2) characters, required
The name of the anchor. Cannot have a cardinal like name: N, NE, EN, E, SE, ES, S, SW, WS, W, NW, WN, C, CE, EC, CW, WC, CS, SC, CN, NC
- position: Coord2, optional
Anchor’s position. Default is (0, 0)
Examples
import si_fab.all as pdk # noqa: F401 from picazzo3.fibcoup.curved import FiberCouplerCurvedGrating from ipkiss3 import all as i3 # Defining the pcells class RoutingBox(i3.PCell): class Layout(i3.LayoutView): def generate(self, layout): layout += i3.Anchor(position=(0, 100), name="top_anchor") layout += i3.Anchor(position=(200, 0), name="right_anchor") layout += i3.Anchor(position=(-200, 0), name="left_anchor") layout += i3.Box(i3.Layer(0), (0, 0), (400, 200)) return layout gr = FiberCouplerCurvedGrating() circuit = i3.Circuit( insts={"box": RoutingBox(), "grb1": gr, "grb2": gr}, specs=[ i3.Place("grb1:out", position=(-20, 0), relative_to="box@left_anchor"), i3.Place("box", position=(1000, 1000)), i3.Place("grb2:out", position=(20, 0), angle=180, relative_to="box@right_anchor"), i3.ConnectManhattan( "grb1:out", "grb2:out", control_points=[i3.H(20, "box@top_anchor")], ), ], ) circuit_layout = circuit.Layout() circuit_layout.visualize()