lava.proc.spiker

lava.proc.spiker.models

Inheritance diagram of lava.proc.spiker.models
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

Inheritance diagram of lava.proc.spiker.process
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.

  • 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.