88#ifndef _SYNAPSE_ROW_H_
89#define _SYNAPSE_ROW_H_
94#ifndef SYNAPSE_WEIGHT_BITS
95#define SYNAPSE_WEIGHT_BITS 16
98#ifdef SYNAPSE_WEIGHTS_SIGNED
109#define N_SYNAPSE_ROW_HEADER_WORDS 3
132 return the_row->
size;
239 weight_t weight, uint32_t left_shift) {
245 converter.input_type = (
int_k_t) (weight) << left_shift;
247 return converter.output_type;
260 uint32_t simulation_timestep, uint32_t synapse_type_index,
275 uint32_t synapse_type_index, uint32_t neuron_index,
299 uint32_t simulation_timestep,
300 uint32_t combined_synapse_neuron_index,
303 | combined_synapse_neuron_index;
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.
Data type definitions for SpiNNaker Neuron-modelling.
struct synaptic_row * synaptic_row_t
The type of a synaptic row.
REAL input_t
The type of an input.
The format of the plastic data region of a synaptic row.
static index_t synapse_row_get_first_ring_buffer_index(uint32_t simulation_timestep, uint32_t synapse_type_index_bits, int32_t synapse_delay_mask)
Get the index of the first ring buffer for a given timestep.
uint32_t data[]
The data, first the fixed then the plastic.
static size_t synapse_row_num_plastic_controls(const synapse_row_fixed_part_t *fixed)
Get the number of plastic controls in the row.
size_t size
The number of plastic words in data
#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 control_t * synapse_row_plastic_controls(synapse_row_fixed_part_t *fixed)
Get the array 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 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_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 synapse_row_plastic_data_t * synapse_row_plastic_region(synaptic_row_t row)
Get the address of the plastic region.
size_t num_plastic
The number of plastic controls in data
static index_t synapse_row_sparse_type_index(uint32_t x, uint32_t synapse_type_index_mask)
Get the type and index.
static size_t synapse_row_plastic_size(const synaptic_row_t row)
Get the size of the plastic region.
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 index_t synapse_row_get_ring_buffer_index(uint32_t simulation_timestep, uint32_t synapse_type_index, uint32_t neuron_index, uint32_t synapse_type_index_bits, uint32_t synapse_index_bits, uint32_t synapse_delay_mask)
Get the index of the ring buffer for a given timestep, synapse type and neuron index.
static input_t synapse_row_convert_weight_to_input(weight_t weight, uint32_t left_shift)
Converts a weight stored in a synapse row to an input.
uint16_t control_t
Define the type of the control data.
static weight_t synapse_row_sparse_weight(uint32_t x)
Get the weight from an encoded synapse descriptor.
uint32_t data[]
The plastic words, followed by the fixed part.
static index_t synapse_row_get_ring_buffer_index_time_0(uint32_t synapse_type_index, uint32_t neuron_index, uint32_t synapse_index_bits)
Get the index of the ring buffer for time 0, synapse type and neuron index.
The type of the fixed part of the row. The fixed-plastic part follows.
The type of the plastic-plastic part of the row.
uint32_t synapse_index_mask
Mask to pick out the synapse index.
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.