sPyNNaker neural_modelling 7.3.1
Loading...
Searching...
No Matches
Data Structures | Macros | Functions | Variables
neuron_impl_stoc_sigma.h File Reference

Stochastic neuron implementation with sigma shaped probability. More...

#include <neuron/implementations/neuron_impl.h>
#include <spin1_api.h>
#include <debug.h>
#include <random.h>
#include <stdfix-full-iso.h>
#include <common/maths-util.h>
#include <neuron/neuron_recording.h>
#include <neuron/current_sources/current_source_impl.h>
#include <neuron/current_sources/current_source.h>

Go to the source code of this file.

Data Structures

struct  neuron_params_t
 definition of neuron parameters More...
 
struct  neuron_impl_t
 definition of neuron state More...
 

Macros

#define V_RECORDING_INDEX   0
 
#define EX_INPUT_INDEX   1
 
#define IN_INPUT_INDEX   2
 
#define PROB_INDEX   3
 
#define N_RECORDED_VARS   4
 
#define SPIKE_RECORDING_BITFIELD   0
 
#define N_BITFIELD_VARS   1
 
#define PROB_HALF   0x7FFFFFFF
 A probability of a half.
 
#define MAX_POWER   REAL_CONST(5)
 The power of 2 that == 32.
 
#define MIN_POWER   REAL_CONST(-5)
 

Functions

static bool neuron_impl_initialise (uint32_t n_neurons)
 
static uint32_t stoc_sigma_ceil_accum (UREAL value)
 
static void neuron_model_initialise (neuron_impl_t *state, neuron_params_t *params)
 
static void neuron_model_save_state (neuron_impl_t *state, neuron_params_t *params)
 
static void neuron_impl_load_neuron_parameters (address_t address, uint32_t next, uint32_t n_neurons, address_t save_initial_state)
 
static void neuron_impl_store_neuron_parameters (address_t address, uint32_t next, uint32_t n_neurons)
 
static void neuron_impl_add_inputs (index_t synapse_type_index, index_t neuron_index, input_t weights_this_timestep)
 
static void do_refrac_update (uint32_t timer_count, uint32_t time, uint32_t neuron_index, neuron_impl_t *neuron)
 
static void do_non_refrac_update (uint32_t timer_count, uint32_t time, uint32_t neuron_index, neuron_impl_t *neuron)
 
static void neuron_impl_do_timestep_update (uint32_t timer_count, uint32_t time, uint32_t n_neurons)
 
static void neuron_impl_print_inputs (uint32_t n_neurons)
 
static void neuron_impl_print_synapse_parameters (uint32_t n_neurons)
 
static const char * neuron_impl_get_synapse_type_char (uint32_t synapse_type)
 

Variables

static neuron_impl_tneuron_array
 Array of neuron states.
 

Detailed Description

Stochastic neuron implementation with sigma shaped probability.

Definition in file neuron_impl_stoc_sigma.h.


Data Structure Documentation

◆ neuron_params_t

struct neuron_params_t

definition of neuron parameters

The state parameters of an Izhekevich model neuron.

definition for LIF neuron parameters

Definition at line 47 of file neuron_impl_stoc_exp.h.

Data Fields
UREAL tau_ms The tau value of the neuron.
UREAL time_step The timestep of the neuron being used.

The time step in milliseconds.

current timestep in ms

REAL bias The bias value.
uint32_t refract_init The initial refractory timer.
mars_kiss64_seed_t random_seed Random seed to use.
REAL v_init The initial membrane voltage.
REAL v_reset The reset membrane voltage after a spike.
UREAL tau The tau value of the neuron, multiplied by 2^v to get probability.
UREAL tau_refract The refractory period of the neuron in milliseconds.

The refractory period of the neuron, in ms.

REAL alpha The alpha value of the neuron prob = (2^(-2^(alpha x voltage)))
REAL V_init membrane voltage [mV]
REAL c_m membrane capacitance [nF]
REAL tau_m membrane decay time constant
REAL I_offset offset current [nA]
REAL V_reset post-spike reset membrane voltage [mV]
REAL T_refract_ms refractory time of neuron [ms]
int32_t refract_timer_init initial refractory timer value (saved)
REAL time_step The time step in milliseconds.

current timestep in ms

REAL A
REAL B
REAL C
REAL D
REAL V
REAL U
REAL next_h next value of this_h (saved)
REAL V_rest membrane resting voltage [mV]

◆ neuron_impl_t

struct neuron_impl_t

definition of neuron state

Definition at line 67 of file neuron_impl_stoc_exp.h.

Data Fields
UFRACT tau_recip The reciprocal of the tau value.
REAL bias The bias value.
uint32_t t_refract The refractory timer countdown value.
uint32_t refract_timer The refractory timer.
mars_kiss64_seed_t random_seed The random state.
input_t inputs[2] The inputs to add in the next timestep.
REAL v_membrane The membrane voltage.
REAL v_reset The reset voltage after a spike.
UREAL tau The tau value of the neuron.
REAL alpha The alpha value of the neuron prob = (2^(-2^(alpha x voltage)))

Macro Definition Documentation

◆ V_RECORDING_INDEX

#define V_RECORDING_INDEX   0

Definition at line 30 of file neuron_impl_stoc_sigma.h.

◆ EX_INPUT_INDEX

#define EX_INPUT_INDEX   1

Definition at line 31 of file neuron_impl_stoc_sigma.h.

◆ IN_INPUT_INDEX

#define IN_INPUT_INDEX   2

Definition at line 32 of file neuron_impl_stoc_sigma.h.

◆ PROB_INDEX

#define PROB_INDEX   3

Definition at line 33 of file neuron_impl_stoc_sigma.h.

◆ N_RECORDED_VARS

#define N_RECORDED_VARS   4

Definition at line 34 of file neuron_impl_stoc_sigma.h.

◆ SPIKE_RECORDING_BITFIELD

#define SPIKE_RECORDING_BITFIELD   0

Definition at line 36 of file neuron_impl_stoc_sigma.h.

◆ N_BITFIELD_VARS

#define N_BITFIELD_VARS   1

Definition at line 37 of file neuron_impl_stoc_sigma.h.

◆ PROB_HALF

#define PROB_HALF   0x7FFFFFFF

A probability of a half.

Definition at line 45 of file neuron_impl_stoc_sigma.h.

◆ MAX_POWER

#define MAX_POWER   REAL_CONST(5)

The power of 2 that == 32.

Definition at line 48 of file neuron_impl_stoc_sigma.h.

◆ MIN_POWER

#define MIN_POWER   REAL_CONST(-5)

Definition at line 50 of file neuron_impl_stoc_sigma.h.

Function Documentation

◆ neuron_impl_initialise()

static bool neuron_impl_initialise ( uint32_t  n_neurons)
static

Definition at line 100 of file neuron_impl_stoc_sigma.h.

◆ stoc_sigma_ceil_accum()

static uint32_t stoc_sigma_ceil_accum ( UREAL  value)
inlinestatic

Definition at line 111 of file neuron_impl_stoc_sigma.h.

◆ neuron_model_initialise()

static void neuron_model_initialise ( neuron_impl_t state,
neuron_params_t params 
)
inlinestatic

Definition at line 121 of file neuron_impl_stoc_sigma.h.

◆ neuron_model_save_state()

static void neuron_model_save_state ( neuron_impl_t state,
neuron_params_t params 
)
inlinestatic

Definition at line 136 of file neuron_impl_stoc_sigma.h.

◆ neuron_impl_load_neuron_parameters()

static void neuron_impl_load_neuron_parameters ( address_t  address,
uint32_t  next,
uint32_t  n_neurons,
address_t  save_initial_state 
)
static

Definition at line 141 of file neuron_impl_stoc_sigma.h.

◆ neuron_impl_store_neuron_parameters()

static void neuron_impl_store_neuron_parameters ( address_t  address,
uint32_t  next,
uint32_t  n_neurons 
)
static

Definition at line 158 of file neuron_impl_stoc_sigma.h.

◆ neuron_impl_add_inputs()

static void neuron_impl_add_inputs ( index_t  synapse_type_index,
index_t  neuron_index,
input_t  weights_this_timestep 
)
static

Definition at line 166 of file neuron_impl_stoc_sigma.h.

◆ do_refrac_update()

static void do_refrac_update ( uint32_t  timer_count,
uint32_t  time,
uint32_t  neuron_index,
neuron_impl_t neuron 
)
inlinestatic

Definition at line 176 of file neuron_impl_stoc_sigma.h.

◆ do_non_refrac_update()

static void do_non_refrac_update ( uint32_t  timer_count,
uint32_t  time,
uint32_t  neuron_index,
neuron_impl_t neuron 
)
inlinestatic

Definition at line 195 of file neuron_impl_stoc_sigma.h.

◆ neuron_impl_do_timestep_update()

static void neuron_impl_do_timestep_update ( uint32_t  timer_count,
uint32_t  time,
uint32_t  n_neurons 
)
static

Definition at line 229 of file neuron_impl_stoc_sigma.h.

◆ neuron_impl_print_inputs()

static void neuron_impl_print_inputs ( uint32_t  n_neurons)
static

Definition at line 247 of file neuron_impl_stoc_sigma.h.

◆ neuron_impl_print_synapse_parameters()

static void neuron_impl_print_synapse_parameters ( uint32_t  n_neurons)
static

Definition at line 256 of file neuron_impl_stoc_sigma.h.

◆ neuron_impl_get_synapse_type_char()

static const char * neuron_impl_get_synapse_type_char ( uint32_t  synapse_type)
static

Definition at line 261 of file neuron_impl_stoc_sigma.h.

Variable Documentation

◆ neuron_array

neuron_impl_t* neuron_array
static

Array of neuron states.

Definition at line 98 of file neuron_impl_stoc_sigma.h.