71 uint32_t n_neurons_to_simulate;
72 uint32_t n_neurons_peak;
73 uint32_t n_colour_bits;
74 uint32_t n_synapse_types;
75 uint32_t ring_buffer_shifts[];
95 log_error(
"failed to reload the neuron recording parameters");
106 void *core_params_address,
void *neuron_params_address,
107 void *current_sources_address,
void *recording_address,
108 void *initial_values_address, uint32_t *n_rec_regions_used) {
127 log_error(
"Not enough memory to allocate ring buffer");
137 uint32_t *neuron_keys_sdram =
139 uint32_t neuron_keys_size =
n_neurons *
sizeof(uint32_t);
142 log_error(
"Not enough memory to allocate neuron keys");
152 log_info(
"\t n_neurons = %u, peak %u, n_synapse_types %u",
177 recording_address,
n_neurons, n_rec_regions_used)) {
205 uint32_t synapse_index = 0;
206 uint32_t ring_buffer_index = 0;
209 uint32_t neuron_index = 0;
211 weight_t value = syns[ring_buffer_index];
214 log_error(
"Neuron index %u out of range", neuron_index);
221 syns[ring_buffer_index] = 0;
229#if LOG_LEVEL >= LOG_DEBUG
uint32_t time
The current timer tick value.
General API of a current source implementation.
static bool current_source_initialise(address_t cs_address, uint32_t n_neurons)
Initialise the particular implementation of the data.
static bool current_source_load_parameters(address_t cs_address)
Load the data into the allocated array structures.
void log_error(const char *message,...)
void log_info(const char *message,...)
REAL input_t
The type of an input.
void neuron_pause(void)
Perform steps needed before pausing a simulation.
bool neuron_initialise(void *core_params_address, void *neuron_params_address, void *current_sources_address, void *recording_address, void *initial_values_address, uint32_t *n_rec_regions_used)
translate the data stored in the NEURON_PARAMS data region in SDRAM and convert it into c based objec...
const char * neuron_get_synapse_type_char(uint32_t synapse_type)
Get the synapse type description character.
void neuron_print_synapse_parameters(void)
Print the neurons' synapse parameters.
static void * current_source_address
The address for the current source parameters.
static uint32_t colour_mask
The mask of the colour.
void neuron_print_inputs(void)
Print the inputs to the neurons.
uint32_t latest_send_time
Latest time in a timestep that any neuron has sent a spike.
uint32_t colour
The colour of the time step to handle delayed spikes.
static uint32_t n_neurons_peak
The closest power of 2 >= n_neurons.
static uint32_t n_neurons
The number of neurons on the core.
bool neuron_resume(uint32_t time)
Prepare to resume simulation of the neurons.
void neuron_transfer(weight_t *syns)
Add inputs to the neurons.
bool use_key
Whether to use key from neuron.c.
static void * saved_initial_values_address
The address to save initial values to.
void neuron_do_timestep_update(timer_t time, uint timer_count)
executes all the updates to neural parameters when a given timer period has occurred.
uint32_t earliest_send_time
Earliest time in a timestep that any neuron has sent a spike.
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.
uint32_t * neuron_keys
The keys to be used by the neurons (one per neuron)
static void * saved_neuron_params_address
The address where the actual neuron parameters start.
static bool neuron_load_neuron_parameters(uint32_t time)
does the memory copy for the neuron parameters
parameters that reside in the neuron_parameter_data_region
General API of a neuron implementation.
static void neuron_impl_print_synapse_parameters(uint32_t n_neurons)
Print the synapse parameters of the neurons.
static void neuron_impl_do_timestep_update(uint32_t timer_count, uint32_t time, uint32_t n_neurons)
Do the timestep update for the particular implementation.
static void neuron_impl_load_neuron_parameters(address_t address, uint32_t next, uint32_t n_neurons, address_t save_initial_state)
Load in the neuron parameters.
static void neuron_impl_add_inputs(index_t synapse_type_index, index_t neuron_index, input_t weights_this_timestep)
Add inputs to the neuron.
static const char * neuron_impl_get_synapse_type_char(uint32_t synapse_type)
Get the synapse type character for a synapse type.
static bool neuron_impl_initialise(uint32_t n_neurons)
Initialise the particular implementation of the data.
static void neuron_impl_print_inputs(uint32_t n_neurons)
Print the inputs to the neurons.
static void neuron_impl_store_neuron_parameters(address_t address, uint32_t next, uint32_t n_neurons)
Stores neuron parameters back into SDRAM.
Recording of the state of a neuron (spiking, voltage, etc.)
bool neuron_recording_reset(uint32_t n_neurons)
reads recording data from sdram on reset.
static void neuron_recording_setup_for_next_recording(void)
sets up state for next recording.
static void neuron_recording_record(uint32_t time)
does the recording process of handing over to basic recording
bool neuron_recording_initialise(void *recording_address, uint32_t n_neurons, uint32_t *n_rec_regions_used)
sets up the recording stuff
void rt_error(uint code,...)
void spin1_memcpy(void *dst, void const *src, uint len)
API for synapse dynamics.
static stdp_params params
Configuration parameters.
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.