HALDLS
|
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_words > | encode () 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_words > | addresses (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 |
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.
typedef halco::hicann_dls::vx::BackgroundSpikeSourceOnDLS haldls::vx::BackgroundSpikeSource::coordinate_type |
Definition at line 38 of file background.h.
typedef std::true_type haldls::vx::BackgroundSpikeSource::is_leaf_node |
Definition at line 39 of file background.h.
haldls::vx::BackgroundSpikeSource::BackgroundSpikeSource | ( | ) |
Default constructor.
|
static |
void haldls::vx::BackgroundSpikeSource::decode | ( | std::array< WordT, config_size_in_words > const & | data | ) |
std::array<WordT, config_size_in_words> haldls::vx::BackgroundSpikeSource::encode | ( | ) | const |
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.
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.
Mask haldls::vx::BackgroundSpikeSource::get_mask | ( | ) | const |
Get neuron label randomization mask.
The value has no effect on regular spike generation.
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.
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.
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.
Seed haldls::vx::BackgroundSpikeSource::get_seed | ( | ) | const |
bool haldls::vx::BackgroundSpikeSource::operator!= | ( | BackgroundSpikeSource const & | other | ) | const |
bool haldls::vx::BackgroundSpikeSource::operator== | ( | BackgroundSpikeSource const & | other | ) | const |
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.
value | Boolean value |
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.
value | Boolean value |
void haldls::vx::BackgroundSpikeSource::set_mask | ( | Mask const & | value | ) |
Set neuron label randomization mask.
The value has no effect on regular spike generation.
value | Mask |
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.
value | NeuronLabel |
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.
value | Period |
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.
value | Rate |
void haldls::vx::BackgroundSpikeSource::set_seed | ( | Seed const & | value | ) |
|
friend |
Definition at line 244 of file background.h.
|
friend |
|
staticconstexpr |
Definition at line 229 of file background.h.
|
staticconstexpr |
Definition at line 41 of file background.h.