59#ifndef SYNAPSE_AXONAL_DELAY_BITS
60#define SYNAPSE_AXONAL_DELAY_BITS 3
63#define SYNAPSE_AXONAL_DELAY_MASK \
64 ((1 << SYNAPSE_AXONAL_DELAY_BITS) - 1)
86 uint32_t delay_dendritic;
87 uint32_t delay_axonal;
91 uint32_t ring_buffer_index;
110#define __use(x) do { (void) (x); } while (0)
113static inline bool synapse_dynamics_stdp_init(
115 uint32_t *ring_buffer_to_input_buffer_left_shifts) {
124 if (weight_region_address ==
NULL) {
131 ring_buffer_to_input_buffer_left_shifts);
132 if (weight_result ==
NULL) {
137 *address = weight_result;
141input_t synapse_dynamics_get_intrinsic_bias(
142 UNUSED uint32_t time, UNUSED
index_t neuron_index) {
155 uint32_t control_word, uint32_t time, uint32_t colour_delay) {
161 uint32_t delay_axonal = 0;
165 .delay_dendritic = delay_dendritic,
166 .delay_axonal = delay_axonal,
171 .type_index = type_index,
173 (delay_axonal + delay_dendritic + time) - colour_delay, type_index,
178static inline void synapse_dynamics_stdp_update_ring_buffers(
180 uint32_t accumulation =
ring_buffers[s.ring_buffer_index] + weight;
182 uint32_t sat_test = accumulation & 0xFFFF0000;
184 accumulation = 0xFFFF;
193 uint32_t
id, uint32_t delay, uint32_t type) {
static weight_t * ring_buffers
The ring buffers to be used in the simulation.
uint32_t synapse_delay_mask
The mask to get the synaptic delay from a "synapse".
uint32_t synapse_type_index_bits
The number of bits used by the synapse type and post-neuron index.
uint32_t synapse_index_bits
The number of bits used by just the post-neuron index.
Support functions for STDP.
REAL input_t
The type of an input.
static uint32_t n_synapse_types
The number of synapse types.
Trace history of post-synaptic events.
void spin1_memcpy(void *dst, void const *src, uint len)
API for synapse dynamics.
uint32_t backprop_delay
The back-propagation delay, in basic simulation timesteps.
static control_t control_conversion(uint32_t id, uint32_t delay, uint32_t type)
packing all of the information into the required plastic control word
static stdp_params params
Configuration parameters.
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_BEN...
pre_trace_t prev_trace
The event trace.
uint32_t synapse_dynamics_get_plastic_saturation_count(void)
Get the number of ring buffer saturation events due to adding plastic weights.
static uint32_t plastic_saturation_count
Count of times that the plastic math became saturated.
static post_event_history_t * post_event_history
The history data of post-events.
static uint32_t num_plastic_pre_synaptic_events
Count of pre-synaptic events relevant to plastic processing.
uint32_t synapse_dynamics_n_connections_in_row(synapse_row_fixed_part_t *fixed)
Get the number of connections in the given row.
uint32_t prev_time
The event time.
The type of history data of pre-events.
The type of configuration parameters in SDRAM (written by host)
static size_t synapse_row_num_plastic_controls(const synapse_row_fixed_part_t *fixed)
Get the number of plastic controls in the row.
static index_t synapse_row_sparse_type(uint32_t x, uint32_t synapse_index_bits, uint32_t synapse_type_mask)
Get the type code.
static index_t synapse_row_get_ring_buffer_index_combined(uint32_t simulation_timestep, uint32_t combined_synapse_neuron_index, uint32_t synapse_type_index_bits, uint32_t synapse_delay_mask)
Get the index of the ring buffer for a given timestep and combined synapse type and neuron index (as ...
static index_t synapse_row_sparse_index(uint32_t x, uint32_t synapse_index_mask)
Get the index.
static index_t synapse_row_sparse_delay(uint32_t x, uint32_t synapse_type_index_bits, uint32_t synapse_delay_mask)
Get the delay from an encoded synapse descriptor.
static index_t synapse_row_sparse_type_index(uint32_t x, uint32_t synapse_type_index_mask)
Get the type and index.
uint16_t control_t
Define the type of the control data.
The type of the fixed part of the row. The fixed-plastic part follows.
uint32_t synapse_index_mask
Mask to pick out the synapse index.
uint32_t synapse_delay_bits
Number of bits in the delay.
uint32_t synapse_type_index_mask
Mask to pick out the synapse type and index.
uint32_t synapse_type_mask
Mask to pick out the synapse type.
address_t timing_initialise(address_t address)
Initialise the timing dependence state (global) from SDRAM.
The type of pre-spike traces.
interface for different weight implementations for the weight half of a STDP rule.
address_t weight_initialise(address_t address, uint32_t n_synapse_types, uint32_t *ring_buffer_to_input_buffer_left_shifts)
Initialises the weight aspect of an STDP rule.