32 uint32_t *synaptic_matrix;
34 uint32_t synaptic_matrix_offset;
36 uint32_t max_row_n_words;
37 uint32_t max_row_n_synapses;
38 uint32_t n_pre_neurons;
39 uint32_t synapse_type;
48 uint32_t pre_spike: 31;
49 uint32_t is_update: 1;
56 int32_t fixed_plastic_data[];
69 uint32_t max_row_n_words, uint32_t pre_index) {
90 uint32_t max_row_n_words, uint32_t row_offset) {
91 for (uint32_t i = 0; i < n_rows; i++) {
94 row->pre_spike = i + row_offset;
111 void *synaptic_matrix) {
118 *conf = *params_sdram;
119 *
region = ¶ms_sdram[1];
122 uint32_t *syn_mat = synaptic_matrix;
123 conf->synaptic_matrix = &(syn_mat[conf->synaptic_matrix_offset]);
125 conf->max_row_n_words, conf->row_offset);
138static uint32_t build_changer_word(
152static bool matrix_generator_changer_write_synapse(
void *generator,
153 uint32_t pre_index, uint16_t post_index, accum weight,
154 UNUSED uint16_t delay,
unsigned long accum weight_scale) {
157 conf->max_row_n_words, pre_index);
160 if (pos >= conf->max_row_n_synapses) {
161 log_warning(
"Row %u at 0x%08x, 0x%08x of matrix 0x%08x is already full (%u of %u)",
162 pre_index, plastic_row, fixed_row, conf->synaptic_matrix, pos,
163 conf->max_row_n_synapses);
167 int16_t signed_weight = (int16_t) scaled_weight;
169 signed_weight = -signed_weight;
173 post_index, conf->synapse_type_bits, conf->synapse_index_bits,
void log_warning(const char *message,...)
Declarations for delay extensions.
General types associated with generators.
static uint16_t rescale_weight(accum weight, unsigned long accum weight_scale)
Rescales a weight to account for weight granularity and type-converts it.
uint32_t synapse_index_bits
The number of bits used by just the post-neuron index.
Common functions for matrix generation.
#define N_HEADER_WORDS
The number of header words per row.
static void setup_changer_rows(uint32_t *matrix, uint32_t n_rows, uint32_t max_row_n_words, uint32_t row_offset)
Set up the rows so that they are ready for writing to.
static row_changer_fixed_t * get_changer_fixed_row(row_changer_plastic_t *plastic_row)
Get the fixed part of a row that comes after the plastic part.
int32_t fixed_plastic_data[]
the fixed-plastic data within the fixed region
uint32_t plastic_plastic_size
the plastic-plastic size within the row
void matrix_generator_changer_free(void *generator)
Free any data for the matrix generator.
uint32_t fixed_fixed_size
the fixed-fixed size within the fixed region
static row_changer_plastic_t * get_changer_row(uint32_t *synaptic_matrix, uint32_t max_row_n_words, uint32_t pre_index)
Get a synaptic row for a given neuron.
void * matrix_generator_changer_initialize(void **region, void *synaptic_matrix)
Initialise the Changer synaptic matrix generator.
uint32_t fixed_plastic_size
the fixed-plastic size within the fixed region
The layout of the fixed synapse region of the row; the fixed-fixed region is empty.
The layout of the initial plastic synapse part of the row.
void sark_free(void *ptr)
region
spike source array region IDs in human readable form
uint32_t synapse_index_mask
Mask to pick out the synapse index.
uint32_t synapse_type_bits
Number of bits in the synapse type.
uint32_t synapse_type_mask
Mask to pick out the synapse type.