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

implementation of synapse_types.h for an alpha synapse behaviour More...

#include <neuron/decay.h>
#include <debug.h>
#include "synapse_types.h"

Go to the source code of this file.

Data Structures

struct  alpha_params_t
 Parameters of an alpha synaptic input. More...
 
struct  synapse_types_params_t
 
struct  alpha_state_t
 Internal structure of an alpha-shaped synaptic input. More...
 
struct  synapse_types_t
 Delta synapses support just a single excitatory and inhibitory input each. More...
 

Macros

#define SYNAPSE_TYPE_BITS   1
 Number of bits to encode the synapse type.
 
#define SYNAPSE_TYPE_COUNT   2
 Number of synapse types.
 
#define NUM_EXCITATORY_RECEPTORS   1
 Number of excitatory receptors.
 
#define NUM_INHIBITORY_RECEPTORS   1
 Number of inhibitory receptors.
 

Enumerations

enum  synapse_alpha_input_buffer_regions { EXCITATORY , INHIBITORY }
 The supported synapse type indices. More...
 

Functions

static void get_alpha_state (alpha_state_t *state, alpha_params_t *params, REAL time_step_ms, uint32_t n_steps_per_timestep)
 
static void synapse_types_initialise (synapse_types_t *state, synapse_types_params_t *params, uint32_t n_steps_per_timestep)
 
static void synapse_types_save_state (synapse_types_t *state, synapse_types_params_t *params)
 
static void alpha_shaping (alpha_state_t *a_params)
 Applies alpha shaping to a parameter.
 
static void synapse_types_shape_input (synapse_types_t *parameters)
 decays the stuff thats sitting in the input buffers as these have not yet been processed and applied to the neuron.
 
static void add_input_alpha (alpha_state_t *a_params, input_t input)
 helper function to add input for a given timer period to a given neuron
 
static void synapse_types_add_neuron_input (index_t synapse_type_index, synapse_types_t *parameters, input_t input)
 adds the inputs for a give timer period to a given neuron that is being simulated by this model
 
static input_tsynapse_types_get_excitatory_input (input_t *excitatory_response, synapse_types_t *parameters)
 extracts the excitatory input buffers from the buffers available for a given neuron ID
 
static input_tsynapse_types_get_inhibitory_input (input_t *inhibitory_response, synapse_types_t *parameters)
 extracts the inhibitory input buffers from the buffers available for a given neuron ID
 
static const char * synapse_types_get_type_char (index_t synapse_type_index)
 returns a human readable character for the type of synapse.
 
static void synapse_types_print_input (synapse_types_t *parameters)
 prints the input for a neuron ID given the available inputs currently only executed when the models are in debug mode, as the prints are controlled from the synapses.c print_inputs() method.
 
static void synapse_types_print_parameters (synapse_types_t *parameters)
 prints the parameters of the synapse type
 

Detailed Description

implementation of synapse_types.h for an alpha synapse behaviour

Definition in file synapse_types_alpha_impl.h.


Data Structure Documentation

◆ alpha_params_t

struct alpha_params_t

Parameters of an alpha synaptic input.

Definition at line 48 of file synapse_types_alpha_impl.h.

Data Fields
input_t lin_init
input_t exp_init
input_t q_init
REAL tau

◆ synapse_types_params_t

struct synapse_types_params_t

Definition at line 55 of file synapse_types_alpha_impl.h.

Data Fields
alpha_params_t exc First excitatory synaptic input.
alpha_params_t inh

Inhibitory synaptic input

REAL time_step_ms
input_t exc
input_t inh
exp_params_t exc First excitatory synaptic input.
exp_params_t exc2 Second excitatory synaptic input.
exp_params_t inh

Inhibitory synaptic input

input_t multiplicator_init Output scaling factor derived from first excitatory input.
input_t exc2_old_init History storage used to reset synaptic state.
input_t scaling_factor Scaling factor for the secondary response.
REAL timestep_ms The time step in milliseconds.

◆ alpha_state_t

struct alpha_state_t

Internal structure of an alpha-shaped synaptic input.

Definition at line 62 of file synapse_types_alpha_impl.h.

Data Fields
input_t lin_buff buffer for linear term
input_t exp_buff

buffer for exponential term

input_t dt_divided_by_tau_sqr τ-1 pre-multiplied by dt
decay_t decay Exponential decay multiplier.
input_t q_buff Temporary value of input.

◆ synapse_types_t

struct synapse_types_t

Delta synapses support just a single excitatory and inhibitory input each.

Definition at line 71 of file synapse_types_alpha_impl.h.

Data Fields
alpha_state_t exc Excitatory synaptic input.

First excitatory synaptic input.

alpha_state_t inh Inhibitory synaptic input.

Inhibitory synaptic input

input_t exc Excitatory synaptic input.
input_t inh Inhibitory synaptic input.
exp_state_t exc First excitatory synaptic input.

Excitatory synaptic input.

exp_state_t exc2 Second excitatory synaptic input.
exp_state_t inh Inhibitory synaptic input.

Inhibitory synaptic input

input_t multiplicator Output scaling factor derived from first excitatory input.
input_t exc2_old History storage used to reset synaptic state.
input_t scaling_factor Scaling factor for the secondary response.

Macro Definition Documentation

◆ SYNAPSE_TYPE_BITS

#define SYNAPSE_TYPE_BITS   1

Number of bits to encode the synapse type.

ceil(log2(SYNAPSE_TYPE_COUNT))

Definition at line 30 of file synapse_types_alpha_impl.h.

◆ SYNAPSE_TYPE_COUNT

#define SYNAPSE_TYPE_COUNT   2

Number of synapse types.

NUM_EXCITATORY_RECEPTORS + NUM_INHIBITORY_RECEPTORS

Definition at line 33 of file synapse_types_alpha_impl.h.

◆ NUM_EXCITATORY_RECEPTORS

#define NUM_EXCITATORY_RECEPTORS   1

Number of excitatory receptors.

Definition at line 36 of file synapse_types_alpha_impl.h.

◆ NUM_INHIBITORY_RECEPTORS

#define NUM_INHIBITORY_RECEPTORS   1

Number of inhibitory receptors.

Definition at line 38 of file synapse_types_alpha_impl.h.

Enumeration Type Documentation

◆ synapse_alpha_input_buffer_regions

The supported synapse type indices.

Enumerator
EXCITATORY 

Excitatory synaptic input.

INHIBITORY 

Inhibitory synaptic input.

Definition at line 77 of file synapse_types_alpha_impl.h.

Function Documentation

◆ get_alpha_state()

static void get_alpha_state ( alpha_state_t state,
alpha_params_t params,
REAL  time_step_ms,
uint32_t  n_steps_per_timestep 
)
inlinestatic

Definition at line 86 of file synapse_types_alpha_impl.h.

◆ synapse_types_initialise()

static void synapse_types_initialise ( synapse_types_t state,
synapse_types_params_t params,
uint32_t  n_steps_per_timestep 
)
inlinestatic

Definition at line 98 of file synapse_types_alpha_impl.h.

◆ synapse_types_save_state()

static void synapse_types_save_state ( synapse_types_t state,
synapse_types_params_t params 
)
static

Definition at line 104 of file synapse_types_alpha_impl.h.

◆ alpha_shaping()

static void alpha_shaping ( alpha_state_t a_params)
inlinestatic

Applies alpha shaping to a parameter.

Parameters
[in,out]a_paramsThe parameter to shape

Definition at line 115 of file synapse_types_alpha_impl.h.

◆ synapse_types_shape_input()

static void synapse_types_shape_input ( synapse_types_t parameters)
inlinestatic

decays the stuff thats sitting in the input buffers as these have not yet been processed and applied to the neuron.

This is to compensate for the valve behaviour of a synapse in biology (spike goes in, synapse opens, then closes slowly) plus the leaky aspect of a neuron.

Parameters
[in,out]parametersthe parameters to update

Definition at line 131 of file synapse_types_alpha_impl.h.

◆ add_input_alpha()

static void add_input_alpha ( alpha_state_t a_params,
input_t  input 
)
inlinestatic

helper function to add input for a given timer period to a given neuron

Parameters
[in]a_paramsthe parameter to update
[in]inputthe input to add.

Definition at line 141 of file synapse_types_alpha_impl.h.

◆ synapse_types_add_neuron_input()

static void synapse_types_add_neuron_input ( index_t  synapse_type_index,
synapse_types_t parameters,
input_t  input 
)
inlinestatic

adds the inputs for a give timer period to a given neuron that is being simulated by this model

Add input from ring buffer. Zero if no spikes, otherwise one or more weights

Parameters
[in]synapse_type_indexthe type of input that this input is to be considered (aka excitatory or inhibitory etc)
[in,out]parametersthe parameters to update
[in]inputthe inputs for that given synapse_type.

Definition at line 160 of file synapse_types_alpha_impl.h.

◆ synapse_types_get_excitatory_input()

static input_t * synapse_types_get_excitatory_input ( input_t excitatory_response,
synapse_types_t parameters 
)
inlinestatic

extracts the excitatory input buffers from the buffers available for a given neuron ID

Parameters
[in,out]excitatory_responseBuffer to put response in
[in]parametersthe pointer to the parameters to use
Returns
Pointer to array of excitatory input buffers for a given neuron ID.

Definition at line 180 of file synapse_types_alpha_impl.h.

◆ synapse_types_get_inhibitory_input()

static input_t * synapse_types_get_inhibitory_input ( input_t inhibitory_response,
synapse_types_t parameters 
)
inlinestatic

extracts the inhibitory input buffers from the buffers available for a given neuron ID

Parameters
[in,out]inhibitory_responseBuffer to put response in
[in]parametersthe pointer to the parameters to use
Returns
Pointer to array of inhibitory input buffers for a given neuron ID.

Definition at line 192 of file synapse_types_alpha_impl.h.

◆ synapse_types_get_type_char()

static const char * synapse_types_get_type_char ( index_t  synapse_type_index)
inlinestatic

returns a human readable character for the type of synapse.

Examples would be X = excitatory types, I = inhibitory types, etc.

Parameters
[in]synapse_type_indexthe synapse type index (there is a specific index interpretation in each synapse type)
Returns
a human readable character representing the synapse type.

Definition at line 205 of file synapse_types_alpha_impl.h.

◆ synapse_types_print_input()

static void synapse_types_print_input ( synapse_types_t parameters)
inlinestatic

prints the input for a neuron ID given the available inputs currently only executed when the models are in debug mode, as the prints are controlled from the synapses.c print_inputs() method.

Parameters
[in]parametersthe pointer to the parameters to print

Definition at line 222 of file synapse_types_alpha_impl.h.

◆ synapse_types_print_parameters()

static void synapse_types_print_parameters ( synapse_types_t parameters)
inlinestatic

prints the parameters of the synapse type

Parameters
[in]parametersthe pointer to the parameters to print

Definition at line 231 of file synapse_types_alpha_impl.h.