HALDLS
haldls::vx::BackgroundSpikeSource Class Reference

Background spike source on chip. More...

#include <background.h>

Classes

struct  Mask
 NeuronLabel bit randomization mask. More...
 
struct  Period
 Inter-spike interval for regular and inter-bin interval for Poisson spike generation. More...
 
struct  Rate
 Rate of spike output in the Poisson spike generation mode, without effect in regular mode. More...
 
struct  Seed
 Random seed for random number generation. More...
 

Public Types

typedef halco::hicann_dls::vx::BackgroundSpikeSourceOnDLS coordinate_type
 
typedef std::true_type is_leaf_node
 

Public Member Functions

 BackgroundSpikeSource () SYMBOL_VISIBLE
 Default constructor. More...
 
template<typename WordT >
void decode (std::array< WordT, config_size_in_words > const &data) SYMBOL_VISIBLE
 
template<typename WordT >
std::array< WordT, config_size_in_wordsencode () const SYMBOL_VISIBLE
 
bool get_enable () const SYMBOL_VISIBLE
 Get enable value. More...
 
bool get_enable_random () const SYMBOL_VISIBLE
 Get enable random spike train generation. More...
 
Mask get_mask () const SYMBOL_VISIBLE
 Get neuron label randomization mask. More...
 
halco::hicann_dls::vx::NeuronLabel get_neuron_label () const SYMBOL_VISIBLE
 Get neuron label used for emitted spikes. More...
 
Period get_period () const SYMBOL_VISIBLE
 Get period value. More...
 
Rate get_rate () const SYMBOL_VISIBLE
 Get Poisson spike generation rate factor. More...
 
Seed get_seed () const SYMBOL_VISIBLE
 Get random seed value. More...
 
bool operator!= (BackgroundSpikeSource const &other) const SYMBOL_VISIBLE
 
bool operator== (BackgroundSpikeSource const &other) const SYMBOL_VISIBLE
 
void set_enable (bool value) SYMBOL_VISIBLE
 Set enable value. More...
 
void set_enable_random (bool value) SYMBOL_VISIBLE
 Set enable random spike train generation. More...
 
void set_mask (Mask const &value) SYMBOL_VISIBLE
 Set neuron label randomization mask. More...
 
void set_neuron_label (halco::hicann_dls::vx::NeuronLabel const &value) SYMBOL_VISIBLE
 Set neuron label used for emitted spikes. More...
 
void set_period (Period const &value) SYMBOL_VISIBLE
 Set period value. More...
 
void set_rate (Rate const &value) SYMBOL_VISIBLE
 Set Poisson spike generation rate factor. More...
 
void set_seed (Seed const &value) SYMBOL_VISIBLE
 Set random seed value. More...
 

Static Public Member Functions

template<typename AddressT >
static std::array< AddressT, config_size_in_wordsaddresses (coordinate_type const &neuron) SYMBOL_VISIBLE
 

Static Public Attributes

static constexpr size_t config_size_in_words = 3
 
constexpr static auto unsupported_read_targets
 

Friends

class cereal::access
 
std::ostream & operator<< (std::ostream &os, BackgroundSpikeSource const &config) SYMBOL_VISIBLE
 

Detailed Description

Background spike source on chip.

Two modes are supported, either regular spiking or binned Poisson spike-train generation. While with the former the emitted NeuronLabel is configurable and stays fixed, with the latter, the lower eight bits of the emitted NeuronLabel can bit-wise be replaced by randomly generated values.

Definition at line 35 of file background.h.

Member Typedef Documentation

◆ coordinate_type

typedef halco::hicann_dls::vx::BackgroundSpikeSourceOnDLS haldls::vx::BackgroundSpikeSource::coordinate_type

Definition at line 38 of file background.h.

◆ is_leaf_node

Definition at line 39 of file background.h.

Constructor & Destructor Documentation

◆ BackgroundSpikeSource()

haldls::vx::BackgroundSpikeSource::BackgroundSpikeSource ( )

Default constructor.

Member Function Documentation

◆ addresses()

template<typename AddressT >
static std::array<AddressT, config_size_in_words> haldls::vx::BackgroundSpikeSource::addresses ( coordinate_type const &  neuron)
static

◆ decode()

template<typename WordT >
void haldls::vx::BackgroundSpikeSource::decode ( std::array< WordT, config_size_in_words > const &  data)

◆ encode()

template<typename WordT >
std::array<WordT, config_size_in_words> haldls::vx::BackgroundSpikeSource::encode ( ) const

◆ get_enable()

bool haldls::vx::BackgroundSpikeSource::get_enable ( ) const

Get enable value.

On change of disabled -> enabled the random seed is copied to the random number generator and the period is initialized with the full period which is decremented on every clock cycle. The first spike or bin is therefore reached with a full period delay after the enable change.

Returns
Boolean value

◆ get_enable_random()

bool haldls::vx::BackgroundSpikeSource::get_enable_random ( ) const

Get enable random spike train generation.

On true, every period a bin evaluation in a binned Poisson generator is performed. In addition the enabled mask bits are randomized on spike ocurrence. On false, every period a spike is emitted leading to a regular spike-train.

Returns
Boolean value

◆ get_mask()

Mask haldls::vx::BackgroundSpikeSource::get_mask ( ) const

Get neuron label randomization mask.

The value has no effect on regular spike generation.

Returns
Mask

◆ get_neuron_label()

halco::hicann_dls::vx::NeuronLabel haldls::vx::BackgroundSpikeSource::get_neuron_label ( ) const

Get neuron label used for emitted spikes.

On Poisson spike generation, it serves as a base of which the lower eight bits can bit-wise be replaced by random values using the mask.

Returns
NeuronLabel

◆ get_period()

Period haldls::vx::BackgroundSpikeSource::get_period ( ) const

Get period value.

It represents the ISI for regular spiking and the bin interval for Poisson spike generation.

Returns
Period

◆ get_rate()

Rate haldls::vx::BackgroundSpikeSource::get_rate ( ) const

Get Poisson spike generation rate factor.

The mean ISI is divided by (rate / 255). The value has no effect on regular spike generation.

Returns
Rate

◆ get_seed()

Seed haldls::vx::BackgroundSpikeSource::get_seed ( ) const

Get random seed value.

The value has no effect on regular spike generation.

Returns
Seed

◆ operator!=()

bool haldls::vx::BackgroundSpikeSource::operator!= ( BackgroundSpikeSource const &  other) const

◆ operator==()

bool haldls::vx::BackgroundSpikeSource::operator== ( BackgroundSpikeSource const &  other) const

◆ set_enable()

void haldls::vx::BackgroundSpikeSource::set_enable ( bool  value)

Set enable value.

On change of disabled -> enabled the random seed is copied to the random number generator and the period is initialized with the full period which is decremented on every clock cycle. The first spike or bin is therefore reached with a full period delay after the enable change.

Parameters
valueBoolean value

◆ set_enable_random()

void haldls::vx::BackgroundSpikeSource::set_enable_random ( bool  value)

Set enable random spike train generation.

On true, every period a bin evaluation in a binned Poisson generator is performed. In addition the enabled mask bits are randomized on spike ocurrence. On false, every period a spike is emitted leading to a regular spike-train.

Parameters
valueBoolean value

◆ set_mask()

void haldls::vx::BackgroundSpikeSource::set_mask ( Mask const &  value)

Set neuron label randomization mask.

The value has no effect on regular spike generation.

Parameters
valueMask

◆ set_neuron_label()

void haldls::vx::BackgroundSpikeSource::set_neuron_label ( halco::hicann_dls::vx::NeuronLabel const &  value)

Set neuron label used for emitted spikes.

On Poisson spike generation, it serves as a base of which the lower eight bits can bit-wise be replaced by random values using the mask.

Parameters
valueNeuronLabel

◆ set_period()

void haldls::vx::BackgroundSpikeSource::set_period ( Period const &  value)

Set period value.

It represents the ISI for regular spiking and the bin interval for Poisson spike generation.

Parameters
valuePeriod

◆ set_rate()

void haldls::vx::BackgroundSpikeSource::set_rate ( Rate const &  value)

Set Poisson spike generation rate factor.

The mean ISI is divided by (rate / 255). The value has no effect on regular spike generation.

Parameters
valueRate

◆ set_seed()

void haldls::vx::BackgroundSpikeSource::set_seed ( Seed const &  value)

Set random seed value.

The value has no effect on regular spike generation.

Parameters
valueSeed

Friends And Related Function Documentation

◆ cereal::access

friend class cereal::access
friend

Definition at line 244 of file background.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
BackgroundSpikeSource const &  config 
)
friend

Member Data Documentation

◆ config_size_in_words

constexpr size_t haldls::vx::BackgroundSpikeSource::config_size_in_words = 3
staticconstexpr

Definition at line 229 of file background.h.

◆ unsupported_read_targets

constexpr static auto haldls::vx::BackgroundSpikeSource::unsupported_read_targets
staticconstexpr
Initial value:
= {
hxcomm::vx::Target::hardware, hxcomm::vx::Target::simulation}

Definition at line 41 of file background.h.


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