32 UNUSED uint32_t *ring_buffer_to_input_buffer_left_shifts) {
38 UNUSED uint32_t time, UNUSED
index_t neuron_index) {
45 UNUSED weight_t *ring_buffer, UNUSED uint32_t time,
46 UNUSED uint32_t colour_delay,
bool *write_back) {
47 log_error(
"There should be no plastic synapses!");
67 uint32_t
id,
synaptic_row_t row, weight_t *weight, uint16_t *delay,
68 uint32_t *offset, uint32_t *synapse_type) {
74 for (; fixed_synapse > 0; fixed_synapse--) {
78 uint32_t synaptic_word = *synaptic_words++;
100 synaptic_words[offset] = synaptic_words[fixed_synapse - 1];
108static inline uint32_t _fixed_synapse_convert(
109 uint32_t
id, weight_t weight, uint32_t delay, uint32_t type) {
121 uint32_t delay, uint32_t type) {
125 uint32_t new_synapse = _fixed_synapse_convert(
id, weight, delay, type);
128 synaptic_words[fixed_synapse] = new_synapse;
void log_error(const char *message,...)
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.
struct synaptic_row * synaptic_row_t
The type of a synaptic row.
static uint32_t n_neurons
The number of neurons on the core.
static uint32_t * ring_buffer_to_input_left_shifts
Amount to left shift the ring buffer by to make it an input.
static uint32_t n_synapse_types
The number of synapse types.
API for synapse dynamics.
The format of the plastic data region of a synaptic row.
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...
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_process_post_synaptic_event(uint32_t time, index_t neuron_index)
Inform the synapses that the neuron fired.
uint32_t synapse_dynamics_get_plastic_saturation_count(void)
Get the number of ring buffer saturation events due to adding plastic weights.
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_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.
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.
uint32_t synapse_dynamics_n_connections_in_row(synapse_row_fixed_part_t *fixed)
Get the number of connections in the given row.
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.
bool synapse_dynamics_remove_neuron(uint32_t offset, synaptic_row_t row)
Remove the entry at the specified offset in the synaptic row.
#define SYNAPSE_WEIGHT_BITS
how many bits the synapse weight will take
static synapse_row_fixed_part_t * synapse_row_fixed_region(synaptic_row_t row)
Get the address of the non-plastic (or fixed) region.
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 size_t synapse_row_num_fixed_synapses(const synapse_row_fixed_part_t *fixed)
Get the number of fixed synapses in the row.
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 uint32_t * synapse_row_fixed_weight_controls(synapse_row_fixed_part_t *fixed)
The array of fixed weights in the row.
size_t num_fixed
The number of fixed synapses in data
static weight_t synapse_row_sparse_weight(uint32_t x)
Get the weight from an encoded synapse descriptor.
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_bits
Number of bits in the synapse type.
uint32_t synapse_type_mask
Mask to pick out the synapse type.