elasticai.creator.vhdl.auto_wire_protocols.autowiring#

Module Contents#

Classes#

DataFlowNode

WiringProtocol

A wiring protocol specifies how we search for sources that need to be connected to dsts. We understand the neural network as a DAG. The direction “down” refers to the direction of the dataflow during inference. A “dst” refers to an “in” signal in vhdl and a source refers to an “out” signal. Each field of the class holds a dictionary specifying compatible source names for dsts. For “up_dsts” we search in ancestor nodes for satisfying sources and for “down_dsts” we search in successor nodes.

AutoWirer

Please note that this implementation performs the wiring solely based on names. Hence, it will not check whether signals are compatible based on their width or data type. It only supports a sequence of nodes as the input graph. Handling nodes with more than one child requires deciding how data paths are split and merged.

Data#

API#

class elasticai.creator.vhdl.auto_wire_protocols.autowiring.DataFlowNode[source]#
dsts: tuple[str, ...]#

None

sources: tuple[str, ...]#

None

name: str#

None

classmethod top(name: str) elasticai.creator.vhdl.auto_wire_protocols.autowiring.DataFlowNode[source]#
classmethod buffered(name: str) elasticai.creator.vhdl.auto_wire_protocols.autowiring.DataFlowNode[source]#
classmethod unbuffered(name: str) elasticai.creator.vhdl.auto_wire_protocols.autowiring.DataFlowNode[source]#
class elasticai.creator.vhdl.auto_wire_protocols.autowiring.WiringProtocol[source]#

A wiring protocol specifies how we search for sources that need to be connected to dsts. We understand the neural network as a DAG. The direction “down” refers to the direction of the dataflow during inference. A “dst” refers to an “in” signal in vhdl and a source refers to an “out” signal. Each field of the class holds a dictionary specifying compatible source names for dsts. For “up_dsts” we search in ancestor nodes for satisfying sources and for “down_dsts” we search in successor nodes.

up_dsts: dict[str, tuple[str, ...]]#

None

down_dsts: dict[str, tuple[str, ...]]#

None

elasticai.creator.vhdl.auto_wire_protocols.autowiring.BASIC_WIRING#

‘WiringProtocol(…)’

exception elasticai.creator.vhdl.auto_wire_protocols.autowiring.AutoWiringProtocolViolation[source]#

Bases: Exception

elasticai.creator.vhdl.auto_wire_protocols.autowiring.T#

‘TypeVar(…)’

class elasticai.creator.vhdl.auto_wire_protocols.autowiring.AutoWirer[source]#

Please note that this implementation performs the wiring solely based on names. Hence, it will not check whether signals are compatible based on their width or data type. It only supports a sequence of nodes as the input graph. Handling nodes with more than one child requires deciding how data paths are split and merged.

Initialization

connections() dict[tuple[str, str], tuple[str, str]][source]#
wire(top: elasticai.creator.vhdl.auto_wire_protocols.autowiring.DataFlowNode, graph: collections.abc.Iterable[elasticai.creator.vhdl.auto_wire_protocols.autowiring.DataFlowNode])[source]#