lava.lib.dnf.connect

lava.lib.dnf.connect.connect

lava.lib.dnf.connect.connect.connect(src_op, dst_ip, ops=None, connection_class=None)

Creates and returns a Connections Process <conn> and connects the source OutPort <src_op> to the InPort of <conn> and the OutPort of <conn> to the InPort of <dst_ip>.

The connectivity is generated from a list of operation objects <ops>. Each operation generates a dense connectivity matrix based on its parameters. These matrices are multiplied into a single connectivity matrix, which is then used to generate a Connections Process between source and destination.

Parameters:
  • src_op (OutPort) – OutPort of the source Process that will be connected

  • dst_ip (InPort) – InPort of the destination Process that will be connected

  • ops (list(AbstractOperation), optional) – list of operations that describes how the connection between <src_op> and <dst_ip> will be created

  • connection_class (type(Sparse) or type(Dense), optional) – Class of the process used between src_op and dst_ip. If connection_class is None the connection process will be defined automatically (currently a Sparse Process is used in that case).

Returns:

connections – Process containing the connections between <src_op> and <dst_ip>

Return type:

Sparse or Dense Process

lava.lib.dnf.connect.exceptions

digraph inheritance200c9e04cb { bgcolor=transparent; rankdir=TB; size=""; "MisconfiguredConnectError" [URL="../lava-lib-dnf/lava.lib.dnf.connect.html#lava.lib.dnf.connect.exceptions.MisconfiguredConnectError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Exception that is raised when the connection function is misconfigured"]; }
exception lava.lib.dnf.connect.exceptions.MisconfiguredConnectError(msg=None)

Bases: Exception

Exception that is raised when the connection function is misconfigured with a wrong combination of operations.

Parameters:

msgstr (optional)

custom exception message that overwrites the default