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.

>>> class MyDesign(Design):
...     board = MyBoard()
...     substrate = MySubstrate()
...     circuit = MyCircuit()
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#
name(design)[source]#

Get the fully qualified name of a design.

Parameters:

design (Design) – The design instance.

Return type:

str

Returns:

The fully qualified name, or just the class name if from __main__.