lava.magma.runtime.runtime_services.channel_broker

lava.magma.runtime.runtime_services.channel_broker.channel_broker

digraph inheritance0e65620d70 { bgcolor=transparent; rankdir=TB; size=""; "ABC" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Helper class that provides a standard way to create an ABC using"]; "AbstractCPort" [URL="../lava/lava.magma.runtime.runtime_services.channel_broker.html#lava.magma.runtime.runtime_services.channel_broker.channel_broker.AbstractCPort",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"]; "AbstractChannelBroker" [URL="../lava/lava.magma.runtime.runtime_services.channel_broker.html#lava.magma.runtime.runtime_services.channel_broker.channel_broker.AbstractChannelBroker",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="Abstract ChannelBroker."]; "ABC" -> "AbstractChannelBroker" [arrowsize=0.5,style="setlinewidth(0.5)"]; "CInPort" [URL="../lava/lava.magma.runtime.runtime_services.channel_broker.html#lava.magma.runtime.runtime_services.channel_broker.channel_broker.CInPort",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"]; "COutPort" [URL="../lava/lava.magma.runtime.runtime_services.channel_broker.html#lava.magma.runtime.runtime_services.channel_broker.channel_broker.COutPort",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"]; "Channel" [URL="../lava/lava.magma.runtime.runtime_services.channel_broker.html#lava.magma.runtime.runtime_services.channel_broker.channel_broker.Channel",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"]; "ChannelBroker" [URL="../lava/lava.magma.runtime.runtime_services.channel_broker.html#lava.magma.runtime.runtime_services.channel_broker.channel_broker.ChannelBroker",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="ChannelBroker for NxSdkRuntimeService."]; "AbstractChannelBroker" -> "ChannelBroker" [arrowsize=0.5,style="setlinewidth(0.5)"]; "EmbeddedSnip" [URL="../lava/lava.magma.runtime.runtime_services.channel_broker.html#lava.magma.runtime.runtime_services.channel_broker.channel_broker.EmbeddedSnip",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"]; "NxBoard" [URL="../lava/lava.magma.runtime.runtime_services.channel_broker.html#lava.magma.runtime.runtime_services.channel_broker.channel_broker.NxBoard",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"]; "Phase" [URL="../lava/lava.magma.runtime.runtime_services.channel_broker.html#lava.magma.runtime.runtime_services.channel_broker.channel_broker.Phase",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"]; }
class lava.magma.runtime.runtime_services.channel_broker.channel_broker.AbstractCPort

Bases: object

class lava.magma.runtime.runtime_services.channel_broker.channel_broker.AbstractChannelBroker(*args, **kwargs)

Bases: ABC

Abstract ChannelBroker.

class lava.magma.runtime.runtime_services.channel_broker.channel_broker.CInPort

Bases: object

class lava.magma.runtime.runtime_services.channel_broker.channel_broker.COutPort

Bases: object

class lava.magma.runtime.runtime_services.channel_broker.channel_broker.Channel

Bases: object

class lava.magma.runtime.runtime_services.channel_broker.channel_broker.ChannelBroker(board, compile_config=None, *args, **kwargs)

Bases: AbstractChannelBroker

ChannelBroker for NxSdkRuntimeService.

ChannelBroker handles communication between NxSdkRuntimeService, Lava Processes and a Loihi board. It uses the NxCore board object and creates GRPC Channels for each port. The ChannelBroker sends messages over the GRPC channels and services requests by the NxSdkRuntimeService. The NxSdkRuntimeService intercepts CPort and NcPort messages from the Runtime and brokers the communication between runtime and Loihi Boards.

create_channel(input_channel, port_idx, c_port, snip, c_builder_idx)
Return type:

List[Channel]

join()
poll_c_inports()

Retrieves request from processes and brokers communication between Cproc Models in Python and Cproc Models in C. After sending requests to the GRPC channel the process is informed about completion.

poll_c_outports()
run()

Start the polling threads

class lava.magma.runtime.runtime_services.channel_broker.channel_broker.EmbeddedSnip

Bases: object

class lava.magma.runtime.runtime_services.channel_broker.channel_broker.NxBoard

Bases: object

class lava.magma.runtime.runtime_services.channel_broker.channel_broker.Phase

Bases: object

lava.magma.runtime.runtime_services.channel_broker.channel_broker.generate_channel_name(prefix, port_idx, csp_port, c_builder_idx)
Return type:

str