colored-CARL-Logo

 


CARLsim Documentation:
Class SpikeGenerator

Spike generation can be performed using spike generators. Spike generators are dummy-neurons that have their spikes specified externally either defined by a Poisson firing rate or via a spike injection mechanism. Spike generators can have post-synaptic connections with STDP and STP, but unlike Izhikevich neurons, they do not receive any pre-synaptic input. For more information on spike generators see Section Neuron groups: Spike generators in the Tutorial.

For fine-grained control over spike generation, individual spike times can be specified per neuron in each group. This is accomplished using a callback mechanism, which is called at each time step, to specify whether a neuron has fired or not.
In order to specify spike times, a new class is defined that derives from the SpikeGenerator class:

class MySpikes: public SpikeGenerator { ...

The user must then define a nextSpikeTime method.

^SpikeGenerator::nextSpikeTime
CARLsim ≥ 2.0

virtual unsigned int nextSpikeTime(CpuSNN* s, int grpId, int nid,
                                   unsigned int currentTime)

Input arguments:

CpuSNN* s: pointer to a CpuSNN object
int grpId: neuron group ID for which the spike generator is called
int nid: neuron ID for which the spike generator is called
unsigned int currentTime: current time stamp

Output arguments:

unsigned int: the next time at which neuron nid of group grpId shall spike

Caution:
The virtual method should never be called directly.

 
 
 

 

CARLsim

Carl