CARLsim  5.0.0
CARLsim: a GPU-accelerated SNN simulator
PeriodicSpikeGenerator Class Reference

a periodic SpikeGenerator (constant ISI) creating spikes at a certain rate More...

#include <periodic_spikegen.h>

Inheritance diagram for PeriodicSpikeGenerator:
SpikeGenerator

Public Member Functions

 PeriodicSpikeGenerator (float rate, bool spikeAtZero=true)
 PeriodicSpikeGenerator constructor. More...
 
 ~PeriodicSpikeGenerator ()
 PeriodicSpikeGenerator destructor. More...
 
int nextSpikeTime (CARLsim *sim, int grpId, int nid, int currentTime, int lastScheduledSpikeTime, int endOfTimeSlice)
 schedules the next spike time More...
 
- Public Member Functions inherited from SpikeGenerator
virtual ~SpikeGenerator ()
 

Detailed Description

This class implements a period SpikeGenerator that schedules spikes with a constant inter-spike-interval. For example, a PeriodicSpikeGenerator with rate=10Hz will schedule spikes for each neuron in the group at t=100, t=200, t=300, etc. If spikeAtZero is set to true, then the first spike will be scheduled at t=0.

Definition at line 62 of file periodic_spikegen.h.

Constructor & Destructor Documentation

◆ PeriodicSpikeGenerator()

PeriodicSpikeGenerator ( float  rate,
bool  spikeAtZero = true 
)
Parameters
[in]ratethe firing rate (Hz) at which to schedule spikes
[in]spikeAtZeroa boolean flag to indicate whether to insert the first spike at t=0

Definition at line 57 of file periodic_spikegen.cpp.

◆ ~PeriodicSpikeGenerator()

Definition at line 72 of file periodic_spikegen.h.

Member Function Documentation

◆ nextSpikeTime()

int nextSpikeTime ( CARLsim sim,
int  grpId,
int  nid,
int  currentTime,
int  lastScheduledSpikeTime,
int  endOfTimeSlice 
)
virtual

This function schedules the next spike time, given the currentTime and the lastScheduledSpikeTime. It implements the virtual function of the base class.

Parameters
[in]simpointer to a CARLsim object
[in]grpIdcurrent group ID for which to schedule spikes
[in]nidcurrent neuron ID for which to schedule spikes
[in]currentTimecurrent time (ms) at which spike scheduler is called
[in]lastScheduledSpikeTimethe last time (ms) at which a spike was scheduled for this nid, grpId
Returns
the next spike time (ms)

Implements SpikeGenerator.

Definition at line 66 of file periodic_spikegen.cpp.


The documentation for this class was generated from the following files: