17 #include "c_main_neuron_common.h"
18 #include "c_main_common.h"
20 #include "local_only/local_only_impl.h"
44 PROVENANCE_DATA_REGION,
52 LOCAL_ONLY_PARAMS_REGION,
60 .provenance = PROVENANCE_DATA_REGION,
61 .profiler = PROFILER_REGION,
110 UNUSED uint32_t
time, UNUSED index_t neuron_index) {
119 store_neuron_provenance(&prov->neuron_provenance);
131 log_error(
"failed to resume neuron.");
143 #if LOG_LEVEL >= LOG_DEBUG
154 profiler_write_entry_disable_irq_fiq(PROFILER_ENTER |
PROFILER_TIMER);
161 profiler_write_entry_disable_irq_fiq(PROFILER_EXIT |
PROFILER_TIMER);
171 uint32_t state = spin1_int_disable();
180 spin1_mode_restore(state);
187 if (simulation_is_finished()) {
202 simulation_ready_to_read();
222 log_debug(
"Initialise: started");
224 data_specification_metadata_t *ds_regions;
225 if (!initialise_common_regions(
233 uint32_t n_rec_regions_used;
234 if (!initialise_neuron_regions(
240 data_specification_get_region(LOCAL_ONLY_REGION, ds_regions),
241 data_specification_get_region(LOCAL_ONLY_PARAMS_REGION, ds_regions),
247 log_debug(
"setting timer tick callback for %d microseconds",
timer_period);
250 log_debug(
"Initialise: finished");
static void c_main_store_provenance_data(address_t provenance_region)
Callback to store provenance data (format: neuron_provenance).
const struct neuron_regions NEURON_REGIONS
From the regions, extract those that are neuron-specific.
callback_priorities
Identify the priorities for all tasks.
static void process_ring_buffers(void)
Process the ring buffers for the next time step.
void resume_callback(void)
the function to call when resuming a simulation
static uint32_t recording_flags
The recording flags indicating if anything is recording.
static weight_t * ring_buffers
The ring buffers to be used in the simulation.
void background_callback(uint timer_count, uint local_time)
Background activities called from timer.
const struct common_priorities COMMON_PRIORITIES
Identify the priorities of the common tasks.
static bool initialise(void)
Initialises the model by reading in the regions and checking recording data.
const struct common_regions COMMON_REGIONS
From the regions, extract those that are common.
static uint32_t simulation_ticks
Simulation speed.
@ TIMER
Call timer at 0 to keep it quick.
@ DMA
DMA is not actually used.
@ BACKGROUND
Background processing.
@ SDP
SDP handling is queued.
@ USER
Call user at 0 as well; will be behind timer.
static uint32_t infinite_run
True if we're running forever.
void c_main(void)
Entry point.
static uint32_t n_backgrounds_queued
The number of background tasks queued / running.
static uint32_t timer_period
Used for configuring the timer hardware.
static void timer_callback(uint timer_count, uint unused1)
Main timer callback.
static uint32_t max_backgrounds_queued
The maximum number of background tasks queued.
static uint32_t time
Simulation time.
static uint32_t n_background_overloads
The number of times the background couldn't be added.
uint32_t synapse_delay_mask
The mask to get the synaptic delay from a "synapse".
void local_only_clear_input(uint32_t time)
Clear the spikes for the last time step.
uint32_t synapse_type_index_bits
The number of bits used by the synapse type and post-neuron index.
static uint32_t local_time
The local time step counter.
void local_only_store_provenance(struct local_only_provenance *prov)
Store provenance gathered during run.
bool local_only_initialise(void *local_only_addr, void *local_only_params_addr, uint32_t n_rec_regions_used, uint16_t **ring_buffers_ptr)
Set up local-only processing of spikes.
Defines the "local-only" processing of spikes, that is, the processing of spikes without using transf...
void neuron_pause(void)
Perform steps needed before pausing a simulation.
void neuron_print_inputs(void)
Print the inputs to the neurons.
bool neuron_resume(uint32_t time)
Prepare to resume simulation of the neurons.
void neuron_transfer(weight_t *syns)
Add inputs to the neurons.
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.
@ NEURON_PARAMS_REGION
neuron parameters; 2
@ CORE_PARAMS_REGION
core parameters; 1
@ INITIAL_VALUES_REGION
initial neuron state; 16
@ RECORDING_REGION
general recording data; 15
@ NEURON_RECORDING_REGION
recording; 9
@ NEURON_BUILDER_REGION
neuron building; 13
@ CURRENT_SOURCE_PARAMS_REGION
current source parameters; 3
@ MC
Multicast message reception is FIQ.
The combined provenance from synapses and neurons.
uint32_t max_backgrounds_queued
Maximum backgrounds queued.
uint32_t n_background_queue_overloads
Background queue overloads.
The callback priorities used by all simulation cores.
uint32_t sdp
The SDP callback priority.
The identifiers of the regions used by all simulation cores.
uint32_t system
Data for general simulation setup.
The provenance information provided by neurons.
The region IDs used by the neuron processing.
uint32_t core_params
The core parameters.
void synapse_dynamics_process_post_synaptic_event(uint32_t time, index_t neuron_index)
Inform the synapses that the neuron fired.
implementation for handling the processing of synapse rows.
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.