35#include "c_main_neuron_common.h"
36#include "c_main_synapse_common.h"
37#include "c_main_common.h"
61 .provenance = PROVENANCE_DATA_REGION,
62 .profiler = PROFILER_REGION,
63 .recording = RECORDING_REGION
76 .neuron_params = NEURON_PARAMS_REGION,
77 .current_source_params = CURRENT_SOURCE_PARAMS_REGION,
78 .neuron_recording = NEURON_RECORDING_REGION,
79 .initial_values = INITIAL_VALUES_REGION
85 .synaptic_matrix = SYNAPTIC_MATRIX_REGION,
86 .pop_table = POPULATION_TABLE_REGION,
87 .synapse_dynamics = SYNAPSE_DYNAMICS_REGION,
88 .structural_dynamics = STRUCTURAL_DYNAMICS_REGION,
89 .bitfield_filter = BIT_FIELD_FILTER_REGION
126 store_neuron_provenance(&prov->neuron_provenance);
127 store_synapse_provenance(&prov->synapse_provenance);
156 #if LOG_LEVEL >= LOG_DEBUG
166 profiler_write_entry_disable_irq_fiq(PROFILER_ENTER |
PROFILER_TIMER);
173 profiler_write_entry_disable_irq_fiq(PROFILER_EXIT |
PROFILER_TIMER);
239 if (!initialise_common_regions(
247 uint32_t n_rec_regions_used;
248 if (!initialise_neuron_regions(
254 uint32_t incoming_spike_buffer_size;
255 bool clear_input_buffer_of_late_packets;
256 uint32_t row_max_n_words;
257 if (!initialise_synapse_regions(
259 &incoming_spike_buffer_size,
260 &clear_input_buffer_of_late_packets, &n_rec_regions_used)) {
266 row_max_n_words, MC,
USER, incoming_spike_buffer_size,
267 clear_input_buffer_of_late_packets, n_rec_regions_used)) {
static void c_main_store_provenance_data(address_t provenance_region)
Callback to store provenance data (format: neuron_provenance).
static uint32_t simulation_ticks
The number of timer ticks to run for before being expected to exit.
void timer_callback(uint timer_count, uint unused)
Timer interrupt callback.
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.
static uint32_t infinite_run
Determines if this model should run for infinite time.
void c_main(void)
The entry point for this model.
void background_callback(uint timer_count, uint local_time)
Background activities called from timer.
static uint32_t n_backgrounds_queued
The number of background tasks queued / running.
const struct synapse_regions SYNAPSE_REGIONS
From the regions, extract those that are synapse-specific.
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.
static uint32_t timer_period
timer tick period (in microseconds)
const struct common_regions COMMON_REGIONS
From the regions, extract those that are common.
static uint32_t max_backgrounds_queued
The maximum number of background tasks queued.
uint32_t time
The current timer tick value.
static uint32_t n_background_overloads
The number of times the background couldn't be added.
void log_error(const char *message,...)
@ BACKGROUND
Background processing.
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.
static uint32_t local_time
The local time step counter.
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.
bool population_table_load_bitfields(filter_region_t *filter_region)
Initialise the bitfield filtering system.
void recording_reset(void)
Standard layout of DSG regions in neuron code.
void rt_error(uint code,...)
void simulation_handle_pause_resume(resume_callback_t callback)
bool simulation_is_finished(void)
void simulation_ready_to_read(void)
void simulation_run(void)
bool spike_processing_initialise(size_t row_max_n_words, uint mc_packet_callback_priority, uint user_event_priority, uint incoming_spike_buffer_size, bool clear_input_buffers_of_late_packets_init, uint32_t packets_per_timestep_region)
Initialise the spike processing system.
bool spike_processing_do_rewiring(int number_of_rewires)
Set the number of times spike_processing has to attempt rewiring.
void spike_processing_clear_input_buffer(timer_t time)
clears the input buffer of packets
void spike_processing_store_provenance(struct spike_processing_provenance *prov)
Get provenance data for Spike processing.
Provenance for spike processing.
uint spin1_schedule_callback(callback_t cback, uint arg0, uint arg1, uint priority)
uint spin1_irq_disable(void)
uint spin1_int_disable(void)
void spin1_mode_restore(uint value)
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.
The provenance information for synaptic processing.
The region IDs used by synapse processing.
uint32_t bitfield_filter
The filters to avoid DMA transfers of empty rows.
uint32_t synapse_params
The parameters of the synapse processing.
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.
void synapses_resume(timer_t time)
Resume processing of synapses after a pause.
uint32_t synaptogenesis_n_updates(void)
Number of updates to do of synaptogenesis this time step.