controlpoint module#

class ControlPoint(*, layer, bundle)[source]#

Bases: Positionable, Ref, Generic

Base class for control points. Do not subclass or use this directly, use one of RoutePoint, PairInsertion or PairPoint instead.

Parameters:
class Trace(shapes)[source]#

Bases: object

Computed output shape(s) of a control point. While a RoutePoint would likely have one shape, PairInsertion and PairPoint would have multiple.

Parameters:

shapes (Sequence[Shape])

shapes: Sequence[Shape]#
traces: Sequence[Trace] | None = None#

Traces generated for this control point. Each entry holds the copper shapes belonging to one net (carried as a ComputedNet property on the Trace). This will only be available once the design has been evaluated and captured by the runtime.

layer: int#

The layer on which the control point should be placed.

port: T#

The port associated with this route point used for netting.

class RoutePoint(*, layer, shape=None, bundle=<class 'jitx.net.Port'>)[source]#

Bases: ControlPoint, Generic

Parameters:
shape: Shape | None#

The geometric shape of the control point.

pad: RouteConnectionEndpoint[T]#

The route connection end point associated to this control point, used for routing.

class PairInsertion(*, layer, bundle=<class 'jitx.net.DiffPair'>, invert=False)[source]#

Bases: ControlPoint, Generic

Differential pair insertion point. Transitions two individual, uncoupled traces into a differential pair.

Pair insertion points can also be netted directly with other objects using Net or TopologyNet.

The coupled end of pair insertion can connect to the back side of a pair point, and an inverted insertion can connect to the front side of an pair point. The relationships are reversed if the pair point is inverted. Similarly an insertion point can only connect to an inverted insertion point. The diagram below shows why inverting one of the insertions is necessary.

Note that specifying invert does _not_ imply that insertion point is rotated, to have insertion points face each other, one must be rotated 180 degrees.

The default p and n sides are as shown below: .. code-block:: text

uncoupled.p – – uncoupled.p
/

== coupled == (inverted, rotated 180 degrees)

/

uncoupled.n – – uncoupled.n

This can be mirrored, (which, for example, would be needed to make a geometric connection possible on the other end, where the diff-pair route terminates in a second insertion point) by setting invert=True.

When used with PortAttachment, it needs an ordered pair of ports. The first port is connected to the p side and the second to the n side of the control point. Using PortAttachments for this should not be necessary for the vast majority of cases.

>>> class MyCircuit(Circuit):
...     c1 = MyComponent1()
...     c2 = MyComponent2()
...     def __init__(self):
...         self.insertion1 = PairInsertion(layer=0).at(-2, 0)
...         self.insertion2 = PairInsertion(layer=0, invert=True).at(2, 0, rotate=180)
...         self.nets = [
...             Net([self.c1.p1, self.c2.p1]),
...             Net([self.c1.p2, self.c2.p2]),
...         ]
...         self.attachments = [
...             PortAttachment([self.c1.p1, self.c1.p2], self.insertion1),
...             PortAttachment([self.c2.p1, self.c2.p2], self.insertion2),
...         ]
...         self.routes = [
...             Route(self.insertion1.coupled, self.insertion2.coupled, 0)
...         ]
Parameters:
port: T#

The differential pair port associated to this control point, used for connections.

coupled: CoupledRouteConnectionEndpoint[T]#

Coupled-side pads of the differential insertion point, used for connections and routing.

uncoupled: UncoupledConnectionEndpoint[T]#

Uncoupled-side pads of the differential insertion point, used for connections and routing.

invert: bool#

Mirror the chirality of the insertion point.

class PairPoint(*, layer, bundle=<class 'jitx.net.DiffPair'>, invert=False)[source]#

Bases: ControlPoint, Generic

A differential pair control point connects two segments of a differential pair, while still paired, allowing for each segment to be configured independently.

A pair point can connect to another to other pairs, or insertion points. A chain of pair points would connect front -> back, as long as neither or both are inverted. To connect an inverted to non-inverted point you’d connect front to front or back to back. See the diagram in PairInsertion for details.

Parameters:
port: T#

The differential pair port associated to this control point, used for connections.

front: CoupledRouteConnectionEndpoint[T]#

Front-side pads of the differential insertion point, used for routing.

back: CoupledRouteConnectionEndpoint[T]#

Back-side pads of the differential insertion point, used for routing.

invert: bool#

Mirror the chirality of the pair point.