CP

class ipkiss3.all.CP

Description of where a route should pass through.

Parameters:
xy: Sequence, Symbol

XY-coordinate through which the route should go. X or Y can be None to describe a line.

direction: DIRECTION, Optional

Direction at which the route goes through the control point.

relative_to: str or Symbol, or tuple of str or float, Optional

Reference to an instance, port, symbol or a coordinate, relative to which this control point is defined. This cannot be combined with a symbolic xy. Can also be a tuple, then the first element is used for relative x position and the second for relative y position. See Symbols for more information.

Examples

import si_fab.all as pdk
import ipkiss3.all as i3
import matplotlib.pyplot as plt

fc = pdk.FC_TE_1550()
control_points = [i3.CP((20, 50), i3.EAST), i3.CP((50, 10), i3.SOUTH)]
circuit = i3.Circuit(
    insts={"fc_in": fc, "fc_out": fc},
    specs=[
        i3.Place("fc_in:out", position=(0, 0)),
        i3.Place("fc_out:out", position=(100, 50)),
        i3.FlipH("fc_out"),
        i3.ConnectManhattan(
            "fc_in:out",
            "fc_out:out",
            control_points=control_points,
        ),
    ],
)
circuit.Layout().visualize(show=False)
plt.arrow(20, 50, 5, 0, width=2.0)
plt.arrow(50, 10, 0, -5, width=2.0)
plt.scatter([cp[0] for cp in control_points], [cp[1] for cp in control_points], c="C1", s=80, marker="x")
plt.show()
../../../../_images/ipkiss3-all-CP-1.png
import si_fab.all as pdk
import ipkiss3.all as i3
import matplotlib.pyplot as plt

gc = pdk.FC_TE_1550()
circuit = i3.Circuit(
    insts={"gc1": gc, "gc2": gc},
    specs=[
        i3.Place("gc1", position=(-100, 0)),
        i3.Place("gc2", position=(100, 0), angle=180),
        i3.ConnectManhattan(
            "gc1:out",
            "gc2:out",
            control_points=[i3.CP((-50, None)), i3.CP((None, 50))],
        ),
    ],
)

lay = circuit.Layout()
lay.visualize(show=False)

plt.axvline(x=-50, color="k", linestyle="--")
plt.axhline(y=50, color="k", linestyle="--")
plt.show()
../../../../_images/ipkiss3-all-CP-2.png
classmethod H(y)

The H control point is a special case of CP, in the sense that H(y) == CP((None, y))

classmethod V(x)

The V control point is a special case of CP, in the sense that V(x) == CP((x, None))