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

STDP-with-neuromodulation implementation. More...

#include "post_events_with_da.h"
#include "synapse_dynamics_stdp_common.h"
#include "stdp_typedefs.h"

Go to the source code of this file.

Data Structures

struct  neuromodulation_data_t
 
struct  neuromodulated_synapse_t
 
struct  nm_update_state_t
 
struct  nm_final_state_t
 
struct  synapse_row_plastic_data_t
 The format of the plastic data region of a synaptic row. More...
 
struct  nm_params_t
 
union  synapse_row_plastic_data_t.__unnamed10__
 
struct  synapse_row_plastic_data_t.__unnamed10__.__unnamed12__
 

Macros

#define DECAY_LOOKUP_TAU_C(time)    maths_lut_exponential_decay(time, tau_c_lookup)
 
#define DECAY_LOOKUP_TAU_D(time)    maths_lut_exponential_decay(time, tau_d_lookup)
 

Functions

static nm_update_state_t get_nm_update_state (neuromodulated_synapse_t synapse, index_t synapse_type)
 
static nm_final_state_t get_nm_final_state (nm_update_state_t update_state)
 
static neuromodulated_synapse_t get_nm_final_synaptic_word (nm_final_state_t final_state)
 
static post_event_window_t get_post_event_window (const post_event_history_t *post_event_history, const uint32_t delayed_pre_time, const uint32_t delayed_last_pre_time, const uint32_t delay_dendritic)
 
static accum get_weight_update (int16_t decay_eligibility_trace, int16_t decay_dopamine_trace, int16_t last_dopamine_trace, accum eligibility_weight)
 
static nm_final_state_t izhikevich_neuromodulation_plasticity_update_synapse (const uint32_t time, const uint32_t last_pre_time, const pre_trace_t last_pre_trace, const pre_trace_t new_pre_trace, const uint32_t delay_dendritic, const uint32_t delay_axonal, nm_update_state_t current_state, const post_event_history_t *post_event_history)
 Synapse update loop core.
 
bool synapse_dynamics_initialise (address_t address, uint32_t n_neurons, uint32_t n_synapse_types, uint32_t *ring_buffer_to_input_buffer_left_shifts)
 Initialise the synapse dynamics.
 
void synapse_dynamics_print_plastic_synapses (synapse_row_plastic_data_t *plastic_region_data, synapse_row_fixed_part_t *fixed_region, uint32_t *ring_buffer_to_input_buffer_left_shifts)
 Print the synapse dynamics.
 
static index_t sparse_axonal_delay (uint32_t x)
 Get the axonal delay.
 
void synapse_dynamics_process_post_synaptic_event (uint32_t time, index_t neuron_index)
 Inform the synapses that the neuron fired.
 
static neuromodulated_synapse_t process_plastic_synapse (uint32_t control_word, uint32_t last_pre_time, pre_trace_t last_pre_trace, pre_trace_t new_pre_trace, weight_t *ring_buffers, uint32_t time, uint32_t colour_delay, neuromodulated_synapse_t synapse)
 
static void process_neuromodulation (synapse_row_plastic_data_t *plastic_region_address, synapse_row_fixed_part_t *fixed_region, uint32_t time)
 
bool synapse_dynamics_process_plastic_synapses (synapse_row_plastic_data_t *plastic_region_address, synapse_row_fixed_part_t *fixed_region, weight_t *ring_buffers, uint32_t time, uint32_t colour_delay, bool *write_back)
 Process the dynamics of the synapses.
 
static neuromodulated_synapse_tget_plastic_synapses (synaptic_row_t row)
 
bool synapse_dynamics_find_neuron (uint32_t id, synaptic_row_t row, weight_t *weight, uint16_t *delay, uint32_t *offset, uint32_t *synapse_type)
 Search the synaptic row for the the connection with the specified post-synaptic ID.
 
bool synapse_dynamics_remove_neuron (uint32_t offset, synaptic_row_t row)
 Remove the entry at the specified offset in the synaptic row.
 
bool synapse_dynamics_add_neuron (uint32_t id, synaptic_row_t row, weight_t weight, uint32_t delay, uint32_t type)
 Add an entry in the synaptic row.
 

Variables

static nm_params_t nm_params
 
static int16_luttau_c_lookup
 
static int16_luttau_d_lookup
 
static uint32_t * nm_weight_shift
 
uint32_t skipped_synapses
 

Detailed Description

STDP-with-neuromodulation implementation.

Definition in file synapse_dynamics_stdp_izhikevich_neuromodulation.c.


Data Structure Documentation

◆ neuromodulation_data_t

struct neuromodulation_data_t
Data Fields
uint32_t synapse_type:30
uint32_t is_reward:1
uint32_t is_neuromodulation: 1

◆ neuromodulated_synapse_t

struct neuromodulated_synapse_t
Data Fields
weight_t weight
plastic_synapse_t eligibility_synapse

◆ nm_update_state_t

struct nm_update_state_t
Data Fields
accum weight
uint32_t weight_shift
update_state_t eligibility_state

◆ nm_final_state_t

struct nm_final_state_t
Data Fields
weight_t weight
final_state_t final_state

◆ synapse_row_plastic_data_t

struct synapse_row_plastic_data_t

The format of the plastic data region of a synaptic row.

Definition at line 45 of file synapse_dynamics_stdp_izhikevich_neuromodulation.c.

Data Fields
union synapse_row_plastic_data_t.__unnamed10__ __unnamed__
pre_event_history_t history The pre-event history.
plastic_synapse_t synapses[] The per-synapse information.
uint32_t pre_spike: 31
uint32_t is_update: 1
updatable_synapse_t synapses[]

◆ nm_params_t

struct nm_params_t
Data Fields
accum weight_update_constant_component Constant part of weight update.
accum max_weight Maximum of weight after update.
accum min_weight Minimum of weight after update (must be >= 0)

◆ synapse_row_plastic_data_t.__unnamed10__

union synapse_row_plastic_data_t.__unnamed10__
Data Fields
struct synapse_row_plastic_data_t.__unnamed10__.__unnamed12__ __unnamed__
neuromodulation_data_t neuromodulation Neuromodulation data.

◆ synapse_row_plastic_data_t.__unnamed10__.__unnamed12__

struct synapse_row_plastic_data_t.__unnamed10__.__unnamed12__
Data Fields
pre_event_history_t history The pre-event history.
neuromodulated_synapse_t synapses[] The per-synapse information.

Macro Definition Documentation

◆ DECAY_LOOKUP_TAU_C

#define DECAY_LOOKUP_TAU_C (   time)     maths_lut_exponential_decay(time, tau_c_lookup)

◆ DECAY_LOOKUP_TAU_D

#define DECAY_LOOKUP_TAU_D (   time)     maths_lut_exponential_decay(time, tau_d_lookup)

Function Documentation

◆ get_nm_update_state()

static nm_update_state_t get_nm_update_state ( neuromodulated_synapse_t  synapse,
index_t  synapse_type 
)
inlinestatic

◆ get_nm_final_state()

static nm_final_state_t get_nm_final_state ( nm_update_state_t  update_state)
inlinestatic

◆ get_nm_final_synaptic_word()

static neuromodulated_synapse_t get_nm_final_synaptic_word ( nm_final_state_t  final_state)
inlinestatic

◆ get_post_event_window()

static post_event_window_t get_post_event_window ( const post_event_history_t post_event_history,
const uint32_t  delayed_pre_time,
const uint32_t  delayed_last_pre_time,
const uint32_t  delay_dendritic 
)
inlinestatic

◆ get_weight_update()

static accum get_weight_update ( int16_t  decay_eligibility_trace,
int16_t  decay_dopamine_trace,
int16_t  last_dopamine_trace,
accum  eligibility_weight 
)
inlinestatic

◆ izhikevich_neuromodulation_plasticity_update_synapse()

static nm_final_state_t izhikevich_neuromodulation_plasticity_update_synapse ( const uint32_t  time,
const uint32_t  last_pre_time,
const pre_trace_t  last_pre_trace,
const pre_trace_t  new_pre_trace,
const uint32_t  delay_dendritic,
const uint32_t  delay_axonal,
nm_update_state_t  current_state,
const post_event_history_t post_event_history 
)
inlinestatic

Synapse update loop core.

Parameters
[in]timeThe current time
[in]last_pre_timeThe time of the last previous pre-event
[in]last_pre_traceThe last previous pre-trace
[in]new_pre_traceThe new pre-trace
[in]delay_dendriticThe dendritic delay for the synapse
[in]delay_axonalThe axonal delay for the synapse
[in]current_stateThe current state
[in]post_event_historyThe history
Returns
The new basic state of the synapse

Definition at line 177 of file synapse_dynamics_stdp_izhikevich_neuromodulation.c.

◆ synapse_dynamics_initialise()

bool synapse_dynamics_initialise ( address_t  address,
uint32_t  n_neurons,
uint32_t  n_synapse_types,
uint32_t *  ring_buffer_to_input_buffer_left_shifts 
)

Initialise the synapse dynamics.

Parameters
[in]addressWhere the configuration data is
[in]n_neuronsNumber of neurons
[in]n_synapse_typesNumber of synapse types
[in]ring_buffer_to_input_buffer_left_shiftsHow to interpret the values from the ring buffers
Returns
Whether the initialisation succeeded.

Definition at line 276 of file synapse_dynamics_stdp_izhikevich_neuromodulation.c.

◆ synapse_dynamics_print_plastic_synapses()

void synapse_dynamics_print_plastic_synapses ( synapse_row_plastic_data_t plastic_region_data,
synapse_row_fixed_part_t fixed_region,
uint32_t *  ring_buffer_to_input_buffer_left_shifts 
)

Print the synapse dynamics.

Parameters
[in]plastic_region_dataWhere the plastic data is
[in]fixed_regionWhere the fixed data is
[in]ring_buffer_to_input_buffer_left_shiftsHow to interpret the values from the ring buffers

Definition at line 315 of file synapse_dynamics_stdp_izhikevich_neuromodulation.c.

◆ sparse_axonal_delay()

static index_t sparse_axonal_delay ( uint32_t  x)
inlinestatic

Get the axonal delay.

Parameters
[in]xThe packed plastic synapse control word
Returns
the axonal delay

Definition at line 361 of file synapse_dynamics_stdp_izhikevich_neuromodulation.c.

◆ synapse_dynamics_process_post_synaptic_event()

void synapse_dynamics_process_post_synaptic_event ( uint32_t  time,
index_t  neuron_index 
)

Inform the synapses that the neuron fired.

Parameters
[in]timeThe current simulation time
[in]neuron_indexWhich neuron are we processing

Definition at line 372 of file synapse_dynamics_stdp_izhikevich_neuromodulation.c.

◆ process_plastic_synapse()

static neuromodulated_synapse_t process_plastic_synapse ( uint32_t  control_word,
uint32_t  last_pre_time,
pre_trace_t  last_pre_trace,
pre_trace_t  new_pre_trace,
weight_t *  ring_buffers,
uint32_t  time,
uint32_t  colour_delay,
neuromodulated_synapse_t  synapse 
)
inlinestatic

◆ process_neuromodulation()

static void process_neuromodulation ( synapse_row_plastic_data_t plastic_region_address,
synapse_row_fixed_part_t fixed_region,
uint32_t  time 
)
inlinestatic

◆ synapse_dynamics_process_plastic_synapses()

bool synapse_dynamics_process_plastic_synapses ( synapse_row_plastic_data_t plastic_region_data,
synapse_row_fixed_part_t fixed_region,
weight_t *  ring_buffers,
uint32_t  time,
uint32_t  colour_delay,
bool *  write_back 
)

Process the dynamics of the synapses.

Parameters
[in,out]plastic_region_dataWhere the plastic data is
[in]fixed_regionWhere the fixed data is
[in,out]ring_buffersThe ring buffers
[in]timeThe current simulation time
[out]Whetherto write back anything
Returns
Whether the processing was successful or not

Definition at line 460 of file synapse_dynamics_stdp_izhikevich_neuromodulation.c.

◆ get_plastic_synapses()

static neuromodulated_synapse_t * get_plastic_synapses ( synaptic_row_t  row)
inlinestatic

◆ synapse_dynamics_find_neuron()

bool synapse_dynamics_find_neuron ( uint32_t  id,
synaptic_row_t  row,
weight_t *  weight,
uint16_t *  delay,
uint32_t *  offset,
uint32_t *  synapse_type 
)

Search the synaptic row for the the connection with the specified post-synaptic ID.

Parameters
[in]idthe (core-local) ID of the neuron to search for in the synaptic row
[in]rowthe core-local address of the synaptic row
[out]weightaddress to contain the weight of the connection
[out]delayaddress to contain the delay of the connection
[out]offsetaddress to contain the offset of the connection
[out]synapse_typethe synapse type of the connection
Returns
was the search successful?

Definition at line 512 of file synapse_dynamics_stdp_izhikevich_neuromodulation.c.

◆ synapse_dynamics_remove_neuron()

bool synapse_dynamics_remove_neuron ( uint32_t  offset,
synaptic_row_t  row 
)

Remove the entry at the specified offset in the synaptic row.

Parameters
[in]offsetthe offset in the row at which to remove the entry
[in]rowthe core-local address of the synaptic row
Returns
was the removal successful?

Definition at line 542 of file synapse_dynamics_stdp_izhikevich_neuromodulation.c.

◆ synapse_dynamics_add_neuron()

bool synapse_dynamics_add_neuron ( uint32_t  id,
synaptic_row_t  row,
weight_t  weight,
uint32_t  delay,
uint32_t  type 
)

Add an entry in the synaptic row.

Parameters
[in]idthe (core-local) ID of the post-synaptic neuron to be added
[in]rowthe core-local address of the synaptic row
[in]weightthe initial weight associated with the connection
[in]delaythe delay associated with the connection
[in]typethe type of the connection (e.g. inhibitory)
Returns
was the addition successful?

Definition at line 560 of file synapse_dynamics_stdp_izhikevich_neuromodulation.c.

Variable Documentation

◆ nm_params

nm_params_t nm_params
static

◆ tau_c_lookup

int16_lut* tau_c_lookup
static

◆ tau_d_lookup

int16_lut* tau_d_lookup
static

◆ nm_weight_shift

uint32_t* nm_weight_shift
static

◆ skipped_synapses

uint32_t skipped_synapses
extern

Count of the synapses that have been skipped because the delay wasn't big enough given how long the spike took to arrive

Definition at line 84 of file synapses.c.