design module#

Design definition#

This module provides the Design class, which is the root of a JITX design.

class Design[source]#

Bases: Structural

To create a JITX design, create a subclass of this class. It will need a Board, a Substrate, and a Circuit assigned to the fields board, substrate, and circuit respectively.

Schematic settings can optionally be provided by adding fields of type Paper, SchematicTemplate, SchematicMarking, and SchematicTitlePage. By default, the design uses the ANSI A paper size.

>>> class MyDesign(Design):
...     board = MyBoard()
...     substrate = MySubstrate()
...     circuit = MyCircuit()
...     paper = Paper.ANSI_B
board: Board#
substrate: Substrate#
circuit: Circuit#
class Initialized(design)[source]#

Bases: Event

Event that is fired once the entire design has been gone through the initial construction and initialization. The design has not yet been dispatched for processing, and can still be modified if needed.

>>> class MyComponent(Component):
        @Design.Initialized.on
        def on_initialized(self, init: Design.Initialized):
            ... # do something after initialization
Parameters:

design (Design)

design: Design#

The initialized design.

setup = <function Design.setup>#
finalize = <function Design.finalize>#
class DesignContext(design)[source]#

Bases: Context

Context object representing the currently active design. Should not be used directly, but rather accessed through jitx.current’s design instead.

>>> def design_elements() -> tuple[Board, Substrate, Circuit]:
...    design = jitx.current.design
...    return (design.board, design.substrate, design.circuit)
Parameters:

design (Design)

design: Design#