lava.proc.spiker

lava.proc.spiker.models

digraph inheritance0a9ff33da6 { 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"]; "AbstractProcessModel" [URL="../lava.magma.core.model.html#lava.magma.core.model.model.AbstractProcessModel",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="Represents a model that implements the behavior of a Process."]; "ABC" -> "AbstractProcessModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "AbstractPyProcessModel" [URL="../lava.magma.core.model.py.html#lava.magma.core.model.py.model.AbstractPyProcessModel",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 interface for Python ProcessModels."]; "AbstractProcessModel" -> "AbstractPyProcessModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ABC" -> "AbstractPyProcessModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "PyLoihiProcessModel" [URL="../lava.magma.core.model.py.html#lava.magma.core.model.py.model.PyLoihiProcessModel",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="ProcessModel to simulate a Process on Loihi using CPU."]; "AbstractPyProcessModel" -> "PyLoihiProcessModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SpikerModel" [URL="../lava/lava.proc.spiker.html#lava.proc.spiker.models.SpikerModel",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="CPU model for the Spiker process."]; "PyLoihiProcessModel" -> "SpikerModel" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
class lava.proc.spiker.models.SpikerModel(proc_params=None)

Bases: PyLoihiProcessModel

CPU model for the Spiker process.

The process sends messages at the specified rate with a specified payload.

counter: ndarray = LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'int'>, precision=32)
implements_process

alias of Spiker

implements_protocol

alias of LoihiProtocol

payload: ndarray = LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'int'>, precision=32)
rate: ndarray = LavaPyType(cls=<class 'numpy.ndarray'>, d_type=<class 'int'>, precision=32)
required_resources: ty.List[ty.Type[AbstractResource]] = [<class 'lava.magma.core.resources.CPU'>]
run_spk()

Execute spiking phase, send a payload at the pre-determined rate.

s_out: PyOutPort = LavaPyType(cls=<class 'lava.magma.core.model.py.ports.PyOutPortVectorDense'>, d_type=<class 'int'>, precision=None)

lava.proc.spiker.process

digraph inheritancea5ca69e137 { bgcolor=transparent; rankdir=TB; size=""; "AbstractProcess" [URL="../lava.magma.core.process.html#lava.magma.core.process.process.AbstractProcess",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="The notion of a Process is inspired by the Communicating Sequential"]; "Spiker" [URL="../lava/lava.proc.spiker.html#lava.proc.spiker.process.Spiker",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="Process emitting a specified payload at a given rate."]; "AbstractProcess" -> "Spiker" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Spiker32bit" [URL="../lava/lava.proc.spiker.html#lava.proc.spiker.process.Spiker32bit",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="Process emitting a specified payload at a given rate."]; "AbstractProcess" -> "Spiker32bit" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
class lava.proc.spiker.process.Spiker(*, shape=(1,), period=10, payload=1, name=None, log_config=None)

Bases: AbstractProcess

Process emitting a specified payload at a given rate.

Parameters:
  • shape (tuple(int)) – Shape of the population of process units.

  • period (int) – Number of timesteps between subsequent emissions of payload. Note that the first spike is emitted at time step period + 1.

  • payload (int) – A value to be send with every output message.

  • name (str) – Name of the Process. Default is ‘Process_ID’, where ID is an integer value that is determined automatically.

  • log_config (LogConfig) – Configuration options for logging.

class lava.proc.spiker.process.Spiker32bit(*, shape=(1,), period=1, payload=1, name=None, log_config=None)

Bases: AbstractProcess

Process emitting a specified payload at a given rate. Provides 32bit payloads, and separate payloads for each neuron. Other than the default Spiker process, this process actually starts spiking at timestep = period.

Parameters:
  • shape (tuple(int)) – Shape of the population of process units.

  • period (int) – Number of timesteps between subsequent emissions of payload.

  • payload (int) – A value to be send with every output message. Can be in [0, 2**32 - 1] if signed==False, or in [-2**31, 2**31 - 1] if signed==True.

  • signed (bool) – True if signed payload, False otherwise.

  • name (str) – Name of the Process. Default is ‘Process_ID’, where ID is an integer value that is determined automatically.

  • log_config (LogConfig) – Configuration options for logging.