runtime module#
- class Runtime(*, uri=None, project=None, client=None)[source]#
Bases:
object- Overloads:
- Parameters:
- active = <jitx.run.runtime.Runtime.__Active object>#
- async capture[T: RuntimeDesign](design, *, name=None, wait=5.0)[source]#
Capture the runtime’s physical layout back into the design.
- async issues(design, *, categories=None, satisfied=False, wait=5.0)[source]#
Query the physical-design issues of a submitted design.
- Parameters:
design (
RuntimeDesign) – The submitted design.categories (
Iterable[IssueCategory|int] |None) – Categories to report; all if None.satisfied (
bool) – Also report groups whose checks passed.wait (
float) – Seconds to wait for background tasks to finish before the snapshot is taken, like capture does. Categories still in progress when the wait ends are reported as pending. 0 answers immediately.
- Return type:
- class SyncRuntime(runtime)[source]#
Bases:
object- Parameters:
runtime (Runtime)
- capture[T: RuntimeDesign](design, *, name=None, wait=5.0)[source]#
- issues(design, *, categories=None, satisfied=False, wait=5.0)[source]#
Query the physical-design issues of a submitted design. See
Runtime.issues().- Return type:
- Parameters:
design (RuntimeDesign)
categories (Iterable[IssueCategory | int] | None)
satisfied (bool)
wait (float)
- class RuntimeDesign[T: Design](state, name)[source]#
Bases:
Generic[T]A design that has been submitted to the runtime.
rootis the instantiated design object. The rest of this class gives access to what the runtime knows about it: usequery()to walk the design tree,netsfor connectivity, andlayersto resolve layer indices and board sides through placements.- Parameters:
state (_DesignState[
T])name (str)
- property root: T#
The design as last captured. A capture replaces it with a new object; one held on to keeps its captured state.
- property name#
The name the runtime knows this design by, either the
namepassed toRuntime.submit()or the fully qualified name of the design object.
- query[Q](target, /, *, through=None, transform=Transform((0, 0), 0, (1, 1)), opaque=None, refs=False, filter=None)[source]#
Convenience method to query this design. See
query()for details.
- property layers#
Layer index and board side arithmetic for this design’s stackup, as a
Layersobject.
- class Net[N: Port](nets)[source]#
Bases:
Generic[N]A single net of a captured design.
netsholds theNetandTopologyNetobjects that are connected, andnameis their connected name.- Parameters:
nets (Sequence[Net[
N] | TopologyNet[N]])
- class Nets(uf)[source]#
Bases:
objectA manager for looking up the net that an element belongs to.
- Parameters:
uf (UnionFind[Net | TopologyNet])
- class Layers(stackup)[source]#
Bases:
objectA manager for layer index and board side arithmetic.
- Parameters:
stackup (Stackup)
- normalize(layer)[source]#
Return a 0-indexed
layercounted from the top conductor.- Parameters:
layer (
int) – The layer index to normalize (supports negative indexing).- Returns:
A normalized 0-indexed integer.
- apply(transform, layer)[source]#
Return the conductor index, counted from the top, that an element on
layerends up on oncetransformis applied.
- side(transform, feature)[source]#
Return the board side a
SurfaceFeatureends up on with a transform applied.- Parameters:
transform (
Transform|Placement) – The Transform or Placement to apply.feature (
SurfaceFeature) – The SurfaceFeature to transform.
- Return type:
- Returns:
The resulting
Side.
- class AsyncRuntimeDesign[T: Design](state, name, runtime)[source]#
Bases:
RuntimeDesign[T],Generic[T]- property layout: AsyncLayout#
The physical design (layout) of this design in the runtime: requests that change it, e.g.
await design.layout.place(...), andmonitorfor callbacks on its changes. Changes are applied torootas the runtime reports them.
- async capture(*, wait=5.0)[source]#
Capture the runtime’s physical layout back into this design. See
Runtime.capture().- Parameters:
wait (float)
- async issues(*, categories=None, satisfied=False, wait=5.0)[source]#
Query the physical-design issues of this design. See
Runtime.issues().- Return type:
- Parameters:
categories (Iterable[IssueCategory | int] | None)
satisfied (bool)
wait (float)
- property configuration: AsyncConfiguration#
requests that change settings applied on its next load, e.g.
await design.configuration.reassign_reference_designators(...).- Type:
The configuration of this design in the runtime
- class SyncRuntimeDesign[T: Design](state, name, runtime, runasync)[source]#
Bases:
RuntimeDesign[T],Generic[T]- property layout: SyncLayout#
The physical design (layout) of this design in the runtime: requests that change it, e.g.
design.layout.place(...), andmonitorfor callbacks on its changes. Changes are applied torootas the runtime reports them.
- capture(*, wait=5.0)[source]#
Capture the runtime’s physical layout back into this design. See
Runtime.capture().- Parameters:
wait (float)
- issues(*, categories=None, satisfied=False, wait=5.0)[source]#
Query the physical-design issues of this design. See
Runtime.issues().- Return type:
- Parameters:
categories (Iterable[IssueCategory | int] | None)
satisfied (bool)
wait (float)
- property configuration: SyncConfiguration#
requests that change settings applied on its next load, e.g.
design.configuration.reassign_reference_designators(...).- Type:
The configuration of this design in the runtime