sPyNNaker neural_modelling  7.4.2
Functions
synapse_dynamics_static_impl.c File Reference

This file contains the main interface for structural plasticity and some shared code. For the main implementation, see topographic_map_impl.c. More...

#include "synapse_dynamics.h"
#include <neuron/synapses.h>
#include <debug.h>
#include <utils.h>

Go to the source code of this file.

Functions

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. More...
 
void synapse_dynamics_process_post_synaptic_event (uint32_t time, index_t neuron_index)
 Inform the synapses that the neuron fired. More...
 
bool synapse_dynamics_process_plastic_synapses (synapse_row_plastic_data_t *plastic_region_data, synapse_row_fixed_part_t *fixed_region, weight_t *ring_buffer, uint32_t time, uint32_t colour_delay, bool *write_back)
 Process the dynamics of the synapses. More...
 
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_left_shifts)
 Print the synapse dynamics. More...
 
uint32_t synapse_dynamics_get_plastic_pre_synaptic_events (void)
 Get the counters for plastic pre synaptic events based on (if the model was compiled with SYNAPSE_BENCHMARK parameter) or returns 0. More...
 
uint32_t synapse_dynamics_get_plastic_saturation_count (void)
 Get the number of ring buffer saturation events due to adding plastic weights. More...
 
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. More...
 
bool synapse_dynamics_remove_neuron (uint32_t offset, synaptic_row_t row)
 Remove the entry at the specified offset in the synaptic row. More...
 
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. More...
 
uint32_t synapse_dynamics_n_connections_in_row (synapse_row_fixed_part_t *fixed)
 Get the number of connections in the given row. More...
 

Detailed Description

This file contains the main interface for structural plasticity and some shared code. For the main implementation, see topographic_map_impl.c.

Author
Petrut Bogdan

Definition in file synapse_dynamics_static_impl.c.

Function Documentation

◆ 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 29 of file synapse_dynamics_static_impl.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 37 of file synapse_dynamics_static_impl.c.

◆ 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 42 of file synapse_dynamics_static_impl.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 52 of file synapse_dynamics_static_impl.c.

◆ synapse_dynamics_get_plastic_pre_synaptic_events()

uint32_t synapse_dynamics_get_plastic_pre_synaptic_events ( void  )

Get the counters for plastic pre synaptic events based on (if the model was compiled with SYNAPSE_BENCHMARK parameter) or returns 0.

Returns
counters for plastic pre synaptic events or 0

Definition at line 58 of file synapse_dynamics_static_impl.c.

◆ synapse_dynamics_get_plastic_saturation_count()

uint32_t synapse_dynamics_get_plastic_saturation_count ( void  )

Get the number of ring buffer saturation events due to adding plastic weights.

Returns
counter for saturation events or 0

Definition at line 62 of file synapse_dynamics_static_impl.c.

◆ 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 66 of file synapse_dynamics_static_impl.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 94 of file synapse_dynamics_static_impl.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 119 of file synapse_dynamics_static_impl.c.

◆ synapse_dynamics_n_connections_in_row()

uint32_t synapse_dynamics_n_connections_in_row ( synapse_row_fixed_part_t fixed)

Get the number of connections in the given row.

Parameters
[in]fixedthe fixed region of the synaptic row
Returns
The number of connections in the row

Definition at line 135 of file synapse_dynamics_static_impl.c.